/* ==========================================================================
   FAMM Café — landing page
   Mobile first. Breakpoints: 48em (768px) · 64em (1024px)
   ========================================================================== */

/* 1 · Tokens ------------------------------------------------------------- */
:root {
  --cream: #F7F3EB;
  --white: #FFFCF7;
  --sand: #EAE0D2;
  --brown: #54351F;
  --red: #B63D32;
  --olive: #777B58;
  --blush: #E4D0C5;           /* sampled from the van photograph's backdrop */

  --ink: var(--brown);
  --ink-soft: #6B5340;

  --serif: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Jost", "Avenir Next", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.25rem, 5vw, 5rem);
  --gap: clamp(1rem, 2.2vw, 2rem);
  --section-pad: clamp(5rem, 11vw, 11rem);
  --max: 90rem;

  --bar-h: 2.75rem;           /* announcement ribbon height */

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* 2 · Base --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
figure, h1, h2, p, dl, dd { margin: 0; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 100;
  padding: .6rem 1rem;
  background: var(--brown);
  color: var(--cream);
  font-size: .9rem;
  transition: top .2s;
}
.skip-link:focus { top: .75rem; }

/* 3 · Type --------------------------------------------------------------- */
.display,
.hero__title,
.quote {
  font-family: var(--serif);
  font-weight: 400;
  font-optical-sizing: auto;
  letter-spacing: -.02em;
}

.display {
  font-size: clamp(2.35rem, 8.6vw, 4rem);
  line-height: 1.02;
  text-wrap: balance;
}
.display > span { display: block; }

.lede {
  font-weight: 300;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  line-height: 1.5;
  letter-spacing: .005em;
  color: var(--ink-soft);
  max-width: 28ch;
  text-wrap: balance;
}

/* 4 · Layout helpers ----------------------------------------------------- */
.section {
  padding: var(--section-pad) var(--gutter);
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
}

.media {
  position: relative;
  overflow: hidden;
  overflow: clip;          /* unlike "hidden", lets grid rows size to the photo's real height */
  background: var(--sand);
}
.media img,
.parallax,
.parallax img {
  width: 100%;
  height: 100%;
}
.media img { object-fit: cover; }

/* 5 · Announcement ribbon + Header --------------------------------------- */
.announce {
  position: relative;
  z-index: 11;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .9rem;
  min-height: var(--bar-h);
  padding: .35rem var(--gutter);
  background: var(--brown);
  color: var(--cream);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.announce__tag { display: inline-flex; align-items: center; gap: .6rem; color: color-mix(in srgb, var(--cream) 78%, var(--brown)); }
.announce__dot {
  position: relative;
  width: .45rem;
  height: .45rem;
  border-radius: 50%;
  background: #E2685B;
}
.announce__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #E2685B;
  opacity: 0;
}
.announce__name {
  padding-left: .9rem;
  border-left: 1px solid color-mix(in srgb, var(--cream) 35%, transparent);
}
.announce__line { display: none; font-weight: 300; opacity: .85; }
.announce__arrow { font-size: 1rem; letter-spacing: 0; transform: translateY(-1px); }

@media (min-width: 48em) {
  .announce { font-size: .78rem; gap: 1.1rem; }
  .announce__line { display: inline; padding-left: 1.1rem; border-left: 1px solid color-mix(in srgb, var(--cream) 35%, transparent); }
}
@media (min-width: 64em) {
  .announce { --bar-h: 3rem; }
}

.site-header {
  position: absolute;
  inset: var(--bar-h) 0 auto 0;
  z-index: 10;
  padding: 1.25rem var(--gutter);
  pointer-events: none;
}
.brand { display: inline-block; pointer-events: auto; }
.brand img { height: 3.1rem; width: auto; }

/* 6 · Hero --------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-areas: "media" "copy";
  grid-template-rows: auto 1fr;
  min-height: calc(100svh - var(--bar-h));
  padding-top: 4.5rem;
  position: relative;
}

.hero__media {
  grid-area: media;
  /* photo takes whatever the first screen has left, so the text and scroll cue stay visible */
  height: clamp(13rem, calc(100svh - var(--bar-h) - 4.5rem - 18.5rem), 104vw);
  min-height: 13rem;
  overflow: hidden;
  background: var(--sand);
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }

.hero__copy {
  grid-area: copy;
  position: relative;
  padding: 1.4rem var(--gutter) 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero__title {
  font-size: clamp(2.6rem, 12.4vw, 4.4rem);
  line-height: .98;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.hero__title .line > span { display: inline-block; }

.hero__sub {
  margin-top: 1.5rem;
  font-weight: 300;
  font-size: clamp(1.05rem, 4.4vw, 1.25rem);
  letter-spacing: .01em;
  color: var(--ink-soft);
}
.hero__sub span { display: block; }

.scroll-cue {
  position: absolute;
  right: var(--gutter);
  bottom: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
  font-size: .8rem;
  letter-spacing: .12em;
  color: var(--ink-soft);
}
.scroll-cue__line {
  position: relative;
  width: 1px;
  height: 2.75rem;
  background: color-mix(in srgb, var(--brown) 22%, transparent);
  overflow: hidden;
}
.scroll-cue__line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--red);
  transform: translateY(-100%);
}

/* tablet portrait: stacked, with a taller photograph so nothing is cropped away */
@media (min-width: 48em) and (max-width: 63.99em) {
  .hero__media { height: clamp(18rem, calc(100svh - var(--bar-h) - 4.5rem - 26rem), 100vw); }
  .hero__title { font-size: clamp(3.8rem, 10.5vw, 6rem); }
  .hero__sub { font-size: 1.3rem; }
  .hero__copy { padding-bottom: 2.5rem; }
}

@media (min-width: 64em) {
  .hero {
    grid-template-areas: "copy media";
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    height: calc(100svh - var(--bar-h));
    min-height: 40rem;
    padding-top: 0;
  }
  .hero__media { height: 100%; min-height: 0; }
  .hero__copy {
    padding: 8rem 2rem 6rem var(--gutter);
    justify-content: center;
  }
  .hero__title { font-size: clamp(3.6rem, 5.7vw, 7.6rem); }
  .hero__title .line { white-space: nowrap; }
  .hero__sub { margin-top: 2.25rem; font-size: 1.3rem; }
  .brand img { height: 4rem; }
  .scroll-cue { right: auto; left: var(--gutter); bottom: 2.25rem; }
}

/* 6b · FAMM at Work (coming soon) ---------------------------------------- */
.work {
  position: relative;
  overflow: hidden;
  overflow: clip;
  background: var(--sand);
  padding: clamp(4.5rem, 10vw, 9rem) var(--gutter) clamp(3.5rem, 8vw, 7rem);
}
/* two thin concentric rings — a quiet nod to the round dough in the flour photograph */
.work::before,
.work::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--brown) 6%, transparent);
  pointer-events: none;
}
.work::before { width: min(120vw, 46rem); aspect-ratio: 1; right: -48%; top: -14%; }
.work::after  { width: min(84vw, 32rem);  aspect-ratio: 1; right: -30%; top: 1%; }

.work__inner {
  position: relative;
  max-width: var(--max);
  margin-inline: auto;
  display: grid;
  gap: 2.5rem;
}
.work__head { display: grid; gap: 1.4rem; justify-items: start; }

.work__badge {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .5rem 1.05rem .5rem .9rem;
  border: 1px solid color-mix(in srgb, var(--red) 55%, transparent);
  border-radius: 999px;
  color: var(--red);
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.work__badge i { width: .45rem; height: .45rem; border-radius: 50%; background: var(--red); }

.work__title {
  font-family: var(--serif);
  font-weight: 400;
  font-optical-sizing: auto;
  letter-spacing: -.03em;
  font-kerning: normal;
  font-size: clamp(4rem, 21vw, 8.5rem);
  line-height: .9;
}
.work__title span { display: block; }
.work__title em { font-style: italic; font-weight: 400; color: var(--red); padding-right: .04em; }

.work__tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.45rem, 5.6vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -.01em;
}

.work__body { display: grid; gap: 1.25rem; max-width: 36rem; }
.work__body p {
  font-weight: 300;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.65;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.work__body p:first-child { color: var(--ink); }

.work__place {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  margin-top: .75rem;
  padding-top: 1.5rem;
  border-top: 1px solid color-mix(in srgb, var(--brown) 22%, transparent);
  color: var(--ink) !important;
}
.work__place svg { flex: none; margin-top: .2rem; color: var(--red); }
.work__place strong { font-weight: 500; }

/* "Plan ahead. Eat well. Enjoy FAMM." */
.work__steps {
  display: grid;
  margin-top: .5rem;
  border-top: 1px solid color-mix(in srgb, var(--brown) 22%, transparent);
  font-family: var(--serif);
  font-size: clamp(1.9rem, 7.4vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -.02em;
}
.work__steps span {
  padding-block: 1.1rem;
  border-bottom: 1px solid color-mix(in srgb, var(--brown) 22%, transparent);
}
.work__steps em { font-style: italic; color: var(--red); }

@media (min-width: 64em) {
  .work__inner {
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--gap);
    row-gap: clamp(3.5rem, 6vw, 6rem);
    align-items: end;
  }
  .work__head { grid-column: 1 / 7; gap: 1.8rem; }
  .work__body { grid-column: 8 / 13; padding-bottom: .75rem; }
  .work__steps {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 0;
    font-size: clamp(2.2rem, 3.6vw, 3.6rem);
  }
  .work__steps span { padding: 1.9rem 0 .2rem; border-bottom: 0; }
  .work__steps span + span { padding-left: 2rem; border-left: 1px solid color-mix(in srgb, var(--brown) 22%, transparent); }
}

/* 7 · Philosophy --------------------------------------------------------- */
.philosophy { background: var(--white); max-width: none; }
.philosophy__grid {
  display: grid;
  gap: 2.5rem;
  max-width: var(--max);
  margin-inline: auto;
}
.philosophy__flour { aspect-ratio: 5 / 7; width: 86%; }
.philosophy__side { display: flex; flex-direction: column; gap: 2.5rem; }   /* normal flow: nothing can sit on top of the text */
.philosophy__copy { display: grid; gap: 1.75rem; }
.philosophy__copy .display { font-size: clamp(2.35rem, 9.4vw, 4.4rem); }

@media (min-width: 64em) {
  .philosophy__grid {
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--gap);
    align-items: start;
  }
  .philosophy__flour { grid-column: 1 / 7; width: 100%; }
  .philosophy__side {
    grid-column: 7 / 13;
    align-self: center;            /* text sits level with the middle of the photograph */
  }
  .philosophy__copy { gap: 2.25rem; padding-left: clamp(1rem, 4vw, 4.5rem); }
  .philosophy__copy .display { font-size: clamp(2.8rem, 4.3vw, 4.1rem); white-space: nowrap; }
}

/* 8 · A Taste of FAMM ---------------------------------------------------- */
.taste { background: var(--sand); max-width: none; }
.taste > * { max-width: var(--max); margin-inline: auto; }
.taste__head { display: grid; gap: 1.5rem; margin-bottom: clamp(3rem, 7vw, 6rem); }
.taste__head .display { font-size: clamp(2.35rem, 9.6vw, 4.6rem); }

.taste__gallery { display: flex; flex-direction: column; gap: 2.5rem; }
.taste__col { display: contents; }

.t-tuna { order: 1; aspect-ratio: 4 / 5; width: 80%; }
.t-caesar { order: 2; aspect-ratio: 3 / 4; width: 90%; margin-left: auto; }
.quote { order: 3; font-style: italic; font-size: clamp(2.1rem, 8.6vw, 3.2rem); line-height: 1.08; color: var(--red); padding-block: 1rem; }
.quote span { display: block; }
.t-mushrooms { order: 4; aspect-ratio: 4 / 5; width: 72%; }
.t-chicken { order: 5; aspect-ratio: 1; width: 86%; margin-left: auto; }

@media (min-width: 64em) {
  .taste__head {
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--gap);
    align-items: end;
  }
  .taste__head .display { grid-column: 1 / 9; font-size: clamp(3rem, 5.6vw, 6.4rem); }
  .taste__head .lede { grid-column: 9 / 13; padding-bottom: .9rem; max-width: 22ch; }

  .taste__gallery {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--gap);
    align-items: start;
  }
  .taste__col { display: flex; flex-direction: column; }
  .taste__col--a { grid-column: 1 / 6; gap: clamp(3rem, 6vw, 6rem); }
  .taste__col--b { grid-column: 7 / 13; gap: clamp(3rem, 6vw, 6rem); margin-top: clamp(5rem, 11vw, 11rem); }

  .t-tuna, .t-caesar, .t-mushrooms, .t-chicken { width: 100%; margin: 0; order: 0; }
  .quote { order: 0; font-size: clamp(2.6rem, 4vw, 4.6rem); padding-block: 0; }
  .t-chicken { width: 78%; margin-left: 22%; aspect-ratio: 5 / 4; }
  .t-mushrooms { width: 66%; margin-left: 4%; }
}

/* 9 · Beautiful Moments -------------------------------------------------- */
.moments { padding-bottom: calc(var(--section-pad) * .7); }
.moments__grid { display: grid; gap: 2.75rem; }
.moments__title { font-size: clamp(1.9rem, 8.3vw, 4.2rem); }
.moments__title span:nth-child(2) { padding-left: .4em; }
.moments__title span:nth-child(3) { padding-left: .8em; }
.moments__media { aspect-ratio: 1; margin-inline: calc(var(--gutter) * -1); }

@media (min-width: 64em) {
  .moments__grid {
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--gap);
    align-items: center;
  }
  .moments__title { grid-column: 1 / 7; font-size: clamp(2.8rem, 4.15vw, 4rem); white-space: nowrap; }
  .moments__title span:nth-child(2) { padding-left: .45em; }
  .moments__title span:nth-child(3) { padding-left: .9em; }
  .moments__media {
    grid-column: 7 / 13;
    margin-inline: 0 calc(var(--gutter) * -1);
  }
}
@media (min-width: 90em) {
  .moments__media { margin-right: calc((100vw - var(--max)) / -2); }
}

/* 10 · On the move ------------------------------------------------------- */
.van {
  position: relative;
  display: grid;
  background: linear-gradient(to bottom, var(--cream) 0, var(--blush) clamp(3rem, 9vw, 9rem), var(--blush) 100%);
  overflow: hidden;
}
.van__media {
  grid-area: 1 / 1;
  --fade: linear-gradient(to bottom, transparent 0, #000 12%, #000 80%, transparent 100%);
  --fade-x: linear-gradient(to right, transparent 0, #000 9%, #000 93%, transparent 100%);
  -webkit-mask-image: var(--fade), var(--fade-x);
  -webkit-mask-composite: source-in;
  mask-image: var(--fade), var(--fade-x);
  mask-composite: intersect;
}
.van__media img { width: 100%; height: auto; aspect-ratio: 1342 / 901; object-fit: cover; }

.van__copy {
  grid-area: 1 / 1;
  align-self: start;
  padding: clamp(3.5rem, 10vw, 5rem) var(--gutter) 0;
  position: relative;
  z-index: 2;
}
.van__copy .display { font-size: clamp(2.7rem, 11vw, 4.4rem); }
.van__copy .display span:nth-child(1),
.van__copy .display span:nth-child(2) { display: inline; }
.van__copy .display span:nth-child(2)::after { content: " "; }
.van__copy .display { max-width: 11ch; }

/* mobile: heading above the van, so the vehicle is never covered */
@media (max-width: 47.99em) {
  .van { grid-template-rows: auto auto; }
  .van__copy { grid-area: 1 / 1; padding-bottom: 0; }
  .van__media { grid-area: 2 / 1; margin-top: -.5rem; }
  .van { padding-bottom: clamp(2rem, 9vw, 3.5rem); }
  .van__media img { aspect-ratio: 1342 / 901; }
}

@media (min-width: 48em) {
  .van__media img { aspect-ratio: 1672 / 941; }
  .van__copy {
    align-self: center;
    padding-top: 0;
    padding-bottom: 6%;
  }
  .van__copy .display { font-size: clamp(2.6rem, 4.9vw, 6.2rem); max-width: none; }
  .van__copy .display span { display: block !important; }
  .van__copy .display span::after { content: none !important; }
}

/* 11 · Coming soon ------------------------------------------------------- */
.coming {
  display: grid;
  background: var(--brown);
  color: var(--cream);
}
.coming__media { aspect-ratio: 4 / 5; background: #3F2715; }
.coming__copy {
  padding: clamp(4rem, 12vw, 7rem) var(--gutter) clamp(4rem, 12vw, 7rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2.5rem;
}
.coming__copy .display { font-size: clamp(2.7rem, 11.6vw, 4.8rem); max-width: 12ch; }

.coming__details { display: grid; gap: 1.1rem; font-size: 1.05rem; }
.coming__details dt { font-size: .85rem; letter-spacing: .08em; opacity: .75; }
.coming__details dd { font-family: var(--serif); font-size: 1.4rem; }

@media (min-width: 64em) {
  .coming { grid-template-columns: 1fr 1fr; min-height: 100svh; }
  .coming__media { order: 0; aspect-ratio: auto; height: 100%; }
  .coming__copy { padding: 6rem var(--gutter) 7rem; justify-content: flex-end; }
  .coming__copy .display { font-size: clamp(3.4rem, 6.2vw, 8rem); max-width: 9ch; }
}

/* 12 · Footer ------------------------------------------------------------ */
.site-footer {
  display: grid;
  gap: 1rem;
  justify-items: start;
  padding: 3.5rem var(--gutter) calc(2.5rem + env(safe-area-inset-bottom));
  background: var(--cream);
  font-size: .95rem;
  color: var(--ink-soft);
}
.site-footer__brand img { height: 3.4rem; width: auto; }
.site-footer p { margin: 0; }

@media (min-width: 48em) {
  .site-footer {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    justify-items: center;
    padding-block: 3rem;
  }
  .site-footer__brand { justify-self: start; }
  .site-footer__legal { justify-self: end; }
}

/* 13 · Interaction (hover devices only) ---------------------------------- */
@media (hover: hover) and (pointer: fine) {
  .media img { transition: transform 1.1s var(--ease); }
  .media:hover img { transform: scale(1.04); }
  .hero__media img { transition: transform 1.1s var(--ease); }
  .hero__media:hover img { transform: scale(1.03); }
  .brand, .site-footer__brand { transition: opacity .3s; }
  .brand:hover, .site-footer__brand:hover { opacity: .7; }
}

/* 14 · Motion (only when the visitor hasn't asked for less) -------------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  /* Announcement ribbon: a soft pulse on the dot, a nudge on the arrow */
  .announce__dot::after { animation: pulse 2.8s var(--ease) infinite; }
  @keyframes pulse {
    0%   { transform: scale(1);   opacity: .55; }
    70%  { transform: scale(3.2); opacity: 0; }
    100% { transform: scale(3.2); opacity: 0; }
  }
  .announce__arrow { transition: transform .4s var(--ease); }
  .announce:hover .announce__arrow { transform: translate(4px, -1px); }

  /* Scroll cue */
  .scroll-cue__line::after { animation: cue 2.6s var(--ease) infinite 1.4s; }
  @keyframes cue {
    0%   { transform: translateY(-100%); }
    55%  { transform: translateY(0); }
    100% { transform: translateY(100%); }
  }

  /* Hero: one quick orchestrated moment on load */
  .js .hero__title .line > span {
    transform: translateY(105%);
    transition: transform .95s var(--ease);
    transition-delay: var(--d, 0s);
  }
  .js .hero__sub span,
  .js .scroll-cue {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .9s var(--ease) .55s, transform .9s var(--ease) .55s;
  }
  .js .hero__sub span + span { transition-delay: .65s; }
  .js .hero__media {
    clip-path: inset(0 0 100% 0);
    transition: clip-path 1.05s var(--ease);
  }

  .js.is-ready .hero__title .line > span { transform: none; }
  .js.is-ready .hero__sub span,
  .js.is-ready .scroll-cue { opacity: 1; transform: none; }
  .js.is-ready .hero__media { clip-path: inset(0); }

  /* Text reveals */
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .9s var(--ease), transform .9s var(--ease);
    transition-delay: var(--d, 0s);
  }
  .js [data-reveal].is-in { opacity: 1; transform: none; }

  /* Photograph reveals: a soft fade with a small rise.
     Only opacity + transform are animated, so the browser does it on the GPU
     and scrolling stays smooth (no clip-path / scale / parallax repaints). */
  .js [data-reveal-img] {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
    transition: opacity .8s var(--ease), transform .9s var(--ease);
    transition-delay: var(--d, 0s);
  }
  .js [data-reveal-img].is-in { opacity: 1; transform: none; }

  /* The van fades in without moving, so it never shifts over the heading */
  .js .van__media[data-reveal] { transform: none; }
}
