/* ============================================================
   Fireside Mail — landing page
   Warm-minimal: cream base, deep warm ink, single ember accent.
   ============================================================ */

:root {
  --bg:           #F4ECDE;  /* warm cream */
  --bg-soft:      #FBF6EE;  /* lighter section / cards */
  --card:         #FFFDF8;
  --ink:          #211C16;  /* warm near-black */
  --ink-2:        #6E6457;  /* muted body */
  --ink-3:        #978C7D;  /* faint meta */
  --ember:        #D9531E;  /* primary accent */
  --ember-strong: #BE4517;  /* hover */
  --ember-light:  #F2A65A;  /* inner flame / highlight */
  --ember-tint:   rgba(217, 83, 30, 0.10);
  --line:         rgba(33, 28, 22, 0.10);
  --line-soft:    rgba(33, 28, 22, 0.06);

  --shadow-card:  0 24px 60px -28px rgba(58, 38, 18, 0.45), 0 2px 8px -2px rgba(58, 38, 18, 0.10);
  --shadow-btn:   0 8px 20px -8px rgba(217, 83, 30, 0.65);

  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* photo focal point — tweak if the crop looks off */
  --hero-pos: 56% 50%;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}

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

/* ---------- Brand ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand__mark { width: 26px; height: 26px; display: block; }
.brand__name {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 0.97rem;
  font-weight: 600;
  line-height: 1;
  border: 0;
  border-radius: 12px;
  padding: 0.92rem 1.4rem;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.18s var(--ease), background-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.btn--primary {
  background: var(--ember);
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn--primary:hover { background: var(--ember-strong); transform: translateY(-1px); }
.btn--primary:active { transform: translateY(0); }

:focus-visible {
  outline: 2.5px solid var(--ember);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Nav ---------- */
.nav { position: relative; z-index: 5; }
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 26px;
  padding-bottom: 26px;
}
.nav__cta { padding: 0.7rem 1.15rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
/* desktop: full-bleed photo on the right */
.hero::before {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 58%;
  background: url("assets/hero.jpg") no-repeat;
  background-size: cover;
  background-position: var(--hero-pos);
  z-index: 0;
}
/* left-to-right cream scrim so the headline stays legible over the photo */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    var(--bg) 0%,
    var(--bg) 32%,
    rgba(244, 236, 222, 0.5) 46%,
    rgba(244, 236, 222, 0) 62%
  );
}

.hero__grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  align-items: center;
  gap: 48px;
  padding-top: 56px;
  padding-bottom: 88px;
  min-height: min(76vh, 720px);
}

.hero__content { max-width: 540px; }

.hero__title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.9rem, 6.2vw, 5rem);
  line-height: 1.03;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--ink);
}
.hero__sub {
  font-size: clamp(1.05rem, 1.5vw, 1.27rem);
  color: var(--ink-2);
  max-width: 30ch;
  margin: 1.15rem 0 1.9rem;
}

/* Hero visual (photo + inbox) */
.hero__visual {
  display: flex;
  justify-content: flex-end;
}
/* The inline photo is only used on mobile; desktop uses .hero::before. */
.hero__photo {
  display: none;
  width: 100%;
  object-fit: cover;
}

/* ---------- Waitlist form ---------- */
.waitlist {
  display: flex;
  gap: 10px;
  max-width: 460px;
}
.waitlist__input {
  flex: 1 1 auto;
  min-width: 0;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.92rem 1.05rem;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.waitlist__input::placeholder { color: var(--ink-3); }
.waitlist__input:focus {
  outline: none;
  border-color: var(--ember);
  box-shadow: 0 0 0 3px rgba(217, 83, 30, 0.16);
}
.waitlist.is-invalid .waitlist__input {
  border-color: #C0392B;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.14);
}
.waitlist__submit[aria-busy="true"] { opacity: 0.75; pointer-events: none; }

.form__note {
  min-height: 1.3rem;
  margin: 0.7rem 0 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-2);
}
.form__note.is-success { color: var(--ember-strong); }
.form__note.is-error { color: #C0392B; }

/* ---------- Inbox preview card ---------- */
.inbox {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  padding: 18px 18px 10px;
}
.inbox__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 14px;
}
.inbox__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 500;
}
.inbox__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ember); }
.inbox__compose { width: 20px; height: 20px; color: var(--ink-3); }

.inbox__list { list-style: none; margin: 0; padding: 0; }
.msg {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 6px;
  border-top: 1px solid var(--line-soft);
}
.msg__avatar {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--ink-2);
  font-size: 0.92rem;
  font-weight: 600;
}
.msg__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.msg__name { font-weight: 600; font-size: 0.95rem; }
.msg__subject {
  font-size: 0.9rem;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.msg__meta { flex: none; display: inline-flex; align-items: center; gap: 8px; }
.msg__time { font-size: 0.8rem; color: var(--ink-3); }
.msg__unread { width: 7px; height: 7px; border-radius: 50%; background: var(--ember); }

/* ---------- Values section ---------- */
.values {
  background: var(--bg-soft);
  border-top: 1px solid var(--line-soft);
  padding: 96px 0 104px;
}
.section-head { text-align: center; max-width: 30ch; margin: 0 auto 60px; }
.overline {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 14px;
}
.section-head__title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
}

.values__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px;
}
.feature__icon-wrap {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 13px;
  background: var(--ember-tint);
}
.feature__icon { width: 23px; height: 23px; color: var(--ember); }
.feature__title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 1.32rem;
  margin: 14px 0 6px;
}
.feature__copy { color: var(--ink-2); margin: 0; max-width: 30ch; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  padding: 96px 28px 80px;
}
.brand--footer .brand__mark { width: 22px; height: 22px; }
.brand--footer .brand__name { font-size: 1.3rem; }
.footer__tagline { color: var(--ink-2); margin: 0; font-size: 0.98rem; }
.footer__links { display: inline-flex; align-items: center; gap: 16px; font-size: 0.92rem; margin-top: 4px; }
.footer__links a { color: var(--ink-2); text-decoration: none; }
.footer__links a:hover { color: var(--ink); }
.footer__sep { color: var(--ink-3); }
.footer__legal { color: var(--ink-3); font-size: 0.82rem; margin: 8px 0 0; }

/* ---------- Entrance motion ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
@keyframes riseInbox {
  from { opacity: 0; transform: translateY(22px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}
.hero__content > * { animation: rise 0.7s var(--ease) both; }
.hero__content > *:nth-child(1) { animation-delay: 0.05s; }
.hero__content > *:nth-child(2) { animation-delay: 0.12s; }
.hero__content > *:nth-child(3) { animation-delay: 0.19s; }
.hero__content > *:nth-child(4) { animation-delay: 0.26s; }
.hero__content > *:nth-child(5) { animation-delay: 0.33s; }
.inbox { animation: riseInbox 0.85s var(--ease) 0.3s both; }

.feature { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.feature.is-visible { opacity: 1; transform: none; }
.feature:nth-child(2).is-visible { transition-delay: 0.08s; }
.feature:nth-child(3).is-visible { transition-delay: 0.16s; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .hero::before, .hero::after { display: none; }
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 32px;
    padding-bottom: 64px;
    min-height: 0;
  }
  .hero__content { max-width: 100%; }
  .hero__sub { max-width: 38ch; }

  /* One composed visual: photo backdrop with the inbox card overlapping it. */
  .hero__visual {
    position: relative;
    display: block;
    margin-top: 28px;
  }
  .hero__photo {
    display: block;
    position: static;
    width: 100%;
    max-width: none;
    height: 280px;
    border-radius: 24px;
    object-position: 60% 38%; /* keep the cup + shadows above the card */
  }
  .inbox {
    position: relative;
    width: 90%;
    max-width: 360px;
    margin: -78px auto 0; /* lift the card over the photo's lower edge */
  }

  .values { padding: 72px 0 76px; }
  .section-head { margin-bottom: 44px; }
  .values__grid { grid-template-columns: 1fr; gap: 40px; max-width: 420px; margin: 0 auto; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  /* Only narrow the gutters — using the `padding` shorthand here would reset
     the vertical padding of .container-based blocks (footer, hero). */
  .container { padding-left: 22px; padding-right: 22px; }
  .nav__inner { padding-top: 22px; padding-bottom: 22px; }
  .nav__cta { display: none; }
  .waitlist { flex-direction: column; }
  .waitlist__submit { width: 100%; }
  .hero__photo { height: 248px; }
  .inbox { width: 94%; margin-top: -68px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .feature { opacity: 1; transform: none; }
}
