/* ===== Kin palette (mirrors the apps' tailwind.config.js) ===== */
:root {
  --cream: #FAF6F0;
  --tan-light: #F0E8DC;
  --tan: #D4B896;
  --tan-dark: #C8A882;
  --brown-light: #8B6F4E;
  --brown: #5C3D1E;
  --brown-dark: #2C1F0E;
  --moss: #5C7A4E;
  --rust: #8B3A2A;
  --amber: #D4800A;
  --lavender: #A37FB9;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius: 20px;
  --shadow-soft: 0 24px 60px -24px rgba(44, 31, 14, 0.28);
  --shadow-lift: 0 36px 80px -28px rgba(44, 31, 14, 0.38);
  --nav-h: 72px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--brown-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

.container {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

/* ===== Typography ===== */
h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--brown-dark);
  line-height: 1.12;
  margin: 0 0 0.5em;
  font-weight: 600;
}

h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }

p { margin: 0 0 1em; }

.eyebrow {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brown-light);
  margin-bottom: 1.1em;
}

.lede, .section-lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--brown-light);
  max-width: 56ch;
}

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

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.btn-primary {
  background: var(--brown);
  color: var(--cream);
  box-shadow: 0 14px 30px -14px rgba(92, 61, 30, 0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 38px -14px rgba(92, 61, 30, 0.6); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  color: var(--brown);
  border-color: var(--tan);
  background: transparent;
}
.btn-ghost:hover { background: var(--tan-light); transform: translateY(-2px); }

.btn-small { padding: 9px 20px; font-size: 0.92rem; background: var(--brown); color: var(--cream); }
.btn-small:hover { transform: translateY(-1px); }

/* ===== Nav ===== */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 50;
  background: rgba(250, 246, 240, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}
.nav.scrolled {
  background: rgba(250, 246, 240, 0.92);
  box-shadow: 0 10px 30px -18px rgba(44, 31, 14, 0.35);
}

.nav-inner {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a:not(.btn) {
  color: var(--brown);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.97rem;
  transition: color 0.2s ease;
}
.nav-links a:not(.btn):hover { color: var(--brown-dark); }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + 72px) 0 96px;
  overflow: hidden;
}

.hero-wash {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(48rem 30rem at 85% 8%, rgba(212, 184, 150, 0.35), transparent 65%),
    radial-gradient(40rem 26rem at 5% 90%, rgba(240, 232, 220, 0.9), transparent 70%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 28px 0 22px;
}

.hero-apps {
  color: var(--brown-light);
  font-size: 0.95rem;
}
.hero-apps strong { color: var(--brown); }

.hero-phone { display: flex; justify-content: center; }

/* Typewriter word in the hero headline */
/* inline-block + JS-measured min-width: the headline reserves room for the
   longest name, so typing never rewraps the line or pushes content down */
.type-wrap { display: inline-block; white-space: nowrap; }
#type-word { color: var(--brown); }

.type-caret {
  display: inline-block;
  width: 3px;
  height: 0.92em;
  margin-left: 3px;
  background: var(--tan-dark);
  vertical-align: -0.08em;
  animation: caret-blink 1.1s steps(1) infinite;
}

@keyframes caret-blink {
  0%, 55% { opacity: 1; }
  56%, 100% { opacity: 0; }
}

/* ===== Phone frames ===== */
.phone {
  position: relative;
  width: clamp(230px, 24vw, 300px);
  aspect-ratio: 9 / 19.4;
  background: var(--brown-dark);
  border-radius: 44px;
  padding: 10px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.phone:hover { transform: translateY(-8px); box-shadow: var(--shadow-lift); }

.phone::after { /* dynamic island */
  content: "";
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 28%;
  height: 22px;
  background: var(--brown-dark);
  border-radius: 999px;
  z-index: 2;
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: var(--cream);
}
.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.phone-tilt { transform: rotate(3deg); }
.phone-tilt:hover { transform: rotate(1.5deg) translateY(-8px); }

@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}
.phone-float { animation: float 7s ease-in-out infinite; }

.feature-shot-pair {
  display: flex;
  justify-content: center;
}
.feature-shot-pair .phone-back {
  margin-left: -64px;
  margin-top: 56px;
  transform: rotate(4deg) scale(0.92);
  z-index: -1;
}
.feature-shot-pair .phone-back:hover { transform: rotate(2deg) scale(0.92) translateY(-8px); }

/* ===== Sections ===== */
.section { padding: 104px 0; }
.section-alt { background: var(--tan-light); }

/* ===== Ecosystem trio ===== */
.trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.trio-card {
  display: block;
  background: #fff;
  border: 1px solid rgba(212, 184, 150, 0.4);
  border-radius: var(--radius);
  padding: 30px 28px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 16px 40px -28px rgba(44, 31, 14, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.trio-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 56px -28px rgba(44, 31, 14, 0.35);
}

.trio-dot {
  display: block;
  width: 14px; height: 14px;
  border-radius: 50%;
  margin-bottom: 18px;
}
.trio-care .trio-dot { background: var(--brown); }
.trio-provide .trio-dot { background: var(--moss); }
.trio-present .trio-dot { background: var(--amber); }

.trio-aud {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: -0.4em 0 0.9em;
}
.trio-care .trio-aud { color: var(--brown-light); }
.trio-provide .trio-aud { color: var(--moss); }
.trio-present .trio-aud { color: var(--amber); }

.trio-card p { color: var(--brown-light); }

.trio-more {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--brown);
}

/* ===== App sections / feature rows ===== */
.app-tag {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.8rem;
}
.tag-care { background: rgba(92, 61, 30, 0.1); color: var(--brown); }
.tag-provide { background: rgba(92, 122, 78, 0.14); color: var(--moss); }
.tag-present { background: rgba(212, 128, 10, 0.13); color: var(--amber); }

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  padding: 56px 0;
}
.feature-row + .feature-row { border-top: 1px solid rgba(200, 168, 130, 0.35); }

.row-flip .feature-copy { order: 2; }
.row-flip .feature-shot { order: 1; }

.feature-copy p { color: var(--brown-light); max-width: 46ch; }

.feature-shot { display: flex; justify-content: center; }

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.82em;
  font-weight: 700;
  color: #fff;
}
.badge-rust { background: var(--rust); }

/* ===== Steps ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.step {
  background: #fff;
  border: 1px solid rgba(212, 184, 150, 0.4);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: 0 16px 40px -28px rgba(44, 31, 14, 0.25);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--tan-light);
  color: var(--brown);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 16px;
}

.step p { color: var(--brown-light); margin: 0; }

/* Why-Kin pillars reuse step cards with accent dots */
.pillars .trio-dot { margin-bottom: 16px; }
.dot-brown { background: var(--brown); }
.dot-moss { background: var(--moss); }
.dot-amber { background: var(--amber); }

.how-footnote {
  margin-top: 40px;
  color: var(--brown-light);
  font-size: 1.05rem;
  max-width: 62ch;
}

/* ===== Waitlist ===== */
.waitlist {
  background: var(--brown-dark);
  color: var(--cream);
}
.waitlist h2 { color: var(--cream); }
.waitlist .section-lede { color: var(--tan); }

.waitlist-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.waitlist-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
  width: min(520px, 100%);
}

.waitlist-form input[type="email"] {
  flex: 1 1 260px;
  padding: 14px 20px;
  border-radius: 999px;
  border: 2px solid var(--brown-light);
  background: rgba(250, 246, 240, 0.06);
  color: var(--cream);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.waitlist-form input[type="email"]::placeholder { color: var(--tan-dark); }
.waitlist-form input[type="email"]:focus {
  border-color: var(--tan);
  background: rgba(250, 246, 240, 0.1);
}

.waitlist .btn-primary {
  background: var(--tan);
  color: var(--brown-dark);
}

.hp { display: none; }

.form-note {
  min-height: 1.5em;
  margin-top: 14px;
  font-size: 0.95rem;
  color: var(--tan);
}
.form-note.error { color: #E8A18F; }

/* ===== Footer ===== */
.footer {
  background: var(--brown-dark);
  border-top: 1px solid rgba(139, 111, 78, 0.4);
  padding: 40px 0;
  color: var(--tan);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}

.wordmark-footer { color: var(--cream); font-size: 1.4rem; }
.footer-tag { margin: 6px 0 0; font-size: 0.9rem; color: var(--tan-dark); }

.footer-apps {
  display: flex;
  gap: 20px;
  font-weight: 600;
  font-size: 0.95rem;
}

.footer-meta { text-align: right; font-size: 0.9rem; }
.footer-meta a { color: var(--tan); text-decoration: none; }
.footer-meta a:hover { color: var(--cream); }
.footer-meta p { margin: 6px 0 0; color: var(--tan-dark); }

/* ===== Scroll reveal (progressive enhancement — visible without JS) ===== */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--reveal-delay, 0s);
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .phone-float { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .phone, .trio-card { transition: none; }
  .type-caret { animation: none; opacity: 0; }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero { padding-top: calc(var(--nav-h) + 48px); }
  .trio, .steps { grid-template-columns: 1fr; }
  .feature-row { grid-template-columns: 1fr; gap: 36px; padding: 44px 0; }
  .row-flip .feature-copy { order: 1; }
  .row-flip .feature-shot { order: 2; }
}

@media (max-width: 560px) {
  .nav-links { gap: 16px; }
  .nav-links a:not(.btn) { display: none; }
  .section { padding: 72px 0; }
  .feature-shot-pair .phone-back { display: none; }
  .footer-inner { flex-direction: column; }
  .footer-meta { text-align: left; }
}
