/* fizhub.online — the public-site system of fizhub.ru (DESIGN.md, «Public Site»): monochrome paper and ink,
   hairline rings, pill buttons, one Apple-blue call to action, 28px tiles, black plinths.
   No scripts and no inline styles: the page runs under CSP default-src 'none'. */

@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('onest-cyrillic-wght-normal.woff2') format('woff2-variations'), url('onest-cyrillic-wght-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('onest-latin-wght-normal.woff2') format('woff2-variations'), url('onest-latin-wght-normal.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;
}
/* the serif accent is for Russian words only */
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-display: swap;
  font-weight: 400 900;
  src: url('playfair-display-cyrillic-wght-italic.woff2') format('woff2-variations'), url('playfair-display-cyrillic-wght-italic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url('geist-mono-cyrillic-500-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url('geist-mono-latin-500-normal.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: #FAFAFA;
  --surface: #FFFFFF;
  --ink: #171717;
  --ink-2: #2E2E2E;
  --muted: #4D4D4D;
  --faint: #666666;
  --line: #EBEBEB;
  --line-strong: #D9D9D9;
  --link: #0066CC;
  --accent: #0071E3;
  --accent-hover: #0077ED;
  --mist: #EAF0F7;
  --ring: 0 0 0 1px rgb(0 0 0 / 0.08);

  --f-body: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --f-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --t-h1: clamp(40px, 4.6vw + 16px, 76px);
  --t-h2: clamp(30px, 2.6vw + 18px, 52px);
  --t-h3: clamp(20px, 0.9vw + 14px, 24px);
  --t-lg: clamp(17px, 0.6vw + 13px, 19px);
  --gutter: 24px;
  --wrap: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A0A0A;
    --surface: #111111;
    --ink: #EDEDED;
    --ink-2: #C9C9C9;
    --muted: #A1A1A1;
    --faint: #8F8F8F;
    --line: #1F1F1F;
    --line-strong: #2E2E2E;
    --link: #2997FF;
    --mist: #15191F;
    --ring: 0 0 0 1px rgb(255 255 255 / 0.10);
  }
}

@media (max-width: 720px) { :root { --gutter: 16px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--f-body);
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; color: var(--ink); font-weight: 500; text-wrap: balance; }
h1 { font-size: var(--t-h1); line-height: 1; letter-spacing: -0.055em; }
h2 { font-size: var(--t-h2); line-height: 1.04; letter-spacing: -0.05em; }
h3 { font-size: var(--t-h3); line-height: 1.2; letter-spacing: -0.03em; font-weight: 550; }
p { margin: 0; text-wrap: pretty; }
.serif { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; }
.mono { font-family: var(--f-mono); font-weight: 500; font-feature-settings: 'tnum'; letter-spacing: 0; }
.wrap { width: min(var(--wrap), calc(100% - 2 * var(--gutter))); margin-inline: auto; }

.skip { position: absolute; left: 16px; top: -100px; z-index: 60; padding: 12px 16px; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- kicker ---------- */
.kicker { display: inline-flex; align-items: center; gap: 8px; width: fit-content; color: var(--faint); font: 500 13px/1 var(--f-mono); }
.kicker::before { content: ''; width: 6px; height: 6px; border-radius: 1px; background: var(--ink); }

/* ---------- buttons: pills ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  border: 1px solid var(--line-strong); border-radius: 980px;
  background: var(--surface); color: var(--ink);
  font: 550 15px/1 var(--f-body); letter-spacing: -0.005em; text-decoration: none; white-space: nowrap;
  transition: background-color 200ms var(--ease), border-color 200ms var(--ease), transform 120ms var(--ease);
}
.btn:hover { border-color: var(--faint); }
.btn:active { transform: scale(0.98); }
.btn-lg { min-height: 52px; padding: 0 24px; font-size: 16px; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn-ink { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-ink:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
/* the secondary pill on black plinths */
.btn-glass { background: transparent; border-color: rgb(255 255 255 / 0.24); color: #F5F5F7; }
.btn-glass:hover { border-color: rgb(255 255 255 / 0.5); }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.top-row { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font: 650 19px/1 var(--f-body); letter-spacing: -0.035em; }
.brand-mark { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--ink); color: var(--bg); font: italic 600 17px/1 Georgia, 'Times New Roman', serif; }
.brand small { font: inherit; color: var(--faint); }
.top-links { display: flex; gap: 2px; margin-left: 12px; }
.top-links a { padding: 8px 12px; border-radius: 8px; color: var(--muted); font: 500 14px/1 var(--f-body); text-decoration: none; transition: color 200ms var(--ease); }
.top-links a:hover { color: var(--ink); }
.top-cta { margin-left: auto; }
@media (max-width: 720px) { .top-links { display: none; } }

/* ---------- black plinths: the same in both themes ---------- */
.plinth {
  --ink: #F5F5F7; --muted: #A1A1A6; --faint: #8E8E93; --link: #2997FF;
  position: relative; isolation: isolate; overflow: hidden;
  background: #000; color: #F5F5F7;
}
/* a studio light above the stage and a faint horizon arc: painted once, no motion */
.plinth::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 55% at 70% -8%, rgb(255 255 255 / 0.16), transparent 70%),
    radial-gradient(140% 60% at 50% 135%, transparent 62%, rgb(255 255 255 / 0.10) 62.3%, transparent 63.2%);
}
.plinth .kicker::before { background: #F5F5F7; }

/* ---------- hero ---------- */
.hero { padding-top: clamp(56px, 8vw, 112px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(32px, 5vw, 72px); align-items: end; }
.hero-copy { display: grid; gap: 22px; align-self: center; padding-bottom: clamp(32px, 6vw, 96px); }
.hero h1 { max-width: 13ch; }
.hero .lead { color: var(--muted); font-size: var(--t-lg); line-height: 1.55; max-width: 56ch; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.actions-center { justify-content: center; }

.facts { display: flex; flex-wrap: wrap; margin: 6px 0 0; padding: 0; }
.facts div { padding: 2px 22px; border-left: 1px solid rgb(255 255 255 / 0.14); }
.facts div:first-child { padding-left: 0; border-left: 0; }
.facts dt { color: var(--faint); font: 500 12px/1.4 var(--f-mono); }
.facts dd { margin: 4px 0 0; font-size: 15px; }

/* phone frames: a plain rounded screen in a thin bezel, no fake hardware */
.phone { margin: 0; overflow: hidden; background: #000; }
.phone img { width: 100%; aspect-ratio: 540 / 1200; object-fit: cover; }
/* the hero phone rises from the bottom edge of the plinth */
.hero-phone {
  width: min(330px, 78%); justify-self: center;
  border-radius: 44px 44px 0 0;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.16), 0 0 0 9px #1C1C1E, 0 0 0 10px rgb(255 255 255 / 0.12);
  margin-top: 10px;
}
.hero-phone img { aspect-ratio: 540 / 1040; object-position: top; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 0; }
  .hero h1 { max-width: 14ch; }
  .hero-phone { width: min(280px, 74%); margin-top: 20px; }
  .hero-phone img { aspect-ratio: 540 / 900; }
  .actions .btn { flex: 1 1 auto; }
}

/* ---------- sections ---------- */
.section { padding-block: clamp(72px, 9vw, 128px); }
.section-band { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { display: grid; gap: 16px; max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head > p:not(.kicker) { color: var(--muted); font-size: var(--t-lg); max-width: 56ch; }

/* ---------- tiles: one tone per feature ---------- */
.tile { border-radius: 28px; padding: clamp(22px, 2.6vw, 34px); background: var(--surface); color: var(--ink); box-shadow: var(--ring); }
.tile-label { color: var(--muted); font: 500 14px/1.2 var(--f-body); margin-bottom: 4px; }
.tile-text { display: grid; gap: 8px; align-content: start; }
.tile-text > p:not(.tile-label) { color: var(--muted); }
.tile-ink { --ink: #F5F5F7; --muted: #A1A1A6; background: #000; box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08); }
.tile-blue { --ink: #fff; --muted: rgb(255 255 255 / 0.82); background: #0A66D9; box-shadow: none; }
.tile-mist { background: var(--mist); box-shadow: none; }

.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bento > .tile { display: grid; grid-template-rows: auto 1fr; gap: 28px; overflow: hidden; padding-bottom: 0; }
.phone-sm {
  width: min(230px, 82%); justify-self: center; align-self: end;
  border-radius: 30px 30px 0 0;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.14), 0 0 0 7px #1C1C1E;
  margin-top: 8px;
}
.phone-sm img { aspect-ratio: 540 / 860; object-position: top; }
.bento > .tile-wide { grid-column: 1 / -1; grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr); grid-template-rows: auto; align-items: center; padding-bottom: clamp(22px, 2.6vw, 34px); }
.landscape { overflow: hidden; margin: 7px; border-radius: 18px; background: #000; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.14), 0 0 0 7px #1C1C1E; }
.landscape img { width: 100%; aspect-ratio: 1400 / 630; object-fit: cover; }

@media (max-width: 960px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .bento > .tile:nth-child(3) { grid-column: 1 / -1; }
  .bento > .tile:nth-child(3) .phone-sm { width: min(230px, 60%); }
  .bento > .tile-wide { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .bento { grid-template-columns: 1fr; }
  .phone-sm, .bento > .tile:nth-child(3) .phone-sm { width: min(240px, 72%); }
}

/* ---------- install ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.step { display: grid; gap: 10px; align-content: start; background: var(--bg); }
.step p { color: var(--muted); }
.step-n { color: var(--faint); font-size: 13px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

.check { display: grid; gap: 14px; margin-top: 16px; }
.check p { color: var(--muted); }
.check .tile-label { color: var(--ink); font-weight: 550; }
.check .hash { padding: 14px 16px; border-radius: 14px; background: var(--surface); box-shadow: var(--ring); color: var(--ink); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; user-select: all; }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.faq-grid .section-head { margin-bottom: 0; }
.faq { display: grid; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 2px; cursor: pointer; list-style: none; font: 550 clamp(17px, 0.5vw + 14px, 19px)/1.35 var(--f-body); letter-spacing: -0.02em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; flex: none; width: 9px; height: 9px; border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint); transform: translateY(-3px) rotate(45deg); transition: transform 200ms var(--ease); }
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq details p { padding: 0 2px 22px; color: var(--muted); max-width: 62ch; }
@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; } }

/* ---------- final call ---------- */
.final-wrap { padding-bottom: clamp(56px, 8vw, 96px); }
.final { display: grid; justify-items: center; gap: 16px; padding: clamp(48px, 7vw, 96px) clamp(20px, 4vw, 48px); border-radius: 28px; text-align: center; box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08); }
.final > p { color: var(--muted); font-size: var(--t-lg); }
.final .actions { margin-top: 8px; }
@media (max-width: 620px) { .final .actions { width: 100%; flex-direction: column; } }

/* ---------- links to fizhub.ru ---------- */
.links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.link-tile { display: grid; gap: 4px; padding: 20px 22px; border-radius: 20px; background: var(--bg); box-shadow: var(--ring); color: var(--ink); text-decoration: none; transition: box-shadow 200ms var(--ease); }
.link-tile:hover { box-shadow: 0 0 0 1px var(--faint); }
.link-tile .mono { color: var(--faint); font-size: 12px; overflow-wrap: anywhere; }
.link-tile b { font-weight: 550; font-size: 19px; letter-spacing: -0.02em; }
.link-tile small { color: var(--muted); font-size: 14px; }
@media (max-width: 860px) { .links { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .links { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding-block: 40px 32px; color: var(--faint); font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr)); gap: 28px; }
.foot-col { display: grid; gap: 10px; align-content: start; }
.foot-col b { color: var(--ink); font-weight: 550; }
.foot-col p { color: var(--muted); max-width: 30ch; }
.foot a:not(.brand) { color: var(--muted); text-decoration: none; }
.foot a:not(.brand):hover { color: var(--ink); }
.foot-copy { margin-top: 28px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > .foot-col:first-child { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .faq summary::after, .top-links a { transition: none; }
}
