/* ================================================
   DANGUOLĖ — Home Page
   ================================================ */


/* ---- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}


/* ================================================================
   HERO — Centered brand mark + auto-scroll product ticker
   ================================================================ */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background-color: transparent; /* marble body background shows through */
}

/* ---- Centered brand stage ---- */
.hero__stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--navbar-h) + var(--sp-5)) var(--sp-3) var(--sp-4);
  position: relative;
  overflow: hidden;
}

.hero__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero__eyebrow {
  margin-bottom: var(--sp-4);
  opacity: 0;
  transition: opacity 0.9s var(--ease-out) 0.1s;
}
body.is-ready .hero__eyebrow { opacity: 1; }

/* The main brand name — massive */
.hero__name {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 10vw, 9rem);
  font-weight: 700;
  letter-spacing: 0.3em;
  line-height: 1;
  color: var(--charcoal);
  margin: 0;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1s var(--ease-out) 0.15s, transform 1s var(--ease-out) 0.15s;
}
body.is-ready .hero__name { opacity: 1; transform: translateY(0); }

/* Submark under the logo */
.hero__submark-line {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--taupe);
  margin-top: var(--sp-1);
  opacity: 0;
  transition: opacity 0.9s var(--ease-out) 0.28s;
}
body.is-ready .hero__submark-line { opacity: 1; }

/* Thin horizontal rule separator */
.hero__rule {
  display: block;
  width: 36px;
  height: 1px;
  background-color: var(--warm-grey);
  margin: var(--sp-4) auto;
  opacity: 0;
  transition: opacity 0.9s var(--ease-out) 0.4s;
}
body.is-ready .hero__rule { opacity: 1; }

/* Italic tagline */
.hero__tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1rem, 2.2vw, 1.6rem);
  color: var(--taupe);
  line-height: 1.35;
  margin-bottom: var(--sp-5);
  opacity: 0;
  transition: opacity 0.9s var(--ease-out) 0.48s;
}
body.is-ready .hero__tagline { opacity: 1; }

/* CTA links */
.hero__ctas {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.9s var(--ease-out) 0.6s;
}
body.is-ready .hero__ctas { opacity: 1; }

/* Shared text-link style (also used in steps + gallery CTA) */
.hero__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1px solid currentColor;
  transition: gap var(--dur-base) var(--ease), color var(--dur-base) var(--ease), opacity var(--dur-base) var(--ease);
  white-space: nowrap;
  cursor: pointer;
}
.hero__link:hover { gap: 0.85em; }
.hero__link--primary { color: var(--forest); }
.hero__link--primary:hover { color: var(--ink); border-color: var(--ink); }
.hero__link:not(.hero__link--primary) { color: var(--taupe); }
.hero__link:not(.hero__link--primary):hover { color: var(--charcoal); border-color: var(--charcoal); }


/* ---- Auto-scroll ticker ---- */
.hero__ticker {
  position: relative;
  overflow: hidden;
  height: 36vh;
  min-height: 180px;
  max-height: 420px;
  flex-shrink: 0;
}

/* Pause on hover */
.hero__ticker:hover .hero__track { animation-play-state: paused; }

.hero__track {
  display: flex;
  align-items: stretch;
  gap: 10px;
  width: max-content;
  height: 100%;
  animation: ticker-scroll 32s linear infinite;
  will-change: transform;
}

/* Each photo slide */
.hero__slide {
  flex-shrink: 0;
  /* portrait 3:4 ratio based on container height */
  width: calc(36vh * 0.75);
  min-width: 130px;
  max-width: 315px;
  height: 100%;
  overflow: hidden;
  background-color: var(--linen);
}

.hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); } /* -50% = scroll one set (7 slides) */
}

@media (prefers-reduced-motion: reduce) {
  .hero__track { animation: none; }
}

/* Edge gradient fades — Step 2b: smaller min so 320px phones aren't crushed */
.hero__fade {
  position: absolute;
  inset-block: 0;
  width: clamp(32px, 8vw, 140px);
  pointer-events: none;
  z-index: 2;
}
.hero__fade--l {
  left: 0;
  background: linear-gradient(to right, #F9F8F6 20%, transparent);
}
.hero__fade--r {
  right: 0;
  background: linear-gradient(to left, #F9F8F6 20%, transparent);
}


/* ================================================================
   STEPS — Compact 3-column horizontal block
   ================================================================ */

.steps {
  background-color: rgba(240, 239, 235, 0.25);
  border-top: 1px solid var(--gold);
  padding-block: var(--sp-6) var(--sp-7);
}

.steps__container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--sp-3);
}
@media (min-width: 768px)  { .steps__container { padding-inline: var(--sp-5); } }
@media (min-width: 1200px) { .steps__container { padding-inline: var(--sp-6); } }

.steps__eyebrow { margin-bottom: var(--sp-4); }

.steps__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--warm-grey);
}

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

.steps__step {
  padding: var(--sp-5) var(--sp-4);
  border-top: 1px solid var(--warm-grey);
}

@media (min-width: 640px) {
  .steps__step { border-top: none; border-left: 1px solid var(--warm-grey); }
  .steps__step:first-child { border-left: none; padding-left: 0; }
}

.steps__num {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 700;
  color: var(--warm-grey);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: var(--sp-3);
}

.steps__title {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 400;
  color: var(--charcoal);
  line-height: 1.25;
  margin-bottom: var(--sp-2);
}

.steps__desc {
  font-size: var(--text-sm);
  color: var(--taupe);
  line-height: 1.78;
}

.steps__foot {
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--warm-grey);
}

/* ================================================================
   STEPS — Mobile: sticky scroll-through card stack
   Cards overlap as you scroll; JS fades out the card below.
   ================================================================ */
@media (max-width: 639px) {
  /* Bypass the generic reveal — JS owns opacity on mobile */
  .steps__step.reveal,
  .steps__step.reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .steps__grid {
    display: block;
    border-top: none;
  }

  .steps__step {
    position: sticky;
    top: 18vh;
    border-top: none;
    background: var(--cream);
    box-shadow: 0 3px 28px rgba(44, 43, 40, 0.10);
    /* scroll distance between cards */
    margin-bottom: 20vh;
  }
  .steps__step:nth-child(1) { z-index: 1; }
  .steps__step:nth-child(2) { z-index: 2; }
  .steps__step:nth-child(3) { z-index: 3; margin-bottom: 0; }
}


/* ================================================================
   GALLERY — asymmetric editorial 12-column grid
   ================================================================ */

.gallery {
  background-color: rgba(240, 239, 235, 0.25);
  border-top: 1px solid var(--gold);
  padding-block: var(--sp-8);
  position: relative;
  overflow: hidden;
}

.gallery__container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--sp-3);
}
@media (min-width: 768px)  { .gallery__container { padding-inline: var(--sp-5); } }
@media (min-width: 1200px) { .gallery__container { padding-inline: var(--sp-6); } }

/* Editorial left+right header */
.gallery__header {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
  border-bottom: 1px solid var(--warm-grey);
  padding-bottom: var(--sp-5);
  margin-bottom: var(--sp-5);
}
.gallery__header .eyebrow { margin-bottom: var(--sp-1); }

.gallery__title {
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.gallery__header-desc {
  font-size: var(--text-sm);
  color: var(--taupe);
  line-height: 1.75;
  align-self: end;
  max-width: 42ch;
}

@media (min-width: 768px) {
  .gallery__header { grid-template-columns: 1fr 1fr; align-items: end; }
}

/* ---- 12-col grid ---- */
.gallery__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-2);
}

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

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

/* ---- Gallery item ---- */
.gallery__item { display: flex; flex-direction: column; }

.gallery__img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background-color: var(--linen);
}

.gallery__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--dur-slow) var(--ease);
  will-change: transform;
}
.gallery__item:hover .gallery__img-wrap img { transform: scale(1.04); }

/* Mobile: show full image at its natural dimensions — no cropping */
@media (max-width: 599px) {
  .gallery__img-wrap {
    aspect-ratio: unset;
    overflow: visible;
  }
  .gallery__img-wrap img {
    height: auto;
    object-fit: initial;
  }
}

.gallery__img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(44, 43, 40, 0);
  transition: background-color var(--dur-base) var(--ease);
  pointer-events: none;
}
.gallery__item:hover .gallery__img-wrap::after { background-color: rgba(44, 43, 40, 0.04); }

.gallery__caption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--warm-grey);
  gap: var(--sp-2);
}

.gallery__tag {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--forest);
}

.gallery__caption p {
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  font-style: italic;
  color: var(--taupe);
  white-space: nowrap;
}

/* ---- CTA below gallery ---- */
.gallery__cta {
  margin-top: var(--sp-7);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-3);
}

.gallery__cta-question {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-style: italic;
  font-weight: 400;
  color: var(--charcoal);
  line-height: 1.25;
  max-width: 22ch;
}


/* ================================================================
   HOME STUDIO — Embedded customizer + dual CTA
   ================================================================ */

/* ================================================================
   ORNAMENTS — decorative botanical wreaths, parallax depth
   ================================================================ */

.ornament {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

.ornament__img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.07;
  mix-blend-mode: multiply; /* dissolves white bg, leaves only line art */
}

/* Hero — centered behind the brand name */
.ornament--hero .ornament__img { opacity: 0.081; }

.ornament--hero {
  width: clamp(360px, 58vw, 720px);
  top: 50%;
  left: 50%;
  margin-top: calc(clamp(360px, 58vw, 720px) / -2);
  margin-left: calc(clamp(360px, 58vw, 720px) / -2);
}

/* Hero name smaller on mobile — tighter size + spacing so it breathes */
@media (max-width: 600px) {
  .hero__name {
    font-size: clamp(2.4rem, 9vw, 9rem);
    letter-spacing: 0.18em;
  }
}

/* Step 2a: Scale ornament down on small phones — 360px min overflows 320px viewport */
@media (max-width: 480px) {
  .ornament--hero {
    width: clamp(240px, 72vw, 340px);
    margin-top: calc(clamp(240px, 72vw, 340px) / -2);
    margin-left: calc(clamp(240px, 72vw, 340px) / -2);
  }
}

/* Studio section — top-right corner bleed */
.ornament--studio {
  width: clamp(260px, 32vw, 480px);
  top: -60px;
  right: -80px;
  opacity: 1; /* controlled on the img */
}
.ornament--studio .ornament__img { opacity: 0.055; }

/* Gallery section — bottom-left corner bleed */
.ornament--gallery {
  width: clamp(240px, 28vw, 420px);
  bottom: 60px;
  left: -60px;
}
.ornament--gallery .ornament__img { opacity: 0.05; }


/* ================================================================
   HOME STUDIO
   ================================================================ */

.home-studio {
  background-color: rgba(247, 245, 241, 0.25);
  border-top: 1px solid var(--gold);
  padding-block: var(--sp-7) var(--sp-8);
  position: relative;
  overflow: hidden;
}

.home-studio__container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--sp-3);
}
@media (min-width: 768px)  { .home-studio__container { padding-inline: var(--sp-5); } }
@media (min-width: 1200px) { .home-studio__container { padding-inline: var(--sp-6); } }

/* ── Header ── */
.home-studio__header {
  text-align: center;
  margin-bottom: var(--sp-6);
}
.home-studio__header .eyebrow { margin-bottom: var(--sp-2); }

.home-studio__title {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  margin-bottom: var(--sp-3);
  line-height: 1.12;
}

.home-studio__sub {
  font-size: var(--text-sm);
  color: var(--taupe);
  max-width: 48ch;
  margin-inline: auto;
  line-height: 1.78;
}

/* ── Studio layout — panel + canvas ── */
.home-studio__layout {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--warm-grey);
  overflow: hidden;
}

@media (min-width: 900px) {
  .home-studio__layout {
    flex-direction: row;
    height: 620px;
  }
}

/* Override custm-panel inside homepage layout */
.home-studio__layout .custm-panel {
  order: 2;
  max-height: clamp(260px, 48vh, 420px); /* Step 3a: was 42vh — too cramped on short phones */
  overflow-y: auto;
  background-color: var(--cream);
  border-top: 1px solid var(--warm-grey);
  border-right: none;
  width: auto;
}
@media (min-width: 900px) {
  .home-studio__layout .custm-panel {
    order: 1;
    width: 280px;
    max-height: none;
    height: 100%;
    border-top: none;
    border-right: 1px solid var(--warm-grey);
    flex-shrink: 0;
  }
}

/* Zoom rail — top on mobile, right wall on desktop */
.home-studio__layout .custm-zoom-rail {
  order: 0; /* sits above the stage on mobile */
}
@media (min-width: 900px) {
  .home-studio__layout .custm-zoom-rail {
    order: 3; /* right wall in the row layout */
  }
}

/* Override custm-stage inside homepage layout */
.home-studio__layout .custm-stage {
  order: 1;
  flex: 1;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--alabaster);
  overflow: hidden;
  position: relative;
}
@media (min-width: 900px) {
  .home-studio__layout .custm-stage {
    order: 2;
    min-height: 0;
  }
}

/* Canvas host must not stretch to fill stage height — landscape canvas is shorter */
.home-studio__layout .custm-canvas-host {
  flex: 0 0 auto;
  overflow: visible;
}

/* ── Dual CTA ── */
.home-studio__ctas {
  display: flex;
  flex-direction: column;
  margin-top: var(--sp-5);
  margin-bottom: 20px;
  border: 1px solid var(--warm-grey);
}
@media (min-width: 600px) {
  .home-studio__ctas { flex-direction: row; align-items: stretch; }
}

.home-studio__option {
  flex: 1;
  padding: var(--sp-5) var(--sp-4);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-2);
}
.home-studio__option--primary {
  background-color: var(--forest);
  color: var(--off-white);
}

.home-studio__option-label {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 400;
  line-height: 1.2;
  color: inherit;
}

.home-studio__option-desc {
  font-size: var(--text-sm);
  color: var(--taupe);
  line-height: 1.75;
  flex: 1;
}
.home-studio__option--primary .home-studio__option-desc {
  color: rgba(250, 250, 248, 0.6);
}

.home-studio__option .hero__link {
  margin-top: var(--sp-1);
  color: var(--charcoal);
  border-bottom-color: var(--charcoal);
}
.home-studio__option--primary .hero__link {
  color: var(--off-white);
  border-bottom-color: rgba(250, 250, 248, 0.6);
}
.home-studio__option--primary .hero__link:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.home-studio__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-2) var(--sp-3);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-sm);
  color: var(--taupe);
  border-top: 1px solid var(--warm-grey);
  border-bottom: 1px solid var(--warm-grey);
  background-color: var(--cream);
  flex-shrink: 0;
}
@media (min-width: 600px) {
  .home-studio__divider {
    padding: var(--sp-3) var(--sp-2);
    border-top: none;
    border-bottom: none;
    border-left: 1px solid var(--warm-grey);
    border-right: 1px solid var(--warm-grey);
    writing-mode: vertical-rl;
  }
}

.home-studio__option {
  cursor: pointer;
  transition: background-color var(--dur-base) var(--ease), color var(--dur-base) var(--ease);
}


/* ================================================================
   INLINE FORM MODE — overrides for form embedded inside the section
   ================================================================ */

#mode-form {
  position: relative;
  border: 1px solid var(--warm-grey);
  display: flex;
  flex-direction: column;
  min-height: 560px;
  overflow: hidden;
  margin-bottom: var(--sp-5);
}

@media (min-width: 900px) {
  #mode-form { height: 660px; min-height: 0; }
}

/* Content area — no scroll, fills remaining height */
#mode-form form {
  flex: 1;
  overflow: hidden;
  min-height: 0;
  padding: 0 calc(56px + var(--sp-3));
}

@media (min-width: 900px) {
  #mode-form form { padding: 0 calc(64px + var(--sp-4)); }
}

/* Success screen fills the same flex space */
#mode-form #step-success {
  flex: 1;
  min-height: 0;
}

#mode-form .fstep {
  min-height: 0;
  height: 100%;
  padding-top: var(--sp-4);
  padding-bottom: var(--sp-4);
  align-items: stretch;
  justify-content: center;
}

#mode-form .fstep__inner {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

/* Eyebrow + title on one line */
#mode-form .fstep__head {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

#mode-form .fstep__eyebrow {
  margin-bottom: 0;
  flex-shrink: 0;
}

#mode-form .fstep__title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin-bottom: 0;
  line-height: 1.15;
}

#mode-form .fstep__sub {
  font-size: var(--text-sm);
  margin-top: 0;
  margin-bottom: var(--sp-3);
}

/* Occasion list */
#mode-form .ogrid {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--warm-grey);
}

#mode-form .ogrid .ocard {
  display: block;
  cursor: pointer;
  position: relative;
  background-color: var(--cream);
  border-bottom: 1px solid var(--warm-grey);
  transition: background-color var(--dur-base) var(--ease);
}

#mode-form .ogrid .ocard:last-child { border-bottom: none; }

#mode-form .ogrid .ocard input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

#mode-form .ogrid .ocard__name {
  display: block;
  padding: 0.6rem 0.75rem;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--charcoal);
  text-align: left;
  line-height: 1.2;
  border-left: 2px solid transparent;
  transition: border-left-color var(--dur-base) var(--ease), color var(--dur-base) var(--ease);
}

#mode-form .ogrid .ocard:hover { background-color: var(--alabaster); }

#mode-form .ogrid .ocard input:checked ~ .ocard__name {
  border-left-color: var(--forest);
  color: var(--forest);
  background-color: var(--alabaster);
}

#mode-form .ogrid .ocard input:focus-visible ~ .ocard__name {
  outline: 2px solid var(--forest);
  outline-offset: -2px;
}

/* Conditional reveal — age + occasion-other */
#mode-form #age-wrap:not([hidden]),
#mode-form #occasion-other-wrap:not([hidden]) {
  animation: fieldReveal 320ms var(--ease) both;
}

@keyframes fieldReveal {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Photo upload — drop zone + preview */
#mode-form .fupload {
  position: relative;
  margin-top: 4px;
}

#mode-form .fupload__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

#mode-form .fupload__drop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3);
  border: 1px dashed var(--warm-grey);
  background-color: transparent;
  color: var(--taupe);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition:
    background-color var(--dur-base) var(--ease),
    border-color var(--dur-base) var(--ease),
    color var(--dur-base) var(--ease);
}

#mode-form .fupload__drop:hover,
#mode-form .fupload.is-dragover .fupload__drop {
  background-color: var(--alabaster);
  border-color: var(--forest);
  color: var(--forest);
}

#mode-form .fupload__input:focus-visible + .fupload__drop {
  outline: 2px solid var(--forest);
  outline-offset: 2px;
}

#mode-form .fupload__icon { flex-shrink: 0; }

#mode-form .fupload__preview {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2);
  border: 1px solid var(--warm-grey);
  background-color: var(--alabaster);
}

#mode-form .fupload__thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  flex-shrink: 0;
}

#mode-form .fupload__remove {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--warm-grey);
  background-color: var(--cream);
  color: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--dur-base) var(--ease), color var(--dur-base) var(--ease);
}

#mode-form .fupload__remove:hover {
  background-color: var(--charcoal);
  color: var(--cream);
  border-color: var(--charcoal);
}

/* Hint text under labels */
#mode-form .fhint {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.72rem;
  color: var(--taupe);
  margin: 2px 0 4px;
  line-height: 1.3;
}

/* Mood cards — breathe a bit more */
#mode-form .mood-grid { margin-bottom: 0; }
#mode-form .mcard__body { padding: var(--sp-3) var(--sp-3); }
#mode-form .mcard__name { font-size: var(--text-base); }
#mode-form .mcard__sub  { font-size: 0.7rem; margin-top: 2px; }

/* Fields — comfortable spacing */
#mode-form .ffields { gap: var(--sp-3); margin-top: 0; }
#mode-form .frow    { gap: var(--sp-3); }
#mode-form .fstep__field { gap: 6px; }
#mode-form .finput  { padding: 8px 0; font-size: var(--text-base); }
#mode-form .finput--area { min-height: 84px; }
#mode-form .flegal  { margin-top: var(--sp-3); padding-top: var(--sp-2); font-size: 0.65rem; }


/* ── Quiz progress strip — eyebrow + title + thin progress line ── */
.form-progress-strip {
  position: relative;
  padding: var(--sp-3) calc(56px + var(--sp-3));
  border-bottom: 1px solid var(--warm-grey);
  text-align: center;
  flex-shrink: 0;
}

@media (min-width: 900px) {
  .form-progress-strip { padding: var(--sp-3) calc(64px + var(--sp-4)); }
}

.form-progress-head {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  max-width: 100%;
}

.form-progress-head__title {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 2vw, 1.5rem);
  color: var(--charcoal);
  line-height: 1.2;
}

.form-progress-head__num {
  color: var(--taupe);
  margin-right: 0.4em;
}

/* Success state — single tick */
.form-progress-head.is-success {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--forest);
}

.form-inline-progress__fill {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 2px;
  background-color: var(--forest);
  transition: width 360ms var(--ease);
}

@media (max-width: 599px) {
  .form-progress-head__title { font-size: 0.95rem; }
}


/* ── Side nav buttons — vertical center, on the edges ── */
.fnav-side {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--cream);
  border: 1px solid var(--warm-grey);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  color: var(--charcoal);
  padding: 0;
  font-family: var(--font-sans);
  transition:
    background-color var(--dur-base) var(--ease),
    border-color var(--dur-base) var(--ease),
    color var(--dur-base) var(--ease),
    transform var(--dur-base) var(--ease);
}

@media (min-width: 900px) {
  .fnav-side { width: 56px; height: 56px; }
}

.fnav-side--back { left: var(--sp-3); }
.fnav-side--next { right: var(--sp-3); }
.fnav-side--submit {
  right: var(--sp-3);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  padding: 0;
  background-color: var(--forest);
  color: var(--cream);
  border-color: var(--forest);
}

.fnav-side--submit.is-sending { opacity: 0.55; }

@media (min-width: 900px) {
  .fnav-side--submit { width: 56px; height: 56px; }
}

.fnav-side--next {
  background-color: var(--forest);
  color: var(--cream);
  border-color: var(--forest);
}

.fnav-side__label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.fnav-side:hover {
  transform: translateY(-50%) scale(1.05);
}

.fnav-side--back:hover {
  background-color: var(--charcoal);
  color: var(--cream);
  border-color: var(--charcoal);
}

.fnav-side--next:hover,
.fnav-side--submit:hover {
  background-color: var(--charcoal);
  border-color: var(--charcoal);
}

.fnav-side:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
}

.fnav-side[disabled] { opacity: 0.5; cursor: not-allowed; transform: translateY(-50%); }

/* Mobile — buttons drop to bottom corners so content uses full width */
@media (max-width: 599px) {
  /* Content gets 10px side clearance — no more wide gutters for side buttons */
  #mode-form form         { padding: 0 10px; }
  .form-progress-strip    { padding: var(--sp-2) 10px; }

  /* Buttons move to bottom corners */
  .fnav-side {
    width: 44px;
    height: 44px;
    top: auto;
    bottom: 12px;
    transform: none;
  }
  .fnav-side:hover      { transform: scale(1.05); }
  .fnav-side[disabled]  { transform: none; }
  .fnav-side--back      { left: 10px; }
  .fnav-side--next      { right: 10px; }
  .fnav-side--submit    { right: 10px; width: 44px; height: 44px; padding: 0; border-radius: 50%; }

  /* Extra bottom padding so form content clears the floating buttons */
  #mode-form .fstep { padding-bottom: 70px; }

  /* Compact photo upload drop zone */
  #mode-form .fupload__drop { padding: 8px 12px; gap: 6px; }
  #mode-form .fupload__icon { width: 16px; height: 16px; }
}
