/* danielvahl.de: the business card behind Third Attempt.
   Same sender, smaller stage: Third Attempt's type, colours and motif (the referee's light, a circle).
   Every link carries a light; it turns white on hover, as a good lift does. */

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(fonts/BricolageGrotesque-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(fonts/BricolageGrotesque-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #e4e5e2;            /* chalk */
  --ink: #161718;           /* platform rubber */
  --muted: #3d4247;
  --light: #f4f5f5;         /* referee's light, good lift */
  --on-dark: #e4e5e2;
  --on-dark-muted: #b9bcb8;
  --ph: #ffb3d1;            /* draft marker, goes before launch */

  --font: "Bricolage Grotesque", "Helvetica Neue", Arial, system-ui, sans-serif;
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(3.4rem, 0.8rem + 7.2vw, 8.5rem);

  --margin: clamp(1rem, 2.4vw, 2.25rem);
  --max: 84rem;
  --gutter: clamp(1rem, 2vw, 2rem);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Basics ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ink); color: var(--on-dark);
  font-family: var(--font); font-size: var(--step-body); line-height: 1.5;
  font-kerning: normal; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, figure, ul, address { margin: 0; }
ul[class] { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
::selection { background: var(--light); color: var(--ink); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
h1, h2, h3 { font-weight: 600; text-wrap: balance; letter-spacing: -0.03em; line-height: 0.98; }
.display { font-size: var(--step-display); line-height: 0.92; letter-spacing: -0.04em; }
.lead { font-size: var(--step-lead); line-height: 1.35; letter-spacing: -0.01em; }
.small { font-size: var(--step-small); line-height: 1.45; }
p { max-width: 62ch; text-wrap: pretty; }
.wrap {
  padding-left: max(var(--margin), env(safe-area-inset-left, 0px), calc((100% - var(--max)) / 2));
  padding-right: max(var(--margin), env(safe-area-inset-right, 0px), calc((100% - var(--max)) / 2));
}
.link { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.22em; text-decoration-thickness: 0.07em; transition: text-decoration-color 180ms ease; }

/* Draft markers */
.draft { max-width: none; background: var(--ph); color: var(--ink); font-size: var(--step-small); text-align: center; padding: 0.35rem var(--margin); }
.ph { background: var(--ph); color: var(--ink); padding: 0 0.3em; border-radius: 0.2em; }
.ph-dot { display: inline-block; width: 0.9rem; aspect-ratio: 1; background: var(--ph); vertical-align: -0.1em; margin-right: 0.5rem; }

/* ---------- Buttons: round like the light ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem; padding: 0 1.6rem; border-radius: 999px;
  background: var(--ink); color: var(--light); text-decoration: none; white-space: nowrap; font-weight: 500;
  transition: transform 140ms var(--ease-out), background-color 180ms ease;
}
.button:active { transform: scale(0.96); }
.button--quiet-dark { background: color-mix(in srgb, var(--light) 14%, transparent); color: var(--light); }
.button--small { min-height: 2.6rem; padding: 0 1.1rem; }

/* ---------- Mark: the domain, without Third Attempt's lights ---------- */
.mark { font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.03em; text-decoration: none; white-space: nowrap; }

/* ---------- The card: one screen ---------- */
.card { min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: calc(1.25rem + env(safe-area-inset-top, 0px)) 1rem; }

.home {
  display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); gap: var(--gutter); align-items: center;
  padding-block: clamp(2rem, 6svh, 4rem);
}
.who { display: grid; gap: clamp(1.5rem, 3svh, 2.25rem); }
.who .lead { max-width: 30ch; }

/* The portrait sits in the big light, as the facts do on Third Attempt's first screen. */
.light {
  width: min(100%, 62svh, 38rem); aspect-ratio: 1; border-radius: 50%; justify-self: end;
  background: var(--light); color: var(--ink); display: grid; place-items: center; overflow: hidden;
}
.light img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.light__ph { font-size: var(--step-lead); font-weight: 500; }

/* ---------- Links: each one a light ---------- */
.links { display: grid; gap: 0.6rem; max-width: 40rem; }
.links--grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pill {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1rem;
  min-height: 4.5rem; padding: 0.8rem 1.6rem 0.8rem 1.1rem; border-radius: 999px;
  background: color-mix(in srgb, var(--light) 9%, transparent); color: var(--light); text-decoration: none;
  transition: transform 140ms var(--ease-out), background-color 180ms ease;
}
.pill:active { transform: scale(0.98); }
.pill > span:not(.arr) { display: grid; min-width: 0; }
.pill b { font-weight: 600; font-size: var(--step-lead); letter-spacing: -0.02em; line-height: 1.15; }
.pill small { font-size: var(--step-small); color: var(--on-dark-muted); }
.pill small.ph, .pill .ph { color: var(--ink); justify-self: start; }
.pill .arr { font-size: var(--step-lead); transition: transform 180ms var(--ease-out); }
.dot {
  width: 1.6rem; aspect-ratio: 1; border-radius: 50%;
  background: color-mix(in srgb, var(--light) 22%, transparent); transition: background-color 180ms ease;
}
.pill--main { background: var(--light); color: var(--ink); }
.pill--main small { color: var(--muted); }
.pill--main .dot { background: var(--ink); }
.pill--small { min-height: 3.4rem; padding: 0.5rem 1rem 0.5rem 0.75rem; gap: 0.7rem; grid-template-columns: auto minmax(0, 1fr); border-radius: 1.7rem; }
.pill--small b { font-size: var(--step-body); }
.pill--small .dot { width: 1rem; }
@media (hover: hover) and (pointer: fine) {
  .link:hover { text-decoration-color: currentColor; }
  .button--quiet-dark:hover { background: color-mix(in srgb, var(--light) 24%, transparent); }
  .pill:hover { background: color-mix(in srgb, var(--light) 16%, transparent); }
  .pill:hover .dot { background: var(--light); }
  .pill:hover .arr { transform: translateX(0.25rem); }
  .pill--main:hover { background: #ffffff; }
  .pill--main:hover .dot { background: var(--ink); }
}
.pill:focus-visible .dot { background: var(--light); }

/* ---------- End of the card ---------- */
.end { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem 2rem; padding-block: 1.5rem calc(1.5rem + env(safe-area-inset-bottom, 0px)); color: var(--on-dark-muted); }
.mail { display: flex; align-items: center; gap: 0.9rem; font-size: var(--step-lead); color: var(--on-dark); letter-spacing: -0.01em; }
.copy { font-size: var(--step-small); padding: 0.35rem 0.8rem; border-radius: 999px; background: color-mix(in srgb, var(--light) 12%, transparent); }
.copy:hover { background: color-mix(in srgb, var(--light) 22%, transparent); }

@media (max-width: 56em) {
  .home { grid-template-columns: minmax(0, 1fr); padding-block: 1rem 2.5rem; }
  .light { order: -1; width: min(40vw, 11rem); justify-self: start; }
  .links--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 30em) {
  .pill { min-height: 4rem; padding-right: 1.2rem; }
  .pill--small { padding-inline: 1rem; }
  .pill--small .dot { display: none; }
  .mail { font-size: var(--step-body); }
}

/* ---------- Motion: the links rise in turn (content stays visible without script) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .who > *, .js .links li, .js .light { animation: rise 800ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms + 150ms); }
  .js .who > :nth-child(2) { --i: 1; } .js .links li:nth-child(1) { --i: 3; } .js .links li:nth-child(2) { --i: 4; }
  .js .links--grid li:nth-child(n) { --i: 5; }
  .js .light { --i: 2; animation-name: light-on; animation-duration: 1400ms; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes light-on { from { opacity: 0.15; scale: 0.92; } to { opacity: 1; scale: 1; } }

/* ---------- Legal pages: chalk paper under the dark bar ---------- */
body.paper { background: var(--bg); color: var(--ink); }
.paper .bar { background: var(--ink); color: var(--light); }
.paper .bar .top a { text-decoration: none; }
.legal { max-width: 44rem; display: grid; gap: 1rem; padding-block: clamp(3rem, 8vw, 6rem); }
.legal h1 { font-size: var(--step-head); margin-bottom: 1rem; }
.legal h2 { font-size: var(--step-lead); letter-spacing: -0.02em; line-height: 1.2; margin-top: 1.5rem; }
.legal address { font-style: normal; }
.paper .end { background: var(--ink); color: var(--on-dark-muted); }
.paper .end .mail { font-size: var(--step-body); }
