:root {
  --bg: #fafafa;
  --fg: #0a0a0a;
  --mute: #7d7d7d;
  --line: #e4e4e4;
  --panel-bg: #e6e5df;
  --panel-fg: #0a0a0a;
  --active-bg: #0a0a0a;
  --active-fg: #f2f0ea;
  --footer-bg: #f1f0eb;
  --accent: #e0a458;
  --sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --brand: "Syne", var(--sans);
  --s: clamp(24px, 3.4vw, 46px);
  --text-h: 16.5rem;
}

body[data-theme="dark"] {
  --bg: #090a0c;
  --fg: #f2f0ea;
  --mute: #868b94;
  --line: #23262c;
  --panel-bg: #14161a;
  --panel-fg: #f2f0ea;
  --active-bg: #f2f0ea;
  --active-fg: #0a0a0a;
  --footer-bg: #0b0c0f;
}

* { box-sizing: border-box; }

html { color-scheme: light; }
body[data-theme="dark"] { color-scheme: dark; }

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  color: var(--fg);
  font-family: var(--sans);
  background:
    repeating-linear-gradient(0deg, transparent 0 63px, rgba(0, 0, 0, 0.04) 63px 64px),
    repeating-linear-gradient(90deg, transparent 0 63px, rgba(0, 0, 0, 0.04) 63px 64px),
    var(--bg);
  transition: background-color 0.3s ease, color 0.3s ease;
}

body[data-theme="dark"] {
  background:
    radial-gradient(60rem 30rem at 18% 8%, rgba(66, 112, 94, 0.22), transparent 70%),
    radial-gradient(50rem 30rem at 90% 80%, rgba(54, 92, 120, 0.2), transparent 70%),
    repeating-linear-gradient(0deg, transparent 0 63px, rgba(255, 255, 255, 0.035) 63px 64px),
    repeating-linear-gradient(90deg, transparent 0 63px, rgba(255, 255, 255, 0.035) 63px 64px),
    var(--bg);
}

a { color: inherit; }

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem clamp(1.25rem, 3vw, 2.5rem);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.brand svg { width: 22px; height: 22px; }

.wordmark {
  font-family: var(--brand);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.16em;
  line-height: 1;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  font-size: 0.9rem;
}

.nav a { color: var(--mute); text-decoration: none; }
.nav a:hover { color: var(--fg); }

.theme-toggle {
  width: 1.9rem;
  height: 1.9rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

.theme-toggle:hover { border-color: var(--mute); }

.theme-icon {
  width: 0.8rem;
  height: 0.8rem;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}

/* The strip: slanted panels, one open at a time */

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.strip {
  flex: none;
  display: flex;
  height: clamp(440px, 64vh, 660px);
  width: 100%;
}

.panel {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  margin-left: calc(var(--s) * -1 + 5px);
  background: var(--panel-bg);
  color: var(--panel-fg);
  text-decoration: none;
  clip-path: polygon(var(--s) 0, 100% 0, calc(100% - var(--s)) 100%, 0 100%);
  overflow: hidden;
  transition: flex-grow 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.5s ease, color 0.5s ease;
}

.panel:first-child {
  margin-left: 0;
  clip-path: polygon(0 0, 100% 0, calc(100% - var(--s)) 100%, 0 100%);
}

.panel:last-child {
  clip-path: polygon(var(--s) 0, 100% 0, 100% 100%, 0 100%);
}

.panel.active {
  flex-grow: 4.2;
  background: var(--active-bg);
  color: var(--active-fg);
}

.panel:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }

.inner {
  position: absolute;
  inset: 0;
  padding: clamp(1.2rem, 2.2vw, 2rem) calc(var(--s) + 0.9rem) clamp(1.4rem, 2.4vw, 2.2rem) calc(var(--s) + 1rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.no {
  position: relative;
  z-index: 1;
  width: fit-content;
  font-family: var(--mono);
  font-size: 0.74rem;
  opacity: 0.55;
  transition: opacity 0.4s ease;
}

.panel.active .no {
  opacity: 1;
  padding: 0.22rem 0.5rem;
  border-radius: 3px;
  background: color-mix(in srgb, var(--active-bg) 78%, transparent);
}

.shot {
  position: absolute;
  inset: 0 0 var(--text-h) 0;
  overflow: hidden;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.7s ease 0.2s, transform 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s;
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent);
  mask-image: linear-gradient(to bottom, #000 62%, transparent);
}

.shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
}

.panel.active .shot {
  opacity: 1;
  transform: none;
}

.body { display: block; }

.name {
  display: block;
  font-size: clamp(1.1rem, 1.6vw, 1.5rem);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.panel:not(.active) .name {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.panel.active .name {
  font-size: clamp(2.2rem, 4.8vw, 4.6rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.045em;
}

.detail {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.6s ease, opacity 0.5s ease 0.15s;
}

.panel.active .detail {
  max-height: 14rem;
  opacity: 1;
  margin-top: 0.9rem;
}

.desc {
  max-width: 28rem;
  font-size: 0.98rem;
  line-height: 1.45;
}

.insight {
  max-width: 28rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.5;
  opacity: 0.6;
}

.status {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
}

.progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 0;
  background: var(--accent);
}

.panel.active .progress { animation: fill 4.6s linear forwards; }
.strip.is-paused .progress { display: none; }

@keyframes fill { to { width: calc(100% - var(--s)); } }

/* Footer */

.footer {
  margin-top: clamp(2rem, 6vh, 4rem);
  padding: clamp(2.5rem, 7vh, 4.5rem) clamp(1.25rem, 3vw, 2.5rem) 1.6rem;
  border-top: 1px solid var(--line);
  background: var(--footer-bg);
}

.footer a { color: inherit; text-decoration: none; }

.footer-main {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand contact"
    "links contact";
  gap: 2.4rem clamp(2rem, 8vw, 8rem);
}

.footer-brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 1.3rem;
}

.footer-mark { width: 54px; height: 54px; flex-shrink: 0; }

.footer-tag {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.footer-links {
  grid-area: links;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.8rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-links a { color: var(--mute); transition: color 0.2s ease; }
.footer-links a:hover { color: var(--fg); }

.footer-contact {
  grid-area: contact;
  align-self: end;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-contact li { display: flex; gap: 1rem; }
.footer-contact li > span { color: var(--mute); }
.footer-contact a:hover { color: var(--accent); }
.footer-contact address { font-style: normal; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(2.5rem, 7vh, 4rem);
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
}

.footer-bottom a { display: grid; color: var(--mute); transition: color 0.2s ease; }
.footer-bottom a:hover { color: var(--fg); }
.footer-bottom svg { width: 20px; height: 20px; }

/* Phones: panels stack and open downward */

@media (max-width: 760px) {
  .wordmark { font-size: 0.86rem; letter-spacing: 0.1em; white-space: nowrap; }
  .brand { gap: 0.65rem; }

  .strip { flex-direction: column; height: auto; min-height: 0; padding: 0 1rem; gap: 0.5rem; }

  .footer-main {
    grid-template-columns: 1fr;
    grid-template-areas: "brand" "links" "contact";
  }

  .footer-contact { align-self: start; font-size: 0.72rem; }
  .footer-bottom { flex-wrap: wrap; }

  .panel,
  .panel:first-child,
  .panel:last-child {
    flex: none;
    height: 4.4rem;
    margin-left: 0;
    clip-path: none;
    border-radius: 12px;
    transition: height 0.6s ease, background 0.5s ease, color 0.5s ease;
  }

  :root { --text-h: 13.4rem; }
  .panel.active { height: 26rem; }
  .shot { inset: 0 0 var(--text-h) 0; }

  .inner { padding: 1.1rem 1.4rem; }
  .panel:not(.active) .inner { flex-direction: row; align-items: center; justify-content: flex-start; gap: 1rem; }
  .panel:not(.active) .name { writing-mode: horizontal-tb; transform: none; }
  .panel.active .name { font-size: clamp(1.9rem, 9vw, 2.6rem); }
  .progress { border-radius: 0 0 0 12px; }
  @keyframes fill { to { width: 100%; } }
}

@media (prefers-reduced-motion: reduce) {
  .panel, .detail { transition: none; }
  .panel.active .progress { animation: none; width: 100%; }
}

/* Document pages (product, support, privacy) */

.doc {
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(2rem, 6vh, 4rem) clamp(1.25rem, 3vw, 2.5rem) 0;
}

.nav a[aria-current="page"] { color: var(--fg); }

.doc-hero { padding-bottom: clamp(1.5rem, 4vh, 2.5rem); }

.doc .eyebrow {
  margin: 0 0 1rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}

.doc h1 {
  margin: 0;
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.045em;
}

.doc .lede {
  margin: 1.2rem 0 0;
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.doc p.doc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  margin: 1.6rem 0 0;
  font-family: var(--mono);
  font-size: 0.8rem;
}

.doc-links a { color: var(--fg); text-decoration-color: var(--accent); text-underline-offset: 0.3em; }
.doc-links a:hover { color: var(--accent); }

.doc .doc-meta {
  margin: 1.2rem 0 0;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--mute);
}

.doc-section {
  padding: clamp(1.4rem, 3.5vh, 2rem) 0;
  border-top: 1px solid var(--line);
}

.doc h2 {
  margin: 0 0 0.8rem;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.doc h3 {
  margin: 1.4rem 0 0.3rem;
  font-size: 1rem;
  font-weight: 500;
}

.doc p,
.doc-list { font-size: 1rem; line-height: 1.6; }
.doc p { margin: 0 0 0.9rem; max-width: 40rem; }
.doc h3 + p { margin-top: 0; }

.doc-list { margin: 0 0 0.9rem; padding-left: 1.2rem; max-width: 40rem; }
.doc-list li { margin-bottom: 0.45rem; }

.doc p a,
.doc-list a { text-decoration-color: var(--accent); text-underline-offset: 0.25em; }
.doc p a:hover,
.doc-list a:hover { color: var(--accent); }

@media (max-width: 760px) {
  .nav { gap: 0.9rem; font-size: 0.82rem; }
}
