/* WrisTeX site · kami parchment system, accent taken from the app icon (#0F7B6C) */

:root {
  --parchment:    #f5f4ed;
  --ivory:        #faf9f5;
  --warm-sand:    #e8e6dc;

  --brand:        #0F7B6C;
  --brand-light:  #138C7B;
  --brand-tint:   #E4EDE7;

  --near-black:   #141413;
  --dark-warm:    #3d3d3a;
  --olive:        #504e49;
  --stone:        #6b6a64;

  --border:       #e8e6dc;
  --border-soft:  #e5e3d8;
  --line:         #d8d5c8;

  --serif: Charter, "Bitstream Charter", Georgia, Palatino, "Times New Roman", serif;
  --mono:  "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --latin-ui: system-ui, -apple-system, "Segoe UI", sans-serif;

  --stage: #141318;
  --case:  #0b0b0c;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--parchment);
  color: var(--near-black);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--brand-light); }

code {
  font-family: var(--mono);
  font-size: 0.82em;
  color: var(--brand);
  background: var(--brand-tint);
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 64px 120px;
}

/* ========== Buttons ========== */

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--latin-ui);
  font-weight: 500;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1.5px solid var(--brand);
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
  min-width: 158px;
}
.btn-primary { background: var(--brand); color: var(--ivory); }
.btn-primary:hover { background: var(--brand-light); border-color: var(--brand-light); color: var(--ivory); transform: translateY(-1px); }
.btn-primary.is-soon { cursor: default; background: var(--warm-sand); border-color: var(--line); color: var(--dark-warm); }
.btn-primary.is-soon:hover { transform: none; }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-ghost:hover { background: var(--brand-tint); color: var(--brand); transform: translateY(-1px); }

/* ========== Hero ========== */

.hero {
  padding-bottom: 64px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 80px;
}
.eyebrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--latin-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--stone);
  margin: 0 0 56px;
}
.top-links { display: flex; gap: 20px; }
.top-links a { color: var(--dark-warm); }
.top-links a:hover { color: var(--brand); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 56px;
  align-items: center;
}
.hero-icon {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(20, 19, 19, 0.06), 0 2px 8px rgba(20, 19, 19, 0.08);
  margin-bottom: 28px;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 96px;
  line-height: 1.05;
  margin: 0 0 18px;
  opacity: 0;
  transform: translateY(10px);
  filter: blur(6px);
  animation: hero-rise 900ms cubic-bezier(0.16, 1, 0.3, 1) 120ms forwards;
}
@keyframes hero-rise { to { opacity: 1; transform: none; filter: blur(0); } }

.hero .tagline {
  font-size: 23px;
  line-height: 1.4;
  color: var(--olive);
  margin: 0 0 28px;
  max-width: 560px;
}
.hero-tokens {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0 0 34px;
  font-family: var(--latin-ui);
  font-size: 13px;
  color: var(--stone);
}
.hero-tokens b { color: var(--dark-warm); font-weight: 500; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }

.hero-watch { margin: 0; padding-right: 18px; }
.hero-watch .watch { width: 300px; }

/* ========== Watch and phone frames (drawn, not product photos) ========== */

.watch {
  position: relative;
  width: 260px;
  padding: 16px;
  background: var(--case);
  border-radius: 64px;
  box-shadow:
    0 0 0 1.5px #2a2a2c,
    0 0 0 5px #b9b7ae,
    0 24px 48px -20px rgba(20, 19, 19, 0.45);
}
.watch::before {          /* Digital Crown */
  content: "";
  position: absolute;
  right: -14px;
  top: 22%;
  width: 9px;
  height: 52px;
  border-radius: 5px;
  background: linear-gradient(90deg, #8e8c84, #c9c7bd);
}
.watch::after {           /* side button */
  content: "";
  position: absolute;
  right: -10px;
  top: 46%;
  width: 6px;
  height: 64px;
  border-radius: 3px;
  background: #a9a79e;
}
.watch img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 48px;
}

.phone { margin: 0; }
.phone img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 22px rgba(20, 19, 19, 0.16)) drop-shadow(0 2px 4px rgba(20, 19, 19, 0.10));
}

/* ========== Sections ========== */

section { margin-bottom: 96px; scroll-margin-top: 32px; }
.section-head { margin-bottom: 28px; }
.section-num {
  font-family: var(--latin-ui);
  font-size: 13px;
  color: var(--brand);
  letter-spacing: 0.4px;
  margin: 0 0 6px;
}
.section-title {
  font-weight: 500;
  font-size: 34px;
  line-height: 1.2;
  margin: 0;
}
.section-lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--olive);
  margin: 14px 0 0;
  max-width: 720px;
}

/* ========== Gallery ========== */

.gallery {
  --enter-from-x: 44px;
  --exit-to-x: -34px;
  --sweep-angle: 100deg;
  --sweep-from: -45%;
  --sweep-to: 65%;
  --caption-shift: -2px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 24px;
  align-items: baseline;
}
.gallery[data-direction="prev"] {
  --enter-from-x: -44px;
  --exit-to-x: 34px;
  --sweep-angle: 260deg;
  --sweep-from: 65%;
  --sweep-to: -45%;
  --caption-shift: 2px;
}
.gallery-frame {
  grid-column: 1 / -1;
  position: relative;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(15, 123, 108, 0.28), rgba(15, 123, 108, 0) 60%),
    var(--stage);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(20, 19, 19, 0.10);
  cursor: ew-resize;
}
.gallery-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(var(--sweep-angle), rgba(245, 244, 237, 0) 32%, rgba(245, 244, 237, 0.10) 50%, rgba(245, 244, 237, 0) 68%);
  opacity: 0;
  transform: translate3d(var(--sweep-from), 0, 0);
  transition: opacity 540ms ease, transform 920ms cubic-bezier(0.22, 1, 0.36, 1);
}
.gallery.is-switching .gallery-frame::after { opacity: 1; transform: translate3d(var(--sweep-to), 0, 0); }

.gallery-panel {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  z-index: 1;
  transform: translate3d(var(--enter-from-x), 0, 0) scale(0.985);
  transition:
    opacity 620ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 880ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 620ms;
}
.gallery-panel.is-active { opacity: 1; visibility: visible; position: relative; z-index: 2; transform: none; }
.gallery-panel.was-active {
  opacity: 0;
  visibility: visible;
  position: absolute;
  inset: 0;
  z-index: 3;
  transform: translate3d(var(--exit-to-x), 0, 0) scale(0.985);
  pointer-events: none;
}
.stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
}
.stage .watch { box-shadow: 0 0 0 1.5px #2a2a2c, 0 0 0 5px #55534d, 0 30px 60px -20px rgba(0, 0, 0, 0.6); }
.stage .watch::before { background: linear-gradient(90deg, #4a4944, #77756d); }
.stage .watch::after { background: #5d5b55; }

.gallery-caption {
  grid-column: 1;
  grid-row: 2;
  min-height: 52px;
  padding: 14px 2px 0;
  display: flex;
  align-items: baseline;
  gap: 14px;
  transition: opacity 420ms ease, transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}
.gallery.is-switching .gallery-caption { opacity: 0.72; transform: translate3d(var(--caption-shift), 0, 0); }
.gallery-caption .title { font-weight: 500; font-size: 17px; margin: 0; flex: 0 0 auto; }
.gallery-caption .line { font-size: 15px; color: var(--olive); margin: 0; }

.gallery-tabs {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  justify-content: flex-end;
}
.gallery-tabs button {
  appearance: none;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: transparent;
  color: var(--olive);
  font-family: var(--latin-ui);
  font-size: 12px;
  line-height: 1;
  padding: 8px 12px;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.gallery-tabs button:hover { color: var(--brand); border-color: var(--line); }
.gallery-tabs button.is-active { color: var(--brand); background: var(--brand-tint); border-color: var(--line); }

/* ========== How it works ========== */

.how {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border-soft); }
.steps li, .principles li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 8px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border-soft);
  align-items: baseline;
}
.steps .n, .principles .n { font-weight: 500; font-size: 20px; color: var(--brand); line-height: 1; }
.steps .body b, .principles .body b { display: block; font-weight: 500; font-size: 18px; margin-bottom: 4px; }
.steps .body > span, .principles .body > span { font-size: 15px; color: var(--olive); line-height: 1.55; }
.phones { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; max-width: 520px; justify-self: center; width: 100%; }

/* ========== Features ========== */

.features { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border-soft); }
.features li {
  display: grid;
  grid-template-columns: 220px 1fr;
  column-gap: 36px;
  padding: 26px 0;
  border-bottom: 1px solid var(--border-soft);
  align-items: baseline;
}
.features .name { font-weight: 500; font-size: 22px; color: var(--brand); margin: 0; line-height: 1.2; }
.features .name small {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  color: var(--stone);
  font-weight: 400;
  line-height: 1.4;
}
.features .what { font-size: 16px; color: var(--dark-warm); margin: 0; max-width: 680px; }

/* ========== Principles ========== */

.principles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--border-soft);
}
.principles li:nth-child(odd) { padding-right: 32px; border-right: 1px solid var(--border-soft); }
.principles li:nth-child(even) { padding-left: 32px; }

/* ========== FAQ ========== */

.faq { margin: 0; max-width: 760px; }
.faq-pair { margin-bottom: 26px; }
.faq dt { font-weight: 500; font-size: 18px; margin: 0 0 6px; }
.faq dd { font-size: 16px; line-height: 1.55; color: var(--olive); margin: 0; }
.faq-tail { font-size: 15px; color: var(--stone); margin: 32px 0 0; }

/* ========== Footer ========== */

footer.foot {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 48px;
  font-size: 14px;
  color: var(--stone);
}
.foot .mark { display: grid; grid-template-columns: 56px auto; column-gap: 14px; align-items: start; }
.foot .mark img { grid-row: 1 / span 2; width: 56px; height: 56px; border-radius: 12px; }
.foot .mark .wm-name { font-weight: 500; font-size: 28px; color: var(--near-black); line-height: 1.1; }
.foot .mark .wm-line { color: var(--olive); margin-top: 2px; }
.foot .colophon { text-align: right; max-width: 480px; }
.foot .colophon .links { font-family: var(--latin-ui); margin-bottom: 14px; }
.foot .colophon .links a { color: var(--dark-warm); }
.foot .colophon .links a:hover { color: var(--brand); }
.foot .colophon .ethos { color: var(--olive); margin: 0 0 0 auto; max-width: 360px; }

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

.doc-head { padding-bottom: 36px; border-bottom: 1px solid var(--border-soft); margin-bottom: 48px; }
.doc-head .home { display: inline-flex; align-items: center; gap: 10px; color: var(--near-black); font-weight: 500; font-size: 18px; }
.doc-head .home img { width: 32px; height: 32px; border-radius: 8px; }
.doc { max-width: 720px; }
.doc h1 { font-weight: 500; font-size: 48px; line-height: 1.1; margin: 0 0 10px; }
.doc .updated { font-family: var(--latin-ui); font-size: 13px; color: var(--stone); margin: 0 0 36px; }
.doc h2 { font-weight: 500; font-size: 24px; line-height: 1.25; margin: 44px 0 10px; }
.doc p, .doc li { font-size: 17px; line-height: 1.6; color: var(--dark-warm); }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc .lede { font-size: 20px; color: var(--olive); }

/* ========== Responsive ========== */

@media (max-width: 880px) {
  .page { padding: 32px 28px 80px; }
  .eyebrow { margin-bottom: 36px; }
  .hero { margin-bottom: 56px; padding-bottom: 44px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-watch { justify-self: center; padding-right: 14px; }
  .hero-watch .watch { width: 250px; }
  .hero h1 { font-size: 68px; }
  .hero .tagline { font-size: 20px; }
  section { margin-bottom: 72px; }
  .section-title { font-size: 28px; }

  .gallery { grid-template-columns: 1fr; }
  .gallery-caption, .gallery-tabs { grid-column: 1; grid-row: auto; }
  .gallery-caption { flex-direction: column; gap: 4px; }
  .gallery-tabs { justify-content: flex-start; }
  .stage { padding: 44px 20px; }
  .stage .watch { width: 220px; }

  .how { grid-template-columns: 1fr; gap: 40px; }
  .phones { max-width: 480px; margin: 0 auto; }

  .features li { grid-template-columns: 1fr; row-gap: 8px; }
  .principles { grid-template-columns: 1fr; }
  .principles li:nth-child(odd) { border-right: none; padding-right: 0; }
  .principles li:nth-child(even) { padding-left: 0; }

  footer.foot { flex-direction: column; align-items: flex-start; gap: 28px; }
  .foot .colophon { text-align: left; }
  .foot .colophon .ethos { margin-left: 0; }
  .doc h1 { font-size: 38px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 56px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .phones { gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero h1 { animation: none; opacity: 1; transform: none; filter: none; }
  .gallery-frame::after { display: none; }
  .gallery-panel, .gallery-caption { transition: none; transform: none; }
}

/* Six tabs need the full width: caption on its own row, tabs below it. */
.gallery-caption { grid-column: 1 / -1; grid-row: 2; }
.gallery-tabs { grid-column: 1 / -1; grid-row: 3; justify-content: flex-start; margin-top: 6px; }

/* No orphaned last words: balance short lines, keep paragraphs' last lines from being lone words. */
h1, h2, .tagline, .section-title, .gallery-caption .line, .foot .colophon .ethos, .faq dt { text-wrap: balance; }
p, dd, li { text-wrap: pretty; }
.foot .colophon .ethos { max-width: 420px; }

/* How it works: give the phones room to be read. */
.how { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 48px; }
.phones { max-width: 600px; gap: 32px; align-items: start; }
.phones .phone:nth-child(2) { margin-top: 56px; }
@media (max-width: 880px) {
  .how { grid-template-columns: 1fr; }
  .phones { max-width: 520px; }
  .phones .phone:nth-child(2) { margin-top: 32px; }
}

/* Phones on a phone: a swipeable row, one iPhone at a readable width, the next peeking in. */
@media (max-width: 560px) {
  .phones {
    display: flex;
    gap: 20px;
    width: auto;
    max-width: none;
    justify-self: stretch;
    margin: 0 -28px -32px;
    padding: 8px 28px 60px;  /* room for the shadow, which the scroller would otherwise cut */
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 28px;
    scrollbar-width: none;
  }
  .phones::-webkit-scrollbar { display: none; }
  .phones .phone { flex: 0 0 74%; scroll-snap-align: start; }
  .phones .phone:nth-child(2) { margin-top: 0; }
}
