/* ------------------------------------------------------------------
   Tivano landing (/tivano/) · light sibling of the Polaris home page:
   the same paper, star field and hairlines, crossed with Tivano's sage
   and the blueprint marks of its icon.
   Fonts: self-hosted Schibsted Grotesk only (assets/fonts/).
------------------------------------------------------------------- */
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/schibsted-400-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;
}

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/schibsted-400-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/schibsted-700-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;
}

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/schibsted-700-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --paper: #f5f4f0;
  --paper-2: #ecebe6;
  --ink: #14130f;
  --ash: #6b6860;
  --line: rgba(20, 19, 15, 0.12);
  --sage: #5e7968;            /* Breeze accent: graphics, hairlines, large type */
  --sage-ink: #46604f;        /* small sage text, 6:1 on paper */
  --sage-2: #689878;          /* icon green */
  --sage-wash: #e6eee8;       /* tinted band */
  --sage-deep: #40604e;       /* the one deep colour block */
  --sage-line: rgba(94, 121, 104, 0.45);
  --cream: #f8f8e8;
  --accent: #5e7968;          /* hero-sky.js reads this and draws in sage */
  --font-sans: 'Schibsted Grotesk', ui-sans-serif, system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --t-fast: 160ms;
  --t-reveal: 320ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --s-section: clamp(96px, 12vw, 160px);
}

*, *::before, *::after { box-sizing: border-box }
html { -webkit-text-size-adjust: 100%; overflow-x: clip }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; padding: 0 }
ul { list-style: none }
button { font: inherit; color: inherit }
a { color: inherit; text-decoration: none }
img { display: block; max-width: 100%; height: auto }
p { text-wrap: pretty }
::selection { background: rgba(94, 121, 104, 0.22) }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--sage-ink);
  outline-offset: 3px;
  border-radius: 2px;
}
.pill:focus-visible { border-radius: 999px }
/* The sage ring is invisible on the deep band. */
.download a:focus-visible { outline-color: var(--cream) }

/* Both languages live in the DOM; html[lang] picks one. */
html[lang="en"] [data-l="zh"],
html[lang^="zh"] [data-l="en"] { display: none }

/* #dl-alt carries one label per language per target; the script sets
   data-region to the target it does NOT point at. */
#dl-alt [data-region] { display: none }
#dl-alt[data-region="mirror"] [data-l="en"][data-region="github"],
#dl-alt[data-region="mirror"] [data-l="zh"][data-region="github"],
#dl-alt[data-region="github"] [data-l="en"][data-region="mirror"],
#dl-alt[data-region="github"] [data-l="zh"][data-region="mirror"] { display: inline }
html[lang="en"] #dl-alt [data-l="zh"][data-region],
html[lang^="zh"] #dl-alt [data-l="en"][data-region] { display: none }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px }

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  transition: top var(--t-fast) var(--ease);
}
.skip-link:focus-visible { top: 12px }

.vhidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Header floats over the hero: the hero pulls itself up by the header's
   height (16 + 44 + 16 = 76px) so the canvas continues behind it. */
.site-head { position: relative; z-index: 2; padding: 16px 0 }
.head-in { display: flex; align-items: center; justify-content: space-between; gap: 16px }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px }
.brand-icon { width: 28px; height: 28px; border-radius: 22% }
.brand-name { font-size: 16px; font-weight: 600 }
.head-right { display: flex; align-items: center; gap: 24px }
.lang-toggle { display: flex; gap: 4px }
.lang-btn {
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  background: none;
  font-size: 13px;
  color: var(--ash);
  cursor: pointer;
}
.lang-btn[aria-pressed="true"] { color: var(--ink); font-weight: 600 }
.head-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 13px;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: text-decoration-color var(--t-fast) var(--ease);
}
.head-link:hover { text-decoration-color: currentColor }
.home-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
  color: var(--ash);
  transition: color var(--t-fast) var(--ease);
}
.home-link:hover { color: var(--ink) }

.arr, .darr { width: 10px; height: 10px; flex: none; transition: transform var(--t-fast) var(--ease) }
.head-link:hover .arr,
.text-link:hover .arr,
.attrib-link:hover .arr { transform: translate(2px, -2px) }
.pill:hover .darr { transform: translateY(2px) }

/* Hero: headline and actions only; the screenshot is the next sibling. */
.nb { white-space: nowrap }
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(80vh, 700px);
  margin-top: -76px;
  padding-top: 76px;
  overflow: hidden;
}
#hero-sky {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
.hero-in {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-top: clamp(48px, 7vw, 96px);
  padding-bottom: clamp(120px, 14vw, 168px);
}
h1 {
  max-width: 14em;
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
html[lang^="zh"] h1 { letter-spacing: -0.015em }
.sub { max-width: 34em; margin-top: 24px; font-size: 18px; color: var(--ash) }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 36px }
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
  transition: opacity var(--t-fast) var(--ease);
}
.pill:hover { opacity: 0.88 }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 15px;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: text-decoration-color var(--t-fast) var(--ease);
}
.text-link:hover { text-decoration-color: currentColor }
.dl-meta {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--sage-ink);
}

/* The hero shot overlaps the hero's lower edge (-72px) so the planet
   rises behind its top-right corner. */
.hero-shot { position: relative; z-index: 1; margin-top: -72px }
.shot-frame { position: relative; --crop-gap: 14px; --crop-len: 16px }
.shot-frame img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

/* Blueprint crop marks: an L sitting --crop-gap outside each corner. */
.crop { position: absolute; width: var(--crop-len); height: var(--crop-len) }
.crop-tl { top: calc(-1 * (var(--crop-gap) + var(--crop-len))); left: calc(-1 * (var(--crop-gap) + var(--crop-len))); border-right: 1px solid var(--sage-line); border-bottom: 1px solid var(--sage-line) }
.crop-tr { top: calc(-1 * (var(--crop-gap) + var(--crop-len))); right: calc(-1 * (var(--crop-gap) + var(--crop-len))); border-left: 1px solid var(--sage-line); border-bottom: 1px solid var(--sage-line) }
.crop-bl { bottom: calc(-1 * (var(--crop-gap) + var(--crop-len))); left: calc(-1 * (var(--crop-gap) + var(--crop-len))); border-right: 1px solid var(--sage-line); border-top: 1px solid var(--sage-line) }
.crop-br { bottom: calc(-1 * (var(--crop-gap) + var(--crop-len))); right: calc(-1 * (var(--crop-gap) + var(--crop-len))); border-left: 1px solid var(--sage-line); border-top: 1px solid var(--sage-line) }
.crops-sm { --crop-gap: 10px; --crop-len: 12px }

/* Dimension line 28px above the hero shot, label on a paper gap. */
.dim { position: absolute; left: 0; right: 0; top: -28px; height: 1px; background: var(--sage-line) }
.dim::before, .dim::after {
  content: "";
  position: absolute;
  top: -3.5px;
  width: 1px;
  height: 8px;
  background: var(--sage-line);
}
.dim::before { left: 0 }
.dim::after { right: 0 }
.dim-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 0 8px;
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--sage-ink);
}

/* Section index tag: mono label + 48px hairline, replaces the eyebrow. */
.ftag {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sage-ink);
}
.ftag::after { content: ""; width: 48px; height: 1px; background: var(--sage-line) }

h2 {
  margin-top: 14px;
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.fbody { margin-top: 16px; max-width: 34em; color: var(--ash) }

/* Agents: tight chip wall. */
.agents { padding: var(--s-section) 0 }
.agents h2 { margin-top: 0 }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px }
.chips li {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--sage-line);
  border-radius: 999px;
  background: var(--sage-wash);
  font-size: 16px;
}

/* Features. Paper sections after the first share the previous section's
   bottom padding, so consecutive gaps stay at one --s-section. */
.feature { padding: var(--s-section) 0 }
.feature-c, .feature-d { padding-top: 0 }
.feature-split { display: grid; gap: 40px }

/* The one wash band. */
.feature-a {
  background: var(--sage-wash);
  border-top: 1px solid var(--sage-line);
  border-bottom: 1px solid var(--sage-line);
}

/* Models: two shots, the second dropped 56px on desktop. */
.fstagger { display: grid; gap: 24px; margin-top: 48px }

/* Themes: the numeral is the moment. */
.themes-grid { display: grid; gap: 40px }
.themes-fig { display: flex; align-items: baseline; gap: 18px; margin-top: 28px }
.themes-num {
  font-size: clamp(120px, 18vw, 240px);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: var(--sage);
}
.themes-word { font-size: clamp(28px, 3.6vw, 44px); font-weight: 500; letter-spacing: -0.02em }

/* Download: the one deep colour block, with the icon's R269 arcs. */
.download {
  position: relative;
  overflow: hidden;
  padding: var(--s-section) 0;
  background: var(--sage-deep);
  color: var(--cream);
}
.download::before {
  content: "";
  position: absolute;
  right: -160px;
  bottom: -160px;
  width: 720px;
  height: 720px;
  background: repeating-radial-gradient(circle at 100% 100%, transparent 0 46px, rgba(248, 248, 232, 0.10) 46px 47px);
  -webkit-mask-image: radial-gradient(circle at 100% 100%, #000 0, #000 36%, transparent 70%);
  mask-image: radial-gradient(circle at 100% 100%, #000 0, #000 36%, transparent 70%);
  pointer-events: none;
}
.dl-arc-label {
  position: absolute;
  right: 44px;
  bottom: 40px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(248, 248, 232, 0.55);
}
.dl-in { position: relative; z-index: 1 }
.dl-icon { width: 96px; height: 96px; border-radius: 22% }
.download .ftag { margin-top: 28px; color: rgba(248, 248, 232, 0.65) }
.download .ftag::after { background: rgba(248, 248, 232, 0.35) }
.dl-title { font-size: clamp(40px, 5vw, 64px); line-height: 1.06; letter-spacing: -0.03em }
html[lang^="zh"] .dl-title { letter-spacing: -0.015em }
.dl-primary-cream { background: var(--cream); color: var(--sage-deep) }
.download .text-link { color: var(--cream) }
.dl-grid { display: grid; gap: 40px; margin-top: 56px }
/* font-size: 0 collapses the whitespace between inline-block dt/dd pairs. */
.reqs { font-size: 0 }
.reqs dt, .reqs dd {
  display: inline-block;
  vertical-align: top;
  padding: 14px 0;
  border-top: 1px solid rgba(248, 248, 232, 0.18);
  font-size: 15px;
}
.reqs dt {
  width: 34%;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(248, 248, 232, 0.65);
}
.reqs dd { width: 66% }
.reqs dt:first-of-type, .reqs dt:first-of-type + dd { border-top: 0 }
.install-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(248, 248, 232, 0.65);
}
.steps { margin-top: 10px; padding-left: 1.4em }
.steps li { padding: 2px 0 }
.dl-sha {
  margin-top: 32px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(248, 248, 232, 0.7);
  overflow-wrap: anywhere;
}

/* Attribution */
.attrib { padding: 48px 0 64px }
.attrib-text { max-width: 40em; font-size: 13px; color: var(--ash) }
.attrib-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line);
  transition: text-decoration-color var(--t-fast) var(--ease);
}
.attrib-link:hover { text-decoration-color: currentColor }

/* Footer */
.site-foot { border-top: 1px solid var(--line) }
.foot-in {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  padding-top: 32px;
  padding-bottom: 48px;
}
.foot-copy { font-size: 13px }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 8px; font-size: 13px }
.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ash);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: color var(--t-fast) var(--ease), text-decoration-color var(--t-fast) var(--ease);
}
.foot-links a:hover { color: var(--ink); text-decoration-color: currentColor }
.footer-filings { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; font-size: 12px }
.filing-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--ash); opacity: 0.8 }
.filing-link:hover { opacity: 1 }
.footer-mps img { width: 14px; height: 16px }

/* Reveal-on-scroll: hidden state only exists under html.js, so a no-JS
   visitor sees everything; IntersectionObserver adds .in once. */
html.js .reveal { opacity: 0; transform: translateY(8px) }
html.js .reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity var(--t-reveal) var(--ease), transform var(--t-reveal) var(--ease);
}

@media (min-width: 760px) {
  .dl-grid { grid-template-columns: 1fr 1fr; gap: 64px }
}

@media (min-width: 900px) {
  .feature-split { grid-template-columns: 5fr 7fr; gap: 56px; align-items: center }
  .feature-b .feature-split { grid-template-columns: 7fr 5fr }
  .feature-b .feature-text { order: 2 }
  .feature-b .shot-frame { order: 1 }
  .fstagger { grid-template-columns: 1fr 1fr; gap: 32px }
  .fstagger .shot-frame + .shot-frame { margin-top: 56px }
  .themes-grid { grid-template-columns: 5fr 7fr; gap: 56px; align-items: center }
}

/* Blueprint marks stay a desktop fineness. */
@media (max-width: 899px) {
  .crop, .dim, .dl-arc-label, .download::before { display: none }
}

@media (max-width: 760px) {
  .head-in { gap: 8px }
  .head-right { gap: 12px }
  .lang-btn { padding: 0 6px }
  .hero-in { padding-bottom: 104px }
  .hero-shot { margin-top: -48px }
  .sub { margin-top: 20px }
  .actions { flex-direction: column; align-items: stretch; gap: 12px; margin-top: 28px }
  .actions .text-link { justify-content: center }
  .reqs dt, .reqs dd { display: block; width: auto }
  .reqs dt { padding-bottom: 0; border-top: 1px solid rgba(248, 248, 232, 0.18) }
  .reqs dd { padding-top: 4px; border-top: 0 }
  .reqs dt:first-of-type { border-top: 0 }
  .foot-in { flex-direction: column; gap: 20px }
}

@media (max-width: 359px) {
  h1 { font-size: 32px }
  .head-right { gap: 8px }
  .brand-name { font-size: 15px }
  .home-link { display: none }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important }
  html.js .reveal { opacity: 1; transform: none }
}
