/* Flita, Inc. — corporate site
   Aesthetic: company charter document. Ivory paper, blue ink, seal-red accent. */

:root {
  --paper: oklch(96.6% 0.007 92);
  --paper-deep: oklch(94.4% 0.009 92);
  --ink: oklch(26% 0.022 265);
  --ink-soft: oklch(38% 0.02 265);
  --ink-muted: oklch(48% 0.016 265);
  --hairline: oklch(85% 0.012 92);
  --hairline-strong: oklch(72% 0.018 92);
  --seal: oklch(50% 0.165 27);
  --seal-soft: oklch(50% 0.165 27 / 0.32);

  --font-display: "Besley", "Georgia", serif;
  --font-body: "Hanken Grotesk", "Helvetica Neue", system-ui, sans-serif;

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: clamp(4rem, 10vh, 6.5rem);

  --measure: 62ch;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

/* Faint paper grain — two overlapping radial washes, no images. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 80% at 15% 0%, oklch(98% 0.006 92 / 0.7), transparent 60%),
    radial-gradient(100% 90% at 90% 100%, oklch(92.5% 0.012 88 / 0.55), transparent 55%);
}

.sheet {
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(1.6rem, 5vw, 3.5rem) clamp(1.25rem, 5vw, 2.5rem) var(--space-2xl);
}

/* ── Letterhead ─────────────────────────────────────────────── */

.letterhead {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 3px double var(--hairline-strong);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}

.wordmark:hover .wordmark-inc {
  color: var(--seal);
}

.wordmark-inc {
  font-weight: 400;
  font-style: italic;
  color: var(--ink-muted);
  transition: color 200ms ease;
}

.letterhead-address {
  font-size: 0.78rem;
  line-height: 1.55;
  text-align: right;
  color: var(--ink-muted);
  font-style: normal;
}

/* ── Hero ───────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding: var(--space-3xl) 0 var(--space-2xl);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 5.2vw, 3.05rem);
  line-height: 1.16;
  letter-spacing: -0.01em;
  max-width: 21ch;
  text-wrap: balance;
}

.hero .lede {
  margin-top: var(--space-lg);
  max-width: var(--measure);
  color: var(--ink-soft);
  font-size: 1.125rem;
}

/* ── Company seal ───────────────────────────────────────────── */

.seal {
  position: absolute;
  top: var(--space-xl);
  right: 0;
  width: clamp(88px, 14vw, 122px);
  height: auto;
  color: var(--seal);
  opacity: 0.88;
  transform: rotate(8deg);
  pointer-events: none;
  user-select: none;
}

@keyframes stamp {
  from {
    opacity: 0;
    transform: rotate(8deg) scale(1.35);
  }
  to {
    opacity: 0.88;
    transform: rotate(8deg) scale(1);
  }
}

/* ── Numbered items ─────────────────────────────────────────── */

.items {
  display: flex;
  flex-direction: column;
}

.item {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: var(--space-lg);
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--hairline);
}

.item-no {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--seal);
  padding-top: 0.3rem;
  white-space: nowrap;
}

.item h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.45rem;
  line-height: 1.25;
  margin-bottom: var(--space-md);
}

.item p {
  max-width: var(--measure);
  color: var(--ink-soft);
}

.item p + p {
  margin-top: var(--space-md);
}

/* ── Product entry ──────────────────────────────────────────── */

.product {
  margin-top: var(--space-lg);
  padding: var(--space-lg) var(--space-lg) var(--space-lg) 0;
}

.product-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}

.product-name a {
  color: inherit;
  text-decoration: none;
  border-bottom: 2px solid var(--seal-soft);
  transition: border-color 200ms ease, color 200ms ease;
}

.product-name a:hover {
  color: var(--seal);
  border-bottom-color: var(--seal);
}

.product-domain {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-left: 0.6rem;
}

.product p {
  margin-top: var(--space-sm);
}

/* ── Registry table ─────────────────────────────────────────── */

.registry {
  margin-top: var(--space-sm);
  max-width: var(--measure);
}

.registry > div {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: var(--space-md);
  padding: 0.7rem 0;
  border-top: 1px solid var(--hairline);
}

.registry > div:last-child {
  border-bottom: 1px solid var(--hairline);
}

.registry dt {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding-top: 0.25rem;
}

.registry dd {
  color: var(--ink);
}

/* ── Links ──────────────────────────────────────────────────── */

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--seal-soft);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
  transition: color 200ms ease, text-decoration-color 200ms ease;
}

a:hover {
  color: var(--seal);
  text-decoration-color: var(--seal);
}

a:focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ── Footer ─────────────────────────────────────────────────── */

.colophon {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 3px double var(--hairline-strong);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-lg);
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.colophon-links {
  display: flex;
  gap: var(--space-lg);
  flex-shrink: 0;
}

.colophon a {
  color: var(--ink-muted);
}

.colophon .address-line {
  display: block;
  margin-top: var(--space-xs);
}

/* ── Legal pages (privacy / terms) ──────────────────────────── */

.doc-header {
  padding: var(--space-2xl) 0 var(--space-xl);
}

.doc-header .doc-kicker {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--seal);
}

.doc-header h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  line-height: 1.2;
  margin-top: var(--space-sm);
}

.doc-header .updated {
  margin-top: var(--space-sm);
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.doc {
  counter-reset: clause;
}

.doc section {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: var(--space-lg);
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--hairline);
}

.doc section::before {
  counter-increment: clause;
  content: "§ " counter(clause);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--seal);
  padding-top: 0.25rem;
}

.doc h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.3;
  margin-bottom: var(--space-md);
}

.doc p,
.doc ul {
  max-width: var(--measure);
  color: var(--ink-soft);
}

.doc p + p,
.doc ul + p,
.doc p + ul {
  margin-top: var(--space-md);
}

.doc ul {
  list-style: none;
}

.doc li {
  padding-left: 1.4rem;
  position: relative;
}

.doc li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--seal);
}

.doc li + li {
  margin-top: var(--space-sm);
}

/* ── Page-load rise ─────────────────────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
  .rise {
    animation: rise 640ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .rise-1 { animation-delay: 60ms; }
  .rise-2 { animation-delay: 140ms; }
  .rise-3 { animation-delay: 220ms; }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .seal {
    animation: stamp 560ms 380ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
}

/* ── Small screens ──────────────────────────────────────────── */

@media (max-width: 560px) {
  .letterhead {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .letterhead-address {
    text-align: left;
  }

  .hero {
    padding-top: var(--space-2xl);
    padding-bottom: 6.5rem;
  }

  .hero h1 {
    max-width: 100%;
    padding-right: 0;
  }

  .seal {
    top: auto;
    bottom: -0.5rem;
    width: 76px;
  }

  .item,
  .doc section {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .registry > div {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
  }

  .registry dt {
    padding-top: 0;
  }

  .colophon {
    flex-direction: column;
    gap: var(--space-md);
  }
}
