/* ============================================================
   Alcove — Landing Page
   ============================================================ */

/* Custom properties */
:root {
  --color-parchment:     #F5F0E8;
  --color-parchment-alt: #EEE8DC;
  --color-mahogany:      #6B2D2D;
  --color-mahogany-warm: #8B4040;
  --color-rosewood:      #B06858;
  --color-gold:          #B8860B;
  --color-gold-hover:    #9A7009;
  --color-espresso:      #2C1810;
  --color-walnut:        #4A3728;
  --color-driftwood:     #7A6B5D;
  --color-stone:         #C8BFB1;
  --color-surface-dark:  #3D1818;

  --font-display: 'Cormorant Garamond', Cochin, 'Book Antiqua', Palatino, serif;
  --font-body:    -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;

  --max-width:    1100px;
  --pad-section:  clamp(72px, 9vw, 128px);
  --pad-inline:   clamp(20px, 5vw, 48px);
  --gap:          clamp(16px, 2.5vw, 28px);

  --radius:       12px;
  --shadow:       0 2px 12px rgba(44, 24, 16, 0.08), 0 1px 4px rgba(44, 24, 16, 0.05);
  --shadow-hover: 0 10px 36px rgba(44, 24, 16, 0.15), 0 2px 8px rgba(44, 24, 16, 0.07);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --duration: 0.24s;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
}

body {
  background: var(--color-parchment);
  color: var(--color-walnut);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }

/* Utility: container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--pad-inline);
}

/* ============================================================
   Scroll-reveal animation
   ============================================================ */
.animate-in {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger siblings within a grid */
.screenshots__grid .animate-in:nth-child(2),
.beta__cards        .animate-in:nth-child(2) { transition-delay: 0.10s; }
.screenshots__grid  .animate-in:nth-child(3) { transition-delay: 0.20s; }
.features__grid     .animate-in:nth-child(2) { transition-delay: 0.08s; }
.features__grid     .animate-in:nth-child(3) { transition-delay: 0.08s; }
.features__grid     .animate-in:nth-child(4) { transition-delay: 0.16s; }


/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-parchment);
  border-bottom: 1px solid transparent;
  transition:
    border-color var(--duration) var(--ease),
    box-shadow   var(--duration) var(--ease);
}

.nav--scrolled {
  border-bottom-color: var(--color-stone);
  box-shadow: 0 1px 20px rgba(44, 24, 16, 0.09);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--pad-inline);
}

.nav__logo img { height: 30px; width: auto; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav__link {
  font-size: 14px;
  color: var(--color-driftwood);
  transition: color var(--duration);
}
.nav__link:hover { color: var(--color-mahogany); }

.nav__cta {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  background: var(--color-mahogany);
  color: var(--color-parchment);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 6px;
  transition: background var(--duration);
}
.nav__cta:hover { background: var(--color-mahogany-warm); }


/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  padding-block: clamp(88px, 13vw, 152px) clamp(88px, 11vw, 128px);
  overflow: hidden;
}

/* Subtle paper grain */
.hero__grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 400px 400px;
  opacity: 0.032;
}

.hero__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Hero animates in on page load, not on scroll */
.hero__heading,
.hero__subheading,
.hero__signup,
.hero__secondary-cta {
  animation: heroFade 0.9s var(--ease) both;
}
.hero__subheading    { animation-delay: 0.12s; }
.hero__signup        { animation-delay: 0.22s; }
.hero__secondary-cta { animation-delay: 0.32s; }

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

.hero__heading {
  font-family: var(--font-display);
  font-size: clamp(56px, 10vw, 104px);
  font-weight: 400;
  line-height: 1.03;
  color: var(--color-espresso);
  letter-spacing: -0.015em;
  margin-bottom: 24px;
}

.hero__heading em {
  font-style: italic;
  color: var(--color-mahogany);
}

.hero__subheading {
  font-size: clamp(17px, 2.1vw, 21px);
  color: var(--color-driftwood);
  max-width: 50ch;
  line-height: 1.65;
  margin-bottom: 40px;
}

/* Email signup */
.hero__signup {
  width: 100%;
  max-width: 440px;
  margin-bottom: 14px;
}

.signup__label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-walnut);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.signup__form {
  display: flex;
  gap: 6px;
  background: white;
  border: 1.5px solid var(--color-stone);
  border-radius: 9px;
  padding: 4px 4px 4px 15px;
  transition:
    border-color var(--duration),
    box-shadow   var(--duration);
}
.signup__form:focus-within {
  border-color: var(--color-mahogany-warm);
  box-shadow: 0 0 0 3px rgba(139, 64, 64, 0.13);
}

.signup__input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--color-espresso);
  min-width: 0;
}
.signup__input::placeholder { color: var(--color-stone); }

.signup__button {
  flex-shrink: 0;
  padding: 9px 22px;
  background: var(--color-gold);
  color: var(--color-espresso);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background var(--duration);
}
.signup__button:hover  { background: var(--color-gold-hover); }
.signup__button:active { transform: scale(0.98); }

.signup__note {
  font-size: 12px;
  color: var(--color-driftwood);
  margin-top: 9px;
}

.hero__secondary-cta {
  font-size: 14px;
  color: var(--color-mahogany-warm);
  padding-bottom: 1px;
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration);
}
.hero__secondary-cta:hover { border-bottom-color: var(--color-rosewood); }


/* ============================================================
   Problem
   ============================================================ */
.problem {
  background: var(--color-espresso);
  padding-block: var(--pad-section);
}

.problem__inner {
  text-align: center;
  max-width: 720px;
}

.problem__heading {
  font-family: var(--font-display);
  font-size: clamp(34px, 5.5vw, 56px);
  font-weight: 400;
  color: var(--color-parchment);
  line-height: 1.12;
  margin-bottom: 28px;
}

.problem__body {
  font-size: clamp(16px, 1.8vw, 18px);
  color: var(--color-stone);
  line-height: 1.75;
  max-width: 62ch;
  margin-inline: auto;
}

.problem__body--coda {
  margin-top: 20px;
  font-size: clamp(17px, 2vw, 20px);
  color: var(--color-parchment);
  font-weight: 500;
  font-style: italic;
  font-family: var(--font-display);
}


/* ============================================================
   Screenshots
   ============================================================ */
.screenshots {
  padding-block: var(--pad-section);
}

.section-header {
  text-align: center;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(38px, 5.5vw, 60px);
  font-weight: 400;
  color: var(--color-espresso);
  line-height: 1.08;
  margin-bottom: 8px;
}

.section-subheading {
  font-size: 15px;
  color: var(--color-driftwood);
  font-style: italic;
}

.screenshots__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}

@media (min-width: 640px) {
  .screenshots__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.screenshot-card {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.screenshot-placeholder {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #F8F4ED;
  border: 1.5px solid var(--color-stone);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.screenshot-placeholder img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius) - 1px);
}

.screenshot-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--color-gold);
  color: var(--color-espresso);
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
}

.screenshot-label {
  font-size: 14px;
  color: var(--color-driftwood);
  font-style: italic;
}

.screenshot-caption {
  font-size: 13px;
  color: var(--color-driftwood);
  text-align: center;
  padding-inline: 4px;
  line-height: 1.4;
}


/* ============================================================
   Features
   ============================================================ */
.features {
  background: var(--color-parchment-alt);
  padding-block: var(--pad-section);
}

.features__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}

@media (min-width: 640px) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.feature-card {
  background: var(--color-parchment);
  border: 1.5px solid var(--color-stone);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 38px);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.feature-card__illustration {
  height: 136px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-card__illustration img {
  max-height: 136px;
  width: auto;
  object-fit: contain;
}

.feature-card__heading {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 27px);
  font-weight: 600;
  color: var(--color-espresso);
  line-height: 1.18;
  margin-bottom: 9px;
}

.feature-card__body {
  font-size: 15px;
  color: var(--color-walnut);
  line-height: 1.68;
}


/* ============================================================
   Beta
   ============================================================ */
.beta {
  background: var(--color-mahogany);
  padding-block: var(--pad-section);
}

.beta__header {
  text-align: center;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.beta__heading {
  font-family: var(--font-display);
  font-size: clamp(38px, 5.5vw, 60px);
  font-weight: 400;
  color: var(--color-parchment);
  line-height: 1.08;
  margin-bottom: 16px;
}

.beta__body {
  font-size: clamp(16px, 1.8vw, 18px);
  color: var(--color-stone);
  max-width: 54ch;
  margin-inline: auto;
  line-height: 1.68;
}

.beta__cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
  max-width: 820px;
  margin-inline: auto;
}

@media (min-width: 640px) {
  .beta__cards { grid-template-columns: repeat(2, 1fr); }
}

.beta-card {
  background: var(--color-surface-dark);
  border: 1px solid rgba(200, 191, 177, 0.14);
  border-radius: var(--radius);
  padding: clamp(28px, 3.5vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color var(--duration);
}
.beta-card:hover { border-color: rgba(200, 191, 177, 0.32); }

.beta-card__icon {
  color: var(--color-gold);
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.beta-card__heading {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.3vw, 25px);
  font-weight: 600;
  color: var(--color-parchment);
  line-height: 1.22;
}

.beta-card__body {
  font-size: 14px;
  color: var(--color-stone);
  line-height: 1.68;
  flex: 1;
}

.beta-card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin-top: 6px;
  padding: 10px 22px;
  color: var(--color-gold);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1.5px solid rgba(184, 134, 11, 0.7);
  border-radius: 6px;
  transition:
    background      var(--duration),
    color           var(--duration),
    border-color    var(--duration);
}
.beta-card__button:hover {
  background: var(--color-gold);
  color: var(--color-espresso);
  border-color: var(--color-gold);
}


/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--color-parchment);
  border-top: 1px solid var(--color-stone);
  padding-block: 44px;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 9px;
}
.footer__brand img { opacity: 0.8; }

.footer__name {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  color: var(--color-mahogany);
  letter-spacing: 0.01em;
}

.footer__links {
  display: flex;
  gap: 28px;
}

.footer__link {
  font-size: 13.5px;
  color: var(--color-driftwood);
  transition: color var(--duration);
}
.footer__link:hover { color: var(--color-mahogany); }

.footer__legal {
  font-size: 11.5px;
  color: var(--color-driftwood);
  line-height: 1.7;
  opacity: 0.8;
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .animate-in { opacity: 1; transform: none; }
}
