/* our.ink platform page. Self-hosted fonts only: no outside requests, so the
   page loads in China. Colours from the reader's src/branding/ourink.ts. */

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  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;
}
@font-face {
  font-family: "Fraunces Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/fraunces-latin-wght-normal.woff2") format("woff2-variations");
  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 {
  --ink: #23305E;
  --ink-deep: #1A2448;
  --teal: #0F8B8D;
  --teal-light: #5FD3D5;
  --paper: #F7F5F1;
  --white: #FFFFFF;
  --text: #1F2433;
  --muted: #5A6072;
  --line: #E3E0D8;

  --sans: "Inter Variable", "Inter", "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  --serif: "Fraunces Variable", Georgia, "Songti SC", "SimSun", serif;

  --text-sm: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --text-base: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --text-xl: clamp(1.5rem, 1.3rem + 0.9vw, 2.125rem);
  --text-hero: clamp(2.25rem, 1.6rem + 3vw, 4rem);

  --gap: clamp(1rem, 0.8rem + 1vw, 1.5rem);
  --section: clamp(4rem, 3rem + 5vw, 7.5rem);
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--ink); text-underline-offset: 0.2em; }
a:hover { color: var(--teal); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; color: var(--ink); text-wrap: balance; }
p { margin: 0; }

.wrap { width: min(1120px, 100% - 2 * var(--gap)); margin-inline: auto; }

.skip { position: absolute; left: -999px; top: 0; padding: 0.5rem 1rem; background: var(--ink); color: var(--white); z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

/* Wordmark: "our" + teal "." + bold "ink", as in the reader */
.wordmark { display: inline-flex; align-items: baseline; font-size: 1.5rem; line-height: 1; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.wordmark:hover { color: var(--ink); }
.w-our { font-weight: 400; }
.w-dot, .w-ink { font-weight: 800; }
.w-dot { color: var(--teal); }
.wordmark-small { font-size: 1.25rem; }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: rgba(247, 245, 241, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.nav { display: flex; align-items: center; gap: clamp(0.75rem, 0.5rem + 1.5vw, 1.75rem); font-size: var(--text-sm); }
.nav a:not(.btn) { color: var(--muted); text-decoration: none; font-weight: 500; }
.nav a:not(.btn):hover { color: var(--ink); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0.625rem 1.25rem;
  border-radius: 999px; border: 1.5px solid var(--ink);
  background: var(--ink); color: var(--white);
  font-weight: 600; font-size: var(--text-sm); text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.btn:hover { background: var(--ink-deep); border-color: var(--ink-deep); color: var(--white); }
.btn-quiet { background: transparent; color: var(--ink); }
.btn-quiet:hover { background: var(--white); color: var(--ink); border-color: var(--ink); }
.btn-small { min-height: 38px; padding: 0.4rem 1rem; }

.eyebrow { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); margin-bottom: 0.875rem; }
.eyebrow-light { color: var(--teal-light); }
.muted { color: var(--muted); }

/* Hero */
.hero { padding-block: clamp(3rem, 2rem + 5vw, 6.5rem) clamp(2.5rem, 2rem + 3vw, 5rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 1rem + 4vw, 4.5rem); align-items: center; }
.hero h1 { font-family: var(--serif); font-weight: 600; font-size: var(--text-hero); line-height: 1.05; letter-spacing: -0.02em; }
.lead { margin-top: 1.5rem; font-size: var(--text-lg); color: var(--muted); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.page-art { margin: 0; }
.page-art svg { width: 100%; height: auto; }

/* Live strip */
.live { border-block: 1px solid var(--line); background: var(--white); }
.live-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1.5rem; padding-block: 1.125rem; }
.live-label { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.live-tenant { color: var(--ink); }
.live-tenant .sep { color: var(--muted); margin-inline: 0.25rem; }

/* Sections */
.section { padding-block: var(--section); }
.section-head { max-width: 40rem; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.section h2 { font-family: var(--serif); font-weight: 600; font-size: var(--text-xl); line-height: 1.15; letter-spacing: -0.01em; }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.feature { padding: clamp(1.25rem, 1rem + 1vw, 2rem); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); }
.feature h3 { font-size: var(--text-base); font-weight: 700; margin-bottom: 0.5rem; }
.feature h3::before { content: ""; display: block; width: 22px; height: 3px; border-radius: 2px; background: var(--teal); margin-bottom: 1rem; }
.feature p { color: var(--muted); font-size: var(--text-sm); line-height: 1.6; }

/* Coming next */
.section-ink { background: var(--ink); color: #DCE0EC; }
.section-ink h2 { color: var(--white); }
.coming-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(2rem, 1rem + 4vw, 4rem); align-items: start; }
.coming-lead { margin-top: 1rem; color: #B9BED0; }
.coming { list-style: none; margin: 0; padding: 0; counter-reset: next; }
.coming li { counter-increment: next; display: grid; grid-template-columns: 2.5rem 1fr; gap: 0.75rem; padding-block: 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.coming li:first-child { padding-top: 0.25rem; }
.coming li::before { content: counter(next, decimal-leading-zero); font-weight: 700; color: var(--teal-light); font-variant-numeric: tabular-nums; }
.coming strong { color: var(--white); font-weight: 600; }

/* Sign in */
.signin-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 1rem + 4vw, 4rem); align-items: start; }
.signin-grid h2 + p { margin-top: 1rem; max-width: 32em; }
.signin-grid .muted { margin-top: 0.75rem; font-size: var(--text-sm); }
.libraries { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.library { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.5rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.library-name { font-weight: 700; color: var(--ink); }
.library-host { color: var(--muted); font-size: var(--text-sm); overflow-wrap: anywhere; }
.library-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Footer */
.foot { border-top: 1px solid var(--line); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; padding-block: 2rem; color: var(--muted); font-size: var(--text-sm); }

@media (max-width: 900px) {
  .hero-grid, .coming-grid, .signin-grid { grid-template-columns: 1fr; }
  .page-art { max-width: 520px; }
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .nav a:not(.btn) { display: none; }
  .features { grid-template-columns: 1fr; }
  .actions .btn { flex: 1 1 auto; }
}
@media (max-width: 600px) {
  .live-tenant .sep { display: none; }
  .live-tenant a { display: block; }
}
