/* Octobench site styles, v3: one link-in-bio page (+ the 404).
   Colour tokens: brand/marka-kitabi.md, section 5. Paths here are relative to this file. */

/* Self-hosted fonts (SIL Open Font License; see assets/fonts/LICENSE.txt).
   Both files are trimmed to plain English letters, digits and punctuation. */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/bricolage-grotesque-basic.woff2') format('woff2');
}
@font-face {
  font-family: 'Martian Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/martian-mono-basic.woff2') format('woff2');
}

:root {
  --abyss: #1A1430;
  --deep: #2B2148;
  --deep-line: #3A3060;
  --violet: #8C6BFF;
  --receipt: #F2F1F6;
  --glow: #4FE3C8;
  --fog: #A79FC2;

  --display: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Martian Mono', ui-monospace, Consolas, 'Courier New', monospace;
  --ease-out: cubic-bezier(.2, .8, .2, 1);

  /* soft light behind Otto: radius, and how far above the middle of the page he sits */
  --halo-r: 340px;
  --halo-y: calc(50% - 214px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--abyss); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 20px 20px 24px;
  background: radial-gradient(circle var(--halo-r) at 50% var(--halo-y), var(--deep) 0%, var(--abyss) 100%) no-repeat var(--abyss);
  color: var(--receipt);
  font-family: var(--display);
  font-size: 18px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--glow); outline-offset: 3px; }
::selection { background: var(--violet); color: var(--abyss); }

.bio { width: 100%; max-width: 400px; text-align: center; }

/* ---------- Otto ---------- */
.otto {
  height: clamp(160px, 30vh, 300px);
  height: clamp(160px, 30svh, 300px);
  aspect-ratio: 920 / 980;
  margin: 0 auto;
  -webkit-tap-highlight-color: transparent;
}
.otto svg { display: block; width: 100%; height: 100%; overflow: visible; }
.otto.is-live { cursor: pointer; }

/* ---------- name + the one line ---------- */
h1 {
  margin: 4px 0 0;
  font-size: clamp(44px, 13vw, 54px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.018em;
  text-transform: lowercase;
}
.line {
  margin: 10px auto 0;
  max-width: 19em;
  font-size: 19px;
  letter-spacing: 0.012em;
  color: var(--fog);
  text-wrap: balance;
}
.line b { font-weight: 600; color: var(--receipt); }

/* ---------- the links ---------- */
.links { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; }
.link {
  display: flex; align-items: center; gap: 14px;
  min-height: 60px; padding: 8px 18px;
  border: 1px solid var(--deep-line); border-radius: 18px;
  background: var(--deep); color: var(--receipt);
  font-weight: 700; font-size: 18px; letter-spacing: 0.012em; line-height: 1.2;
  text-align: left; text-decoration: none;
}
.link svg { flex: none; width: 22px; height: 22px; }
.link .meta {
  margin-left: auto; padding-left: 8px;
  font: 500 12.5px/1 var(--mono); letter-spacing: -0.01em; color: var(--fog); white-space: nowrap;
}
a.link { transition: transform 160ms var(--ease-out), background-color 160ms, border-color 160ms; }
a.link:hover { border-color: var(--fog); }
a.link:active { transform: scale(.98); }
a.link:focus-visible { border-radius: 18px; }

.link.primary { background: var(--violet); border-color: var(--violet); color: var(--abyss); }
.link.primary .meta { color: var(--abyss); }
a.link.primary:hover { background: #9C80FF; border-color: #9C80FF; }

/* not open yet: looks switched off, is not a link */
.link.off { background: transparent; border-style: dashed; color: var(--fog); font-weight: 600; cursor: default; }
.link.off svg { opacity: .7; }
.link.off .meta {
  padding: 6px 9px; border: 1px solid var(--deep-line); border-radius: 999px;
  font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
}

/* contact: the address is plain text (tap selects it all), plus a copy button */
.link.contact { padding: 7px 7px 7px 18px; }
.email {
  min-width: 0;
  font: 500 14.5px/1.3 var(--mono); letter-spacing: -0.01em; white-space: nowrap;
  -webkit-user-select: all; user-select: all;
}
.copy {
  margin-left: auto; flex: none;
  min-width: 78px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--deep-line); border-radius: 12px;
  background: var(--abyss); color: var(--receipt);
  font: 600 12px/1 var(--mono); cursor: pointer;
  transition: border-color 160ms, color 160ms;
}
.copy:hover { border-color: var(--fog); }
.copy:focus-visible { border-radius: 12px; }
.copy.done { border-color: var(--glow); color: var(--glow); }

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

/* ---------- 404 ---------- */
.lost { --halo-y: calc(50% - 87px); }
.lost .otto { height: clamp(150px, 26vh, 230px); aspect-ratio: 1; }
.lost .otto img { display: block; width: 100%; height: 100%; }
.lost h1 { font-size: clamp(36px, 10vw, 46px); text-transform: none; letter-spacing: -0.02em; }
.lost .link { justify-content: center; text-align: center; }

@media (max-width: 359px) {
  body { padding-inline: 14px; }
  .link { padding-inline: 14px; gap: 10px; }
  .email { font-size: 13px; }
  .copy { min-width: 64px; padding: 0 10px; }
}
@media (min-width: 700px) {
  :root { --halo-r: 460px; }
}
@media (prefers-reduced-motion: reduce) {
  a.link, .copy { transition: none; }
  a.link:active { transform: none; }
}
@media print {
  body { background: #fff; color: #000; }
}
