:root {
  /* Next Dough brand palette */
  --yellow: #f2d675;      /* Butter */
  --yellow-deep: #e8c95c;
  --cream: #f7f3e8;       /* Flour */
  --cream-2: #efe8d6;
  --crust: #392b23;       /* Crust */
  --crust-soft: #65554b;
  --blue: #355dc5;        /* Morning Blue */
  --blue-dark: #2a4ca8;
  --display: "Bowlby One", "Arial Black", system-ui, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, sans-serif;
  --gutter: clamp(16px, 4.2vw, 64px);
  --max: 1360px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--crust);
  background: var(--cream);
  font-size: 18px;
  line-height: 1.55;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- type ---------- */
.display {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 0.95;
}
.eyebrow {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin: 0 0 22px;
}

/* ---------- header ---------- */
.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
}
.site-header.solid { position: relative; background: var(--cream); }
.site-header .wrap {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-top: 26px;
  padding-bottom: 14px;
}
.logo { text-decoration: none; display: inline-block; }
.logo-img { display: block; width: clamp(132px, 13vw, 184px); height: auto; }
.logo-img--footer { width: 200px; }
.nav { display: flex; gap: clamp(18px, 3vw, 46px); padding-top: 18px; }
.nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 17px;
  padding-bottom: 6px;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav a:hover { border-bottom-color: currentColor; }
.nav a[aria-current="page"] { color: var(--blue); border-bottom-color: var(--blue); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 19px;
  padding: 17px 32px;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s, transform .2s;
}
.btn svg { width: 24px; height: 24px; transition: transform .25s; }
.btn:hover { background: var(--blue-dark); }
.btn:hover svg { transform: translateX(4px); }
.btn:focus-visible, .nav a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--crust);
  outline-offset: 3px;
}

/* ---------- home hero (loaf turns as the page scrolls) ---------- */
.hero-track { background: var(--yellow); position: relative; }
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  background: var(--yellow);
}
.hero .wrap {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  align-items: center;
  gap: 24px;
}
.hero-copy { padding-top: 120px; position: relative; z-index: 2; }
.hero h1 { font-size: clamp(48px, 5.2vw, 92px); margin-bottom: 30px; }
.hero .lede { font-size: clamp(18px, 1.5vw, 22px); margin-bottom: 30px; }

.loaf-stage {
  position: relative;
  aspect-ratio: 1;
  width: min(100%, 76vh);
  justify-self: center;
  margin-top: 40px;
}
.loaf-shadow {
  position: absolute;
  left: 12%; right: 8%;
  bottom: 6%;
  height: 14%;
  background: radial-gradient(closest-side, rgba(110, 72, 10, .45), rgba(110, 72, 10, 0));
  filter: blur(6px);
}
.loaf {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(var(--grow, 1));
  will-change: transform;
}

.loaf-stage.is-3d img.loaf { visibility: hidden; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  transition: opacity .3s;
}
.scroll-cue svg { width: 22px; height: 22px; animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(5px); } }

.spin-meter {
  position: absolute;
  right: 34px;
  top: 50%;
  height: 104px;
  width: 2px;
  background: rgba(57, 43, 35, .2);
  transform: translateY(20%);
}
.spin-meter span {
  display: block;
  width: 3px;
  margin-left: -0.5px;
  height: 100%;
  background: var(--blue);
  transform-origin: top;
  transform: scaleY(var(--progress, .05));
}

/* ---------- home: intro ---------- */
.section { padding: clamp(72px, 10vw, 140px) 0; }
.intro { text-align: center; background: var(--cream); }
.intro h2 { font-family: var(--display); font-weight: 400; font-size: clamp(32px, 3.6vw, 52px); line-height: 1.05; letter-spacing: -0.01em; margin-bottom: 20px; text-wrap: balance; }
.intro p { max-width: 640px; margin: 0 auto; color: var(--crust-soft); font-size: 20px; }

.steps {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  text-align: left;
  border-top: 2px solid var(--crust);
}
.step { padding: 28px 28px 8px 0; }
.step + .step { padding-left: 28px; border-left: 1px solid rgba(57, 43, 35, .2); }
.step-num { font-family: var(--display); font-weight: 400; font-size: 52px; letter-spacing: -0.01em; line-height: 1; color: var(--blue); }
.step h3 { font-family: var(--display); font-weight: 400; letter-spacing: -0.01em; font-size: 22px; line-height: 1.1; margin: 14px 0 8px; }
.step p { color: var(--crust-soft); font-size: 17px; }

/* ---------- bakes ---------- */
.bakes { background: var(--cream-2); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 32px; flex-wrap: wrap; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(44px, 5.6vw, 88px); }
.section-head p { max-width: 380px; margin: 0; color: var(--crust-soft); }
.bake-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--crust); }
.bake {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 32px;
  padding: 26px 0;
  border-bottom: 1px solid rgba(57, 43, 35, .2);
  transition: padding .25s, background .25s;
}
.bake:hover { padding-left: 14px; padding-right: 14px; background: var(--yellow); }
.bake h3 { font-family: var(--display); font-weight: 400; letter-spacing: -0.01em; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.05; }
.bake p { grid-column: 1; margin: 0; color: var(--crust-soft); max-width: 640px; }
.bake .price { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-weight: 600; font-size: 22px; }
.tag { display: inline-block; vertical-align: middle; margin-left: 10px; font-family: var(--body); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #fff; background: var(--blue); padding: 4px 9px; position: relative; top: -4px; }
.fine { margin-top: 28px; font-size: 15px; color: var(--crust-soft); }

/* ---------- band ---------- */
.band {
  background: var(--blue);
  color: #fff;
  overflow: hidden;
  padding: 18px 0;
}
.band-inner {
  display: flex;
  gap: 60px;
  white-space: nowrap;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.band span { font-family: var(--display); font-weight: 400; letter-spacing: -0.01em; font-size: clamp(28px, 3.6vw, 52px); line-height: 1.05; }
/* visually hidden, still read by screen readers */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.band.static .band-inner { animation: none; width: auto; justify-content: center; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- meet carly teaser ---------- */
.teaser { background: var(--yellow); }
.teaser .wrap { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.carly-portrait { max-width: 440px; aspect-ratio: 941 / 1542; }
.teaser h2 { font-size: clamp(42px, 4.8vw, 78px); margin-bottom: 24px; }
.teaser p { font-size: 20px; max-width: 560px; margin-bottom: 30px; }

/* ---------- say hello ---------- */
.hello .wrap { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(32px, 6vw, 96px); }
.hello h2 { font-size: clamp(48px, 5.8vw, 96px); margin-bottom: 24px; }
.hello-info p { color: var(--crust-soft); max-width: 420px; }
.hello-info dl { margin: 34px 0 0; display: grid; gap: 18px; }
.hello-info dt { font-size: 13px; letter-spacing: .28em; text-transform: uppercase; font-weight: 500; }
.hello-info dd { margin: 4px 0 0; font-size: 20px; font-weight: 500; }
form { display: grid; gap: 20px; background: #fff; padding: clamp(24px, 4vw, 44px); border-top: 6px solid var(--yellow); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
label { display: grid; gap: 8px; font-size: 14px; font-weight: 600; letter-spacing: .04em; }
input, textarea, select {
  font: inherit;
  font-size: 17px;
  font-weight: 400;
  color: var(--crust);
  background: var(--cream);
  border: 1px solid rgba(57, 43, 35, .25);
  border-radius: 0;
  padding: 14px 16px;
  width: 100%;
}
textarea { min-height: 120px; resize: vertical; }
.form-note { font-size: 14px; color: var(--crust-soft); margin: 0; }
.form-thanks { display: none; background: var(--yellow); padding: 16px 18px; font-weight: 500; margin: 0; }
form.sent .form-thanks { display: block; }

/* ---------- about page ---------- */
.about-hero { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - 118px); }
.about-hero .photo { position: relative; overflow: hidden; background: var(--cream); display: flex; align-items: flex-end; justify-content: center; padding: clamp(32px, 5vw, 72px) clamp(24px, 4vw, 64px) 0; }
.about-hero .carly-portrait { max-width: 500px; }
.carly-portrait--flip { transform: scaleX(-1); }
.about-hero .copy { background: var(--yellow); padding: clamp(40px, 6vw, 80px) var(--gutter) clamp(40px, 6vw, 80px) clamp(32px, 5vw, 76px); display: flex; flex-direction: column; justify-content: center; }
.about-hero h1 { font-size: clamp(42px, 4.4vw, 76px); margin-bottom: 28px; }
.about-hero .copy p { font-size: clamp(18px, 1.5vw, 22px); max-width: 640px; }
.about-hero .btn { align-self: flex-start; margin-top: 12px; }

.little-home .wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
.little-home h2 { font-size: clamp(44px, 5.2vw, 86px); }
.little-home p { font-size: clamp(22px, 2vw, 28px); margin: 0; line-height: 1.4; }

.values { background: var(--cream-2); }
.values-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 48px; }
.value { background: var(--cream); padding: 32px 28px; border-top: 6px solid var(--blue); }
.value h3 { font-family: var(--display); font-weight: 400; letter-spacing: -0.01em; font-size: 24px; line-height: 1; margin-bottom: 12px; }
.value p { color: var(--crust-soft); margin: 0; }

.family { background: var(--yellow); }
.family-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--crust); margin-top: 48px; }
.member { padding: 26px 22px 6px 0; }
.member + .member { padding-left: 22px; border-left: 1px solid rgba(57, 43, 35, .25); }
.member .role { font-size: 13px; letter-spacing: .26em; text-transform: uppercase; font-weight: 500; margin: 0 0 8px; }
.member h3 { font-family: var(--display); font-weight: 400; letter-spacing: -0.01em; font-size: 34px; line-height: 1; margin-bottom: 10px; }
.member p { margin: 0; font-size: 16px; }

/* Family line drawing: strokes draw in top to bottom, then the exact drawing settles in */
.family-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  margin-top: 48px;
}
.family-layout .family-grid { margin-top: 0; grid-template-columns: 1fr 1fr; }
.family-layout .member:nth-child(3) { padding-left: 0; border-left: 0; }
.family-layout .member:nth-child(n+3) { border-top: 1px solid rgba(57, 43, 35, .25); }
.line-art {
  position: relative;
  margin: 0;
  width: 100%;
  justify-self: center;
  -webkit-mask-image: linear-gradient(to bottom, #000 86%, transparent);
  mask-image: linear-gradient(to bottom, #000 86%, transparent);
}
.family-portrait { max-width: 430px; aspect-ratio: 941 / 1672; }
.line-art svg, .line-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.line-strokes { opacity: 0; }
.js .line-strokes { opacity: 1; }
.js .line-strokes path { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; }
.js .line-final { opacity: 0; }
.js .line-art.drawn path {
  animation: sketch 0.8s cubic-bezier(.45, .05, .35, 1) both;
  animation-delay: calc(var(--t) * 2.6s);
}
.js .line-art.drawn .line-strokes { animation: fade-out 0.7s ease 3.3s both; }
.js .line-art.drawn .line-final { animation: fade-in 0.7s ease 3.2s both; }
@keyframes sketch {
  0% { stroke-dashoffset: 1; opacity: 0; }
  2% { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }


/* ---------- footer ---------- */
.site-footer { background: var(--crust); color: var(--cream); padding: 64px 0 40px; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }

.site-footer h4 { margin: 0 0 14px; font-size: 13px; letter-spacing: .28em; text-transform: uppercase; font-weight: 500; color: var(--yellow); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid rgba(246, 243, 232, .2); padding-top: 22px; font-size: 14px; opacity: .7; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  body { font-size: 17px; }
  .nav { padding-top: 10px; gap: 16px; }
  .nav a { font-size: 15px; }
  .hero .wrap { grid-template-columns: 1fr; align-content: center; gap: 0; }
  .hero-copy { padding-top: 110px; order: 1; }
  .loaf-stage { order: 2; width: min(78vw, 40vh); margin-top: 0; }
  .hero h1 { margin-bottom: 18px; }
  .hero .lede { margin-bottom: 20px; }
  .spin-meter { display: none; }
  .scroll-cue { display: none; }
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 24px 0 4px; border-left: 0; border-bottom: 1px solid rgba(57, 43, 35, .2); }
  .teaser .wrap, .hello .wrap, .little-home .wrap { grid-template-columns: 1fr; }
  .carly-portrait { max-width: 340px; }
  .about-hero { grid-template-columns: 1fr; min-height: 0; }
  .about-hero .photo { padding-top: 32px; }
  .about-hero .carly-portrait { max-width: 340px; }
  .values-grid { grid-template-columns: 1fr; }
  .family-grid { grid-template-columns: 1fr 1fr; }
  .member:nth-child(3) { padding-left: 0; border-left: 0; }
  .family-layout { grid-template-columns: 1fr; }
  .family-portrait { max-width: 380px; }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
  .site-footer .wrap > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .site-header .wrap { flex-direction: column; gap: 6px; padding-top: 18px; }
  .nav { padding-top: 6px; }
  .hero-copy { padding-top: 172px; }
  .hero h1 { font-size: clamp(40px, 11vw, 56px); }
  .eyebrow { font-size: 12px; letter-spacing: .24em; }
  .btn { font-size: 17px; padding: 15px 24px; }
  .row { grid-template-columns: 1fr; }
  .bake { grid-template-columns: 1fr; }
  .bake .price { grid-row: auto; grid-column: 1; }
  .family-grid, .family-layout .family-grid { grid-template-columns: 1fr; }
  .family-layout .member:nth-child(n+3) { border-top: 0; }
  .member, .member + .member { padding: 22px 0 6px; border-left: 0; border-bottom: 1px solid rgba(57, 43, 35, .25); }
}

@media (prefers-reduced-motion: reduce) {
  .band-inner { animation: none; }
  .scroll-cue svg { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .js .line-strokes { display: none; }
  .js .line-final { opacity: 1; animation: none !important; }
}
