/* =========================================================
   Custard — Warm Custard Bistro aesthetic
   ========================================================= */

:root {
  /* Palette */
  --cream: #f7ecd4;
  --cream-light: #fdf6e3;
  --cream-deep: #eeddb6;
  --caramel: #c78a3d;
  --caramel-deep: #8a5420;
  --ink: #241a12;
  --ink-soft: #4a382a;
  --raspberry: #e04a5f;
  --raspberry-deep: #b0354a;
  --mint: #a8c9a8;

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", "Georgia", serif;
  --font-body: "Geist", "Inter", system-ui, sans-serif;

  /* Shapes */
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-full: 999px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* =========================================================
   Shared elements
   ========================================================= */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--caramel-deep);
  margin: 0 0 18px;
}
.eyebrow--on-dark { color: var(--cream-light); }

.eyebrow__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--raspberry);
  box-shadow: 0 0 0 3px rgba(224, 74, 95, 0.15);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 16px;
  font-variation-settings: "opsz" 144;
}
.section-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--caramel-deep);
}

.section-lead {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 620px;
  margin: 0;
}

.section-head { max-width: 820px; margin-bottom: 64px; }
.section-head--center { text-align: center; margin-inline: auto; }
.section-head--center .eyebrow { justify-content: center; width: 100%; }

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 32px;
}

/* =========================================================
   Buttons
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.005em;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
  white-space: nowrap;
}

.btn--primary {
  background: var(--ink);
  color: var(--cream-light);
  box-shadow: 0 2px 0 var(--caramel-deep), 0 8px 20px -8px rgba(36, 26, 18, 0.4);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 0 var(--caramel-deep), 0 14px 28px -10px rgba(36, 26, 18, 0.5);
}
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  color: var(--ink);
  background: transparent;
  border: 1.5px solid rgba(36, 26, 18, 0.15);
}
.btn--ghost:hover {
  background: rgba(36, 26, 18, 0.04);
  border-color: rgba(36, 26, 18, 0.3);
}

.btn--large { padding: 16px 28px; font-size: 16px; }

/* =========================================================
   Nav
   ========================================================= */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: padding 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease), backdrop-filter 0.3s var(--ease);
}

.nav.is-scrolled {
  padding: 12px 0;
  background: rgba(247, 236, 212, 0.82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  box-shadow: 0 1px 0 rgba(36, 26, 18, 0.06);
}

.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.nav__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--cream-light);
  box-shadow: inset 0 -2px 0 rgba(36, 26, 18, 0.08);
}

.nav__wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.nav__links {
  display: flex;
  gap: 28px;
  font-size: 15px;
  color: var(--ink-soft);
}
.nav__links a { transition: color 0.15s var(--ease); }
.nav__links a:hover { color: var(--ink); }

.nav__cta {
  background: var(--ink);
  color: var(--cream-light);
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  transition: transform 0.2s var(--ease);
}
.nav__cta:hover { transform: translateY(-1px); }

@media (max-width: 720px) {
  .nav__links { display: none; }
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
  position: relative;
  min-height: 100svh;
  padding: 140px 32px 80px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(255, 211, 138, 0.45), transparent 55%),
    radial-gradient(ellipse at 85% 90%, rgba(224, 74, 95, 0.08), transparent 55%),
    var(--cream);
}

.hero__swirl {
  position: absolute;
  opacity: 0.6;
  animation: drift 24s linear infinite;
}
.hero__swirl--one {
  top: 12%; left: -40px;
  width: 220px;
}
.hero__swirl--two {
  bottom: 8%; right: -80px;
  width: 340px;
  animation-duration: 38s;
  animation-direction: reverse;
}

.hero__grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2' seed='3'/><feColorMatrix values='0 0 0 0 0.14 0 0 0 0 0.1 0 0 0 0 0.07 0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/></svg>");
  opacity: 0.22;
  mix-blend-mode: multiply;
}

.hero__inner {
  position: relative;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero__headline {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3rem, 8vw, 6.2rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin: 0 0 24px;
  font-variation-settings: "opsz" 144;
  animation: rise 0.9s var(--ease) both;
}
.hero__headline::first-letter { color: var(--caramel-deep); }

.hero__sub {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 520px;
  margin: 0 0 36px;
  animation: rise 0.9s var(--ease) 0.1s both;
}

.hero__ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  animation: rise 0.9s var(--ease) 0.2s both;
}

.hero .eyebrow { animation: rise 0.9s var(--ease) -0.1s both; }

/* Hero visual - the ramekin */

.hero__visual {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: rise 1.1s var(--ease) 0.3s both;
}

.ramekin {
  position: relative;
  width: 280px;
  height: 220px;
}

.ramekin__body {
  position: absolute;
  inset: 30px 0 0 0;
  background: linear-gradient(180deg, var(--caramel) 0%, var(--caramel-deep) 100%);
  border-radius: 0 0 140px 140px / 0 0 80px 80px;
  box-shadow:
    inset 0 -20px 30px rgba(0, 0, 0, 0.2),
    inset 10px 10px 20px rgba(255, 255, 255, 0.08),
    0 30px 60px -20px rgba(138, 84, 32, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Vertical ramekin ribbing */
.ramekin__body::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 18px,
    rgba(0, 0, 0, 0.08) 18px,
    rgba(0, 0, 0, 0.08) 22px
  );
  pointer-events: none;
}

.ramekin__top {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 60px;
  background:
    radial-gradient(ellipse at 50% 0%, #5a3a10 0%, #8a5420 25%, #c78a3d 60%, #e8c278 100%);
  border-radius: 50%;
  box-shadow:
    inset 0 4px 10px rgba(255, 255, 255, 0.2),
    0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 2;
  overflow: hidden;
}

/* Caramelised sugar cracks */
.ramekin__crack {
  position: absolute;
  background: rgba(40, 20, 5, 0.5);
  border-radius: 2px;
}
.ramekin__crack--1 {
  top: 20px; left: 30%;
  width: 40px; height: 2px;
  transform: rotate(-15deg);
}
.ramekin__crack--2 {
  top: 32px; left: 55%;
  width: 30px; height: 2px;
  transform: rotate(20deg);
}
.ramekin__crack--3 {
  top: 22px; left: 15%;
  width: 20px; height: 2px;
  transform: rotate(40deg);
}

.ramekin__label {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  color: rgba(253, 246, 227, 0.9);
  letter-spacing: 0.05em;
  z-index: 3;
}

.ramekin__play {
  position: relative;
  z-index: 2;
  background: var(--cream-light);
  border-radius: 50%;
  padding: 14px;
  box-shadow:
    0 8px 20px -6px rgba(0, 0, 0, 0.3),
    inset 0 -2px 0 rgba(0, 0, 0, 0.08);
  transition: transform 0.3s var(--ease);
}
.ramekin:hover .ramekin__play { transform: scale(1.08); }

.ramekin__shadow {
  position: absolute;
  bottom: -30px;
  left: 10%;
  right: 10%;
  height: 30px;
  background: radial-gradient(ellipse, rgba(36, 26, 18, 0.25) 0%, transparent 70%);
  filter: blur(8px);
}

/* Floating stat chips around the ramekin */
.floating-stat {
  position: absolute;
  background: var(--cream-light);
  border: 1px solid rgba(36, 26, 18, 0.08);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--ink);
  box-shadow: 0 8px 22px -8px rgba(36, 26, 18, 0.18);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  animation: float 5s ease-in-out infinite;
}
.floating-stat strong { font-weight: 600; color: var(--ink); }

.floating-stat__dot {
  width: 6px; height: 6px;
  background: var(--raspberry);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(224, 74, 95, 0.2);
  animation: pulse 1.8s ease-in-out infinite;
}

.floating-stat--one { top: 15%; left: -10%; animation-delay: 0s; }
.floating-stat--two { top: 45%; right: -8%; animation-delay: -1.5s; }
.floating-stat--three { bottom: 12%; left: 5%; animation-delay: -3s; }

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__visual { max-width: 320px; margin: 0 auto; }
  .floating-stat--one { left: -5%; }
  .floating-stat--two { right: -5%; }
}

/* =========================================================
   Features
   ========================================================= */

.features {
  position: relative;
  background: var(--cream-light);
  border-top: 1px solid rgba(36, 26, 18, 0.06);
  border-bottom: 1px solid rgba(36, 26, 18, 0.06);
}

.features__grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.feature-card {
  position: relative;
  background: var(--cream);
  padding: 32px 28px 36px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(36, 26, 18, 0.08);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background:
    repeating-linear-gradient(
      90deg,
      var(--caramel) 0 8px,
      var(--caramel-deep) 8px 12px
    );
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(199, 138, 61, 0.35);
  box-shadow: 0 20px 40px -20px rgba(36, 26, 18, 0.2);
}
.feature-card:hover::before { opacity: 1; }

.feature-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 16px;
  background: var(--cream-light);
  color: var(--caramel-deep);
  margin-bottom: 20px;
  box-shadow: inset 0 -2px 0 rgba(199, 138, 61, 0.2);
}

.feature-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
  color: var(--ink);
}

.feature-card__body {
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.55;
  margin: 0;
}

.feature-card__num {
  position: absolute;
  top: 20px; right: 24px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  color: var(--caramel);
  opacity: 0.7;
}

/* =========================================================
   How it works
   ========================================================= */

.how {
  position: relative;
  background: var(--cream);
}

.how__steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
}

.step {
  position: relative;
  padding: 32px 24px;
  background: var(--cream-light);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(36, 26, 18, 0.08);
}

.step__num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 56px;
  line-height: 1;
  color: var(--caramel);
  background: linear-gradient(180deg, var(--caramel) 0%, var(--caramel-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
  margin-bottom: 14px;
  font-variation-settings: "opsz" 144;
  letter-spacing: -0.03em;
}

.step__body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.015em;
  margin: 0 0 8px;
}

.step__body p {
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.55;
  margin: 0;
}

/* Decorative dotted line between steps */
.step__line {
  position: absolute;
  top: 60px;
  right: -32px;
  width: 32px;
  height: 20px;
  display: none;
}
.step:not(:last-child) .step__line { display: block; }

@media (max-width: 880px) {
  .how__steps { grid-template-columns: 1fr; }
  .step__line { display: none !important; }
}

/* =========================================================
   CTA
   ========================================================= */

.cta {
  padding: 40px 32px 80px;
  max-width: 1200px;
  margin: 0 auto;
}

.cta__card {
  position: relative;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(224, 74, 95, 0.25), transparent 60%),
    linear-gradient(135deg, #2a1d12 0%, #3d2817 100%);
  color: var(--cream-light);
  padding: 80px 48px;
  border-radius: var(--radius-lg);
  text-align: center;
  overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(36, 26, 18, 0.5);
}

.cta__decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
}
.cta__decor svg { width: 100%; height: 100%; }

.cta__headline {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
  font-variation-settings: "opsz" 144;
  position: relative;
}
.cta__headline br { display: block; }

.cta__sub {
  font-size: 17px;
  color: rgba(253, 246, 227, 0.75);
  max-width: 520px;
  margin: 0 auto 36px;
  position: relative;
}

.cta__form { position: relative; }

.cta__fields {
  display: flex;
  gap: 10px;
  max-width: 620px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.field {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 4px;
}
.field span {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(253, 246, 227, 0.55);
  padding-left: 18px;
}
.field input {
  font: inherit;
  font-size: 15px;
  padding: 14px 18px;
  background: rgba(253, 246, 227, 0.08);
  border: 1px solid rgba(253, 246, 227, 0.15);
  color: var(--cream-light);
  border-radius: var(--radius-full);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.field input::placeholder { color: rgba(253, 246, 227, 0.35); }
.field input:focus {
  outline: none;
  border-color: var(--raspberry);
  background: rgba(253, 246, 227, 0.12);
}

.cta__fields .btn--primary {
  background: var(--raspberry);
  color: var(--cream-light);
  box-shadow: 0 2px 0 var(--raspberry-deep), 0 10px 22px -8px rgba(224, 74, 95, 0.5);
  align-self: flex-end;
}
.cta__fields .btn--primary:hover {
  box-shadow: 0 4px 0 var(--raspberry-deep), 0 14px 28px -10px rgba(224, 74, 95, 0.6);
}

.cta__done {
  font-family: var(--font-display);
  font-size: 22px;
  font-style: italic;
  color: var(--cream-light);
  margin: 0;
}

/* =========================================================
   Footer
   ========================================================= */

.footer {
  padding: 40px 32px 60px;
  border-top: 1px solid rgba(36, 26, 18, 0.08);
  background: var(--cream);
}

.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer__mark {
  font-size: 32px;
  line-height: 1;
}

.footer__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  margin: 0;
}

.footer__tag {
  font-size: 14px;
  font-style: italic;
  color: var(--ink-soft);
  margin: 2px 0 0;
}

.footer__meta {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  color: var(--ink-soft);
}

.footer__meta a { transition: color 0.15s var(--ease); }
.footer__meta a:hover { color: var(--caramel-deep); }

/* =========================================================
   Animations
   ========================================================= */

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(224, 74, 95, 0.2); }
  50% { box-shadow: 0 0 0 6px rgba(224, 74, 95, 0.05); }
}

@keyframes drift {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Scroll-reveal (applied via JS) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
