/* ============================================================
   Sinchi Lab — landing styles
   Aesthetic: editorial modernism with warm paper + deep ink +
   terracotta accent. Fraunces (display) + IBM Plex Sans (body)
   + IBM Plex Mono (labels).
   ============================================================ */

:root {
  /* Palette */
  --paper:        #efe8db;
  --paper-soft:   #e6dcc8;
  --ink:          #0e1b2e;
  --ink-soft:     #3d4f69;
  --ink-quiet:    #5a6680;   /* WCAG AA: 4.73 on paper */
  --clay:         #c04e2b;   /* surfaces + large text only */
  --clay-text:    #9a3c1a;   /* WCAG AA: 5.68 on paper — for small text */
  --clay-dark:    #8a3718;
  --rule:         rgba(14, 27, 46, 0.18);
  --rule-strong:  rgba(14, 27, 46, 0.55);

  /* Type */
  --display: "Fraunces", "Iowan Old Style", "Georgia", serif;
  --sans:    "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, Menlo, monospace;

  /* Layout */
  --max: 1180px;
  --gutter-x: clamp(20px, 4vw, 56px);
}

/* ============================================================
   Skip link (WCAG 2.4.1)
   ============================================================ */

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  z-index: 100;
  transform: translateY(-120%);
  transition: transform 0.2s ease;
}
.skip-link:focus { transform: translateY(0); }

/* ============================================================
   Reset + page base
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* WCAG 2.4.11 — keep anchor targets clear of the sticky nav (~72px) */
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;

  /* Subtle paper grain */
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.055  0 0 0 0 0.105  0 0 0 0 0.18  0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

::selection { background: var(--clay); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
  border-radius: 2px;
}
button:focus-visible, a:focus-visible {
  outline-color: var(--ink);
}

/* ============================================================
   Nav
   ============================================================ */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 24px;
  padding: 18px var(--gutter-x);
  background: color-mix(in oklab, var(--paper) 86%, transparent);
  backdrop-filter: blur(12px) saturate(1.05);
  -webkit-backdrop-filter: blur(12px) saturate(1.05);
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-variation-settings: "opsz" 48, "SOFT" 60;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1;
}

.brand__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--clay);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--clay) 18%, transparent);
}

.brand__wordmark > span + span { margin-left: 0.18em; }
.brand__italic {
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "opsz" 48, "SOFT" 100;
  color: var(--clay);
}

.site-nav__links {
  justify-self: center;
  display: flex;
  gap: 32px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-nav__links a {
  position: relative;
  padding: 4px 0;
  color: var(--ink-soft);
  transition: color 0.25s ease;
}

.site-nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.site-nav__links a:hover { color: var(--ink); }
.site-nav__links a:hover::after { transform: scaleX(1); }

.lang-toggle {
  justify-self: end;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  padding: 8px 12px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}

.lang-toggle:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding:
    clamp(48px, 10vw, 110px)
    var(--gutter-x)
    clamp(64px, 10vw, 120px);
  display: grid;
  gap: clamp(28px, 4vw, 44px);
}

.hero__meta {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-quiet);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}

.hero__issue {
  color: var(--clay-text);   /* WCAG AA — 11px text needs 4.5+ ratio */
  font-weight: 500;
}

.hero__title {
  font-family: var(--display);
  font-variation-settings: "opsz" 144, "SOFT" 50;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(40px, 7.2vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--ink);
  max-width: 22ch;
  text-wrap: balance;
}

.hero__subtitle {
  font-family: var(--sans);
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0;
}

.hero__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}

.hero__kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-quiet);
}

/* ============================================================
   CTA
   ============================================================ */

.cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  transition: background 0.25s ease, color 0.25s ease;
}

.cta::after {
  content: "→";
  font-size: 14px;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cta:hover { background: var(--clay); }
.cta:hover::after { transform: translateX(8px); }

.cta--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.cta--ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ============================================================
   Section frame
   ============================================================ */

main > section {
  max-width: var(--max);
  margin: 0 auto;
  padding:
    clamp(56px, 8vw, 110px)
    var(--gutter-x);
}

.section-head {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: baseline;
  column-gap: 24px;
  margin-bottom: clamp(40px, 6vw, 64px);
  padding-top: 20px;
  border-top: 1px solid var(--ink);
}

.section-head__num {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--ink-quiet);
}

.section-head__title {
  font-family: var(--display);
  font-variation-settings: "opsz" 120, "SOFT" 50;
  font-weight: 400;
  font-size: clamp(30px, 4.6vw, 56px);
  letter-spacing: -0.022em;
  line-height: 1;
  margin: 0;
  color: var(--ink);
}

.section-head__title em {
  font-style: italic;
  font-variation-settings: "opsz" 120, "SOFT" 100;
  color: var(--clay);
}

/* ============================================================
   Principles
   ============================================================ */

.principles {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.principle {
  background: var(--paper);
  padding: clamp(24px, 3vw, 36px);
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 14px;
  transition: background 0.3s ease;
}

.principle:hover { background: var(--paper-soft); }

.principle__num {
  font-family: var(--display);
  font-variation-settings: "opsz" 72, "SOFT" 40;
  font-style: italic;
  font-weight: 400;
  font-size: 26px;
  line-height: 1;
  color: var(--clay);
}

.principle__title {
  font-family: var(--display);
  font-variation-settings: "opsz" 72, "SOFT" 50;
  font-weight: 500;
  font-size: clamp(22px, 2vw, 28px);
  letter-spacing: -0.015em;
  line-height: 1.05;
  margin: 0;
  color: var(--ink);
}

.principle__body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
}

/* ============================================================
   Product
   ============================================================ */

.product__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
}

.product__info {
  display: grid;
  gap: 20px;
  align-content: start;
}

.product__label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--clay-text);
}

.product__body {
  font-family: var(--sans);
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
  max-width: 46ch;
}

.product__info .cta { justify-self: start; margin-top: 8px; }

.product__visual {
  margin: 0;
  justify-self: center;
  text-align: center;
  position: relative;
}

.product__visual::before {
  content: "";
  position: absolute;
  inset: -20px -10px 10px -10px;
  background:
    radial-gradient(60% 60% at 50% 40%, color-mix(in oklab, var(--clay) 40%, transparent) 0%, transparent 70%);
  z-index: 0;
  filter: blur(28px);
  pointer-events: none;
}

.product__visual img {
  position: relative;
  z-index: 1;
  max-width: 280px;
  border-radius: 28px;
  box-shadow:
    0 30px 50px -22px rgba(14, 27, 46, 0.45),
    0 6px 14px -6px rgba(14, 27, 46, 0.25);
  transform: rotate(-2deg);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.product__visual:hover img { transform: rotate(0deg) translateY(-4px); }

/* ============================================================
   About
   ============================================================ */

.about__body { max-width: 780px; }

.about__lede {
  font-family: var(--display);
  font-variation-settings: "opsz" 72, "SOFT" 50;
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 28px;
  text-wrap: balance;
}

.about__body p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 16px;
}

/* ============================================================
   Contact
   ============================================================ */

.contact__lede {
  font-family: var(--sans);
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 48ch;
  margin: 0 0 clamp(20px, 3vw, 32px);
}

.contact__email {
  display: inline-block;
  font-family: var(--display);
  font-variation-settings: "opsz" 144, "SOFT" 80;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(30px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--ink);
  border-bottom: 2px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
  padding-bottom: 8px;
}

.contact__email:hover {
  color: var(--clay);
  border-bottom-color: var(--clay);
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
  max-width: var(--max);
  margin: 40px auto 0;
  padding: 40px var(--gutter-x) 64px;
  border-top: 1px solid var(--ink);
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

.footer__col {
  display: grid;
  gap: 6px;
}

.footer__brand {
  font-family: var(--display);
  font-style: italic;
  font-variation-settings: "opsz" 48, "SOFT" 80;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.footer__tag {
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-quiet);
}

.footer__label {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-quiet);
}

.footer__links { gap: 6px; }
.footer__links a {
  color: var(--ink);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: border-color 0.25s, color 0.25s;
}
.footer__links a:hover { border-bottom-color: var(--clay); color: var(--clay); }

/* ============================================================
   Responsive
   ============================================================ */

@media (min-width: 720px) {
  .principles { grid-template-columns: repeat(3, 1fr); }
  .product__grid { grid-template-columns: 1.2fr 1fr; }
  .footer {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
    align-items: start;
  }
}

@media (max-width: 640px) {
  .site-nav__links { display: none; }
  .section-head {
    grid-template-columns: 56px 1fr;
    column-gap: 16px;
  }
  .product__visual img { transform: rotate(0deg); }
}

/* ============================================================
   Motion — staggered hero entrance, respects reduced-motion
   ============================================================ */

@media (prefers-reduced-motion: no-preference) {
  .hero > * {
    opacity: 0;
    transform: translateY(18px);
    animation: riseIn 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  }
  .hero > *:nth-child(1) { animation-delay: 0.05s; }
  .hero > *:nth-child(2) { animation-delay: 0.18s; }
  .hero > *:nth-child(3) { animation-delay: 0.32s; }
  .hero > *:nth-child(4) { animation-delay: 0.46s; }

  @keyframes riseIn {
    to { opacity: 1; transform: translateY(0); }
  }

  .site-nav {
    opacity: 0;
    animation: fadeIn 0.6s ease-out 0.05s forwards;
  }
  @keyframes fadeIn { to { opacity: 1; } }
}
