/* finya – Linktree. Tokens first (light + dark), then layout and components. */

@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/instrument-serif-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #f2efe9;
  --surface: #fbfaf7;
  --surface-hover: #ffffff;
  --line: rgb(20 18 16 / 0.09);
  --line-strong: rgb(20 18 16 / 0.2);
  --ink: #141210;
  --muted: #6b675f;
  --shadow: 0 1px 2px rgb(20 18 16 / 0.04), 0 10px 24px -14px rgb(20 18 16 / 0.18);
  /* Black-and-white brand marks (SoundCloud's mono logo, RA, Urban Sports Club) follow the theme. */
  --tile-mono-bg: #141210;
  --tile-mono-fg: #fbfaf7;
  --radius: 18px;
  --serif: "Instrument Serif", ui-serif, Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0d0c;
    --surface: #181715;
    --surface-hover: #201f1c;
    --line: rgb(242 238 230 / 0.08);
    --line-strong: rgb(242 238 230 / 0.18);
    --ink: #f2eee6;
    --muted: #a29d94;
    --shadow: none;
    --tile-mono-bg: #f2eee6;
    --tile-mono-fg: #141210;
  }
}

/* Base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}

[hidden] {
  display: none !important;
}

/* Layout */

.page {
  width: 100%;
  max-width: 35rem;
  margin: 0 auto;
  padding: max(1.5rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(2rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
}

/* Hero: a single black-and-white landscape image, no headline. */

.hero__image {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 20px;
  background: var(--surface);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Sections */

.section {
  margin-top: 3rem;
  scroll-margin-top: 1.5rem;
}

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line-strong);
}

.section__title {
  font: 400 2.5rem / 1 var(--serif);
  letter-spacing: -0.01em;
}

.section__lede {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.875rem;
}

/* Link rows */

.links {
  display: grid;
  gap: 0.5rem;
}

.link {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-height: 4.25rem;
  padding: 0.75rem 1rem 0.75rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition:
    background-color 0.2s,
    border-color 0.2s,
    transform 0.2s;
}

.link:active {
  transform: scale(0.99);
}

.link__text {
  display: grid;
  flex: 1;
  min-width: 0;
}

.link__title {
  font-weight: 600;
  line-height: 1.25;
}

.link__sub {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link__arrow {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--muted);
  transition:
    color 0.2s,
    transform 0.2s;
}

/* Brand tiles: the platform is recognisable before the label is read. */

.tile {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.8rem;
  color: #fff;
}

.tile svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: currentColor;
}

.tile--soundcloud svg {
  width: 1.75rem;
  height: 1.75rem;
}

.tile--soundcloud,
.tile--ra,
.tile--usc {
  background: var(--tile-mono-bg);
  color: var(--tile-mono-fg);
}

.tile--ra svg {
  width: 1.75rem;
}

.tile--usc svg {
  width: 1.375rem;
  height: 1.375rem;
}

.tile--eversports,
.tile--fangfrisch {
  background: #fff;
  box-shadow: inset 0 0 0 1px rgb(20 18 16 / 0.08);
}

.tile--eversports svg {
  width: 1.625rem;
  height: 1.625rem;
}

.tile--fangfrisch {
  color: #414141;
}

.tile--fangfrisch svg {
  width: 1.375rem;
  height: 1.375rem;
}

.tile--instagram {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}

.more {
  display: inline-flex;
  margin-top: 0.875rem;
  padding: 0.25rem 0;
  color: var(--muted);
  font-size: 0.875rem;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

/* Yoga class card */

.class-card {
  padding: 1.25rem 1.25rem 0.375rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.class-card__when {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem 0.625rem;
  margin-bottom: 0.875rem;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.badge {
  padding: 0.1875rem 0.625rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.class-card__title {
  font: 400 2.125rem / 1 var(--serif);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.class-card__title em {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 1.375rem;
}

.class-card__place {
  margin-top: 0.875rem;
  font-size: 0.9375rem;
  font-weight: 500;
}

.class-card__desc {
  margin-top: 0.125rem;
  color: var(--muted);
  font-size: 0.875rem;
  text-wrap: pretty;
}

.book {
  margin: 1rem -1.25rem 0;
}

/* Rows inside the card: no own box, separated by hairlines. */
.link--row {
  min-height: 4rem;
  padding-inline: 1.25rem;
  background: none;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.book li:last-child .link--row {
  border-radius: 0 0 21px 21px;
}

/* Past sets (secondary): smaller, greyscale until hovered. */

.sets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 0.75rem;
}

.set {
  display: grid;
  gap: 0.25rem;
}

.set__thumb {
  margin-bottom: 0.375rem;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface);
  aspect-ratio: 16 / 9;
}

.set__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  transition:
    filter 0.3s,
    transform 0.4s;
}

/* Same type as the link rows: title like .link__title, meta like .link__sub. */
.set__title {
  font-weight: 600;
  line-height: 1.25;
}

.set__meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.set__meta svg {
  width: 1rem;
  height: 1rem;
  fill: #ff0000;
}

/* Footer */

.foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8125rem;
}

/* Hover only where a real pointer exists (no sticky hover on phones). */

@media (hover: hover) {
  .link:hover {
    background: var(--surface-hover);
    border-color: var(--line-strong);
  }

  .link--row:hover {
    border-color: var(--line);
  }

  .link:hover .link__arrow {
    color: var(--ink);
    transform: translate(2px, -2px);
  }

  .foot__top:hover {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
  }

  .more:hover {
    color: var(--ink);
  }

  .set:hover .set__thumb img {
    filter: none;
    transform: scale(1.03);
  }
}

.set:focus-visible .set__thumb img {
  filter: none;
}

/* Larger screens: same single column, a little more air. */

@media (min-width: 40rem) {
  .page {
    padding-top: 4rem;
  }

  .section {
    margin-top: 3.5rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
