/*
 * Diamond Terrace — Landing Page styles
 * Ported from the standalone build. All classes and custom properties are
 * "dt-" prefixed so nothing collides with Dawn's own CSS (verified collisions
 * existed on unprefixed .grid, .video, --border before this rename).
 * Design tokens sourced from Figma (node 5421-5971).
 * Layout: 12-column grid · 24px page margins · 16px gutters · 8px baseline
 *
 * @font-face rules live in a {% style %} block in layout/theme.liquid
 * instead of here, since this plain .css file can't use the asset_url
 * Liquid filter the fonts need — see the comment there for why.
 */

/* ---------- Design tokens (scoped to the DT sections) ---------- */
.dt-scope {
  /* Palette */
  --dt-tan:            #ccbeb1;
  --dt-burgundy:       #3a2228;
  --dt-dark-plum:      #2e1117;
  --dt-wine-bright:    #a74258;
  --dt-wine:           #843147;
  --dt-plum-black:     #231519;
  --dt-video-black:    #120a0d;
  --dt-cream:          #e8e3d9;
  --dt-cream-warm:     #dcd3c4;
  --dt-cream-soft:     #e7ded4;
  --dt-mauve:          #654f54;
  --dt-border:         #b7b0a3;

  --dt-stmt-1: #431e26;
  --dt-stmt-2: #723542;
  --dt-stmt-3: #a74258;
  --dt-stmt-a: #b9a999;
  --dt-stmt-b: #a08d7b;

  --dt-font-display: 'PP Pangaia', Georgia, serif;
  --dt-font-body: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --dt-font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --dt-s1: 8px;   --dt-s2: 16px;  --dt-s3: 24px;  --dt-s4: 32px;
  --dt-s5: 40px;  --dt-s6: 48px;  --dt-s8: 64px;  --dt-s10: 80px;
  --dt-s12: 96px; --dt-s16: 128px; --dt-s20: 160px; --dt-s24: 192px;

  --dt-page-max: 1512px;
  --dt-page-margin: 24px;
  --dt-gutter: 16px;

  --dt-hero-gradient: linear-gradient(102deg, #902b47 26%, #361a22 66%);

  background: var(--dt-tan);
  color: var(--dt-burgundy);
  font-family: var(--dt-font-body);
  font-size: 16px;
  line-height: 1.43;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.dt-scope img, .dt-scope svg, .dt-scope video { display: block; max-width: 100%; }
.dt-scope a { color: inherit; }
/* :where() keeps this scoped to .dt-scope but contributes zero specificity,
   so it never outranks a real utility class like .dt-signup-card__title —
   a plain ".dt-scope p, .dt-scope figure" selector has specificity (0,1,1),
   which actually beats single-class rules like .dt-intro__desc (0,1,0) and
   silently zeroed out every custom margin on a <p> in the theme. */
:where(.dt-scope p, .dt-scope figure) { margin: 0; }
.dt-scope *, .dt-scope *::before, .dt-scope *::after { box-sizing: border-box; }

/* ============================================================
   Grid system — 12 columns, 24px margins, 16px gutters
   ============================================================ */
.dt-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--dt-gutter);
  width: 100%;
  max-width: var(--dt-page-max);
  margin-inline: auto;
  padding-inline: var(--dt-page-margin);
}

/* ---------- Type utilities ---------- */
.dt-eyebrow {
  font-family: var(--dt-font-mono);
  font-size: 11px;
  letter-spacing: -0.22px;
  text-transform: uppercase;
  color: var(--dt-cream-soft);
}

.dt-stmt {
  font-family: var(--dt-font-display);
  font-weight: 200;
  font-style: italic;
  text-transform: uppercase;
  font-size: 12vw;
  line-height: 0.92;
  letter-spacing: -0.02em;
  white-space: nowrap;
  margin: 0;
}

.dt-statement {
  padding-inline: var(--dt-page-margin);
}
.dt-land__statement {
  padding-left: 0;
  margin-left: -3.6vw;
}

/* ============================================================
   Section: Hero
   ============================================================ */
.dt-hero-pov {
  position: relative;
  /* flow-root establishes a new block formatting context so the signup
     card's bottom margin (below) can't collapse through this wrapper and
     expose the page's white background underneath — confirmed live as the
     "white line" between the signup card and the intro section. */
  display: flow-root;
}
.dt-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 800px;
  color: var(--dt-burgundy);
  overflow: hidden;
  background: var(--dt-tan);
}
.dt-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.dt-hero__light {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(
    118deg,
    transparent 18%,
    rgba(255, 250, 232, 0.65) 37%,
    rgba(255, 250, 232, 0.95) 47%,
    rgba(255, 250, 232, 0.65) 57%,
    transparent 76%
  );
  background-size: 220% 220%;
  mix-blend-mode: soft-light;
  animation: dtHeroLightSweep 20s ease-in-out infinite alternate;
  will-change: background-position;
}
@keyframes dtHeroLightSweep {
  0%   { background-position: 15% 35%; }
  100% { background-position: 60% 65%; }
}
@media (prefers-reduced-motion: reduce) {
  .dt-hero__light { animation: none; }
}

.dt-nav {
  position: relative;
  z-index: 3;
  align-self: stretch;
  padding-top: 32px;
}
.dt-nav__inner {
  display: flex;
  align-items: center;
  justify-content: center;
}
.dt-nav__wordmark {
  display: inline-block;
  text-decoration: none;
}
.dt-nav__wordmark img {
  display: block;
  width: 232px;
  height: auto;
  aspect-ratio: 253 / 25;
}

.dt-hero__intro {
  position: relative;
  z-index: 3;
  width: min(1140px, 100%);
  padding-inline: 24px;
  margin: 96px 0 0;
  text-align: center;
  font-family: var(--dt-font-display);
  font-weight: 200;
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.dt-hero__line {
  display: block;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
  background: var(--dt-hero-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.dt-hero__bottle-crop {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 5;
  width: 308px;
  filter: drop-shadow(0 26px 50px rgba(30,14,18,0.32));
}
.dt-hero__bottle-mask {
  width: 308px;
  height: 435px;
  overflow: hidden;
}
.dt-hero__bottle-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.dt-signup-card {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 4;
  width: 477px;
  max-width: calc(100% - 48px);
  border-radius: 4px;
  padding: 16px 22px 18px;
  background: rgba(135, 119, 109, 0.4);
  backdrop-filter: blur(6px);
  color: #191818;
}
.dt-signup-card__title {
  font-family: var(--dt-font-display);
  font-weight: 200;
  font-size: 21px;
  line-height: 1.2;
  color: #131212;
  margin-bottom: 6px;
}
.dt-signup-card__desc {
  font-family: var(--dt-font-body);
  font-weight: 300;
  font-size: 12px;
  line-height: 1.43;
  color: #191818;
  max-width: 418px;
  margin-bottom: 16px;
}

.dt-signup-card__state--form.is-hidden {
  display: none;
}
.dt-signup-card__state--success {
  display: none;
}
.dt-signup-card__state--success.is-active {
  display: block;
  animation: dtRevealUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.dt-signup-card__state--success .dt-signup-card__desc {
  margin-bottom: 0;
}

.dt-signup-form { display: flex; gap: 8px; }
.dt-signup-form__input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--dt-border);
  border-radius: 8px;
  background: rgba(255,255,255,0.7);
  font-family: var(--dt-font-body);
  font-size: 15px;
  color: var(--dt-burgundy);
}
.dt-signup-form__input::placeholder { color: var(--dt-mauve); }
.dt-signup-form__input:focus {
  outline: none;
  border-color: var(--dt-wine);
  box-shadow: 0 0 0 3px rgba(132,49,71,0.15);
}
.dt-btn {
  border: none;
  cursor: pointer;
  border-radius: 8px;
  background: var(--dt-wine);
  color: var(--dt-cream);
  font-family: var(--dt-font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  padding: 0 18px;
  height: 44px;
  white-space: nowrap;
  transition: background .2s ease, transform .2s ease;
}
.dt-btn:hover { background: var(--dt-burgundy); transform: translateY(-1px); }
.dt-privacy {
  margin-top: var(--dt-s1);
  font-family: var(--dt-font-mono);
  font-size: 11px;
  letter-spacing: -0.02em;
  color: var(--dt-mauve);
}

.dt-signup-card .dt-signup-form__input {
  flex: 0 1 260px;
  height: 40px;
  border-radius: 4px;
  background: var(--dt-cream);
  border-color: var(--dt-border);
  font-family: var(--dt-font-body);
  font-size: 14px;
  color: var(--dt-mauve);
}
.dt-signup-card .dt-btn {
  flex: 0 0 173px;
  height: 40px;
  padding: 0;
  border-radius: 4px;
  font-size: 12px;
  color: #ebe7df;
}
.dt-signup-card .dt-privacy {
  margin-top: 8px;
  font-family: var(--dt-font-body);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: normal;
  color: #0f0e0e;
}

/* ============================================================
   Section: Intro / Video  (warm tan)
   ============================================================ */
.dt-intro {
  background: var(--dt-tan);
  padding-top: 160px;
  padding-bottom: clamp(72px, 10vw, 136px);
}
.dt-intro__inner { row-gap: 0; }
.dt-intro__mark {
  grid-column: 1 / -1;
  justify-self: center;
  text-align: center;
}
.dt-intro__logomark {
  width: clamp(170px, 18vw, 210px);
  height: auto;
  margin-inline: auto;
}
.dt-intro__desc {
  grid-column: 3 / span 8;
  margin-top: var(--dt-s6);
  text-align: center;
  color: var(--dt-burgundy);
  font-family: var(--dt-font-body);
  font-weight: 300;
  font-size: 18px;
}
.dt-video {
  grid-column: 1 / -1;
  margin-top: 160px;
  aspect-ratio: 1464 / 905;
  background:
    radial-gradient(80% 120% at 50% 0%, rgba(132,49,71,0.15), transparent 60%),
    var(--dt-video-black);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.dt-video__player {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dt-video__caption {
  grid-column: 1 / -1;
  margin-top: 16px;
  text-align: right;
  font-family: var(--dt-font-body);
  font-weight: 300;
  font-size: 12px;
  letter-spacing: 0.01em;
  color: var(--dt-mauve);
}

/* ============================================================
   Section: Statement — "THE LAND GIVES" (dark plum)
   ============================================================ */
.dt-land {
  background: var(--dt-dark-plum);
  color: var(--dt-cream-warm);
  padding-block: clamp(80px, 11vw, 152px);
  overflow: hidden;
}
.dt-land__inner {
  row-gap: var(--dt-s8);
  margin-top: clamp(40px, 5vw, 72px);
}
.dt-land__statement .dt-stmt:nth-child(1) { color: var(--dt-stmt-1); }
.dt-land__statement .dt-stmt:nth-child(2) { color: var(--dt-stmt-2); }
.dt-land__statement .dt-stmt:nth-child(3) { color: var(--dt-stmt-3); }

.dt-land__figure {
  grid-column: 2 / span 10;
  grid-row: 1;
  border-radius: 4px;
  overflow: hidden;
}
.dt-land__figure img {
  width: 100%;
  height: clamp(320px, 40vw, 559px);
  object-fit: cover;
}
.dt-land__desc {
  grid-column: 5 / span 6;
  grid-row: 2;
  align-self: start;
  color: var(--dt-cream-warm);
  font-family: var(--dt-font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.5;
}
.dt-land__index {
  grid-column: 2 / span 3;
  grid-row: 2;
  align-self: start;
}

/* ============================================================
   Section: "Nothing wasted" (bright wine)
   ============================================================ */
.dt-wasted {
  background: var(--dt-wine-bright);
  color: var(--dt-cream-soft);
  min-height: 800px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: var(--dt-s10);
  text-align: center;
}
.dt-wasted__inner { row-gap: var(--dt-s4); }
.dt-wasted__eyebrow { grid-column: 1 / -1; }
.dt-wasted__title {
  grid-column: 1 / -1;
  font-family: var(--dt-font-display);
  font-weight: 200;
  font-size: clamp(40px, 5vw, 48px);
  letter-spacing: -0.02em;
  line-height: 1.06;
}
.dt-wasted__title em { font-style: italic; }
.dt-wasted__desc {
  grid-column: 4 / span 6;
  color: var(--dt-cream-warm);
  font-size: 16px;
  line-height: 1.5;
}

/* ============================================================
   Section: "Made for the people we love" (warm tan)
   ============================================================ */
.dt-people {
  background: var(--dt-tan);
  padding-top: clamp(80px, 11vw, 152px);
  padding-bottom: 160px;
  overflow: hidden;
}
.dt-people__inner {
  row-gap: 160px;
  margin-top: 160px;
}
.dt-people__statement .dt-stmt:nth-child(1) { color: var(--dt-stmt-a); }
.dt-people__statement .dt-stmt:nth-child(2) { color: var(--dt-stmt-b); }
.dt-people__statement .dt-stmt:nth-child(3) { color: var(--dt-wine); }

/* Same treatment as .dt-land__statement (single fixed offset on the whole
   block) instead of the old per-line 8vw/4vw/16vw stagger, which pushed
   line 2 far enough right to run off the viewport on mobile. */
.dt-people__statement { padding-left: 0; margin-left: -3.6vw; }

.dt-people__figure {
  grid-column: 2 / span 10;
  border-radius: 4px;
  overflow: hidden;
}
.dt-people__figure img {
  width: 100%;
  height: clamp(400px, 50vw, 699px);
  object-fit: cover;
  object-position: center 20%;
}
.dt-quote {
  grid-column: 4 / span 6;
  margin: 0;
  text-align: center;
  font-family: var(--dt-font-display);
  font-weight: 200;
  /* Dawn's base stylesheet sets blockquote { font-style: italic } and this
     rule never overrode it — confirmed live via getComputedStyle. */
  font-style: normal;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--dt-burgundy);
}
.dt-quote__cite {
  display: block;
  margin-top: var(--dt-s3);
  font-family: var(--dt-font-mono);
  font-size: 13px;
  letter-spacing: 0;
  color: var(--dt-mauve);
  font-style: normal;
}

/* ============================================================
   Section: Email signup (near-black plum)
   ============================================================ */
.dt-join {
  background: var(--dt-plum-black);
  color: var(--dt-cream-warm);
  padding-block: clamp(80px, 11vw, 136px);
  text-align: center;
}
.dt-join__inner { row-gap: var(--dt-s3); }
.dt-join__eyebrow { grid-column: 1 / -1; }
.dt-join__title {
  grid-column: 1 / -1;
  font-family: var(--dt-font-display);
  font-weight: 200;
  font-size: clamp(34px, 4vw, 40px);
  letter-spacing: -0.02em;
  line-height: 1.06;
}
.dt-join__title em { font-style: italic; }
.dt-join__desc {
  grid-column: 4 / span 6;
  color: var(--dt-cream-warm);
  font-size: 16px;
  line-height: 1.5;
}
.dt-join__form {
  grid-column: 4 / span 6;
  margin-top: var(--dt-s2);
}
.dt-join__form .dt-signup-form__input {
  height: 56px;
  background: var(--dt-cream-soft);
  border-color: transparent;
}
.dt-join__form .dt-btn { height: 56px; }
.dt-join__privacy {
  grid-column: 1 / -1;
  color: rgba(231,222,212,0.7);
  text-align: center;
}

.dt-join__group,
.dt-join__state--form {
  display: contents;
}
.dt-join__state--form.is-hidden {
  display: none;
}
.dt-join__state--success {
  display: none;
}
.dt-join__state--success.is-active {
  display: contents;
}

/* ============================================================
   Back to top — minimal floating button, appears at the footer
   ============================================================ */
.dt-back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: var(--dt-wine);
  color: var(--dt-cream);
  box-shadow: 0 8px 24px rgba(20, 8, 12, 0.28);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease, background 0.2s ease;
  font-family: var(--dt-font-mono, 'Geist Mono', monospace);
}
.dt-back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.dt-back-to-top:hover {
  background: var(--dt-burgundy);
}
.dt-back-to-top span {
  font-family: var(--dt-font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1;
}
@media (prefers-reduced-motion: reduce) {
  .dt-back-to-top { transition: opacity 0.01s linear; }
}
@media (max-width: 560px) {
  .dt-back-to-top { right: 16px; bottom: 16px; width: 48px; height: 48px; }
}

/* ============================================================
   Animations — hero load cascade + scroll reveals
   ============================================================ */
@keyframes dtRevealUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes dtRevealBottle {
  from { opacity: 0; transform: translateX(-50%) translateY(48px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes dtRevealBottleFlow {
  from { opacity: 0; transform: translateY(48px); }
  to   { opacity: 1; transform: translateY(0); }
}

.js .dt-anim-load {
  opacity: 0;
  animation: dtRevealUp 1.6s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--dt-delay, 0s);
}
.js .dt-anim-load--bottle {
  opacity: 0;
  animation: dtRevealBottle 2s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--dt-delay, 0s);
}

.js .dt-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--dt-delay, 0s);
  will-change: opacity, transform;
}
.js .dt-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.js .dt-statement .dt-stmt.dt-reveal:nth-child(2) { transition-delay: 0.12s; }
.js .dt-statement .dt-stmt.dt-reveal:nth-child(3) { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  .js .dt-anim-load,
  .js .dt-anim-load--bottle { opacity: 1 !important; animation: none !important; }
  .js .dt-anim-load { transform: none !important; }
  .js .dt-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1320px) {
  .dt-signup-card {
    position: static;
    width: calc(100% - 2 * var(--dt-page-margin));
    max-width: 520px;
    margin: 40px auto 48px;
    background: rgba(135, 119, 109, 0.55);
  }
}

@media (max-width: 900px) {
  .dt-scope { --dt-page-margin: 20px; }
  .dt-hero { height: auto; }
  .dt-hero__bottle-crop {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    margin-top: 88px;
  }
  .js .dt-hero__bottle-crop {
    animation-name: dtRevealBottleFlow;
  }
  .dt-intro__desc { grid-column: 1 / -1; }
  .dt-land__figure, .dt-people__figure { grid-column: 1 / -1; }
  .dt-wasted__desc, .dt-quote, .dt-join__desc, .dt-join__form { grid-column: 1 / -1; }

  .dt-land__index {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-bottom: 6px;
  }
  .dt-land__desc {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  /* Mobile-only spacing cuts (50% of desktop values) — confirmed live via
     CSSOM preview against the mobile critique recording before shipping. */
  .dt-signup-card { margin-top: 20px; margin-bottom: 24px; }
  .dt-intro { padding-top: 80px; }
  .dt-video { margin-top: 80px; }
  .dt-land__inner { row-gap: 32px; }
  /* margin-top matches row-gap so the headline-to-image gap reads the same
     as the rest of this module's spacing instead of standing out. */
  .dt-people__inner { row-gap: 80px; margin-top: 80px; }
}

@media (max-width: 600px) {
  .dt-signup-card .dt-signup-form { flex-wrap: wrap; }
  .dt-signup-card .dt-signup-form__input { flex: 1 1 100%; }
  .dt-signup-card .dt-btn { flex: 1 1 100%; }
}

@media (max-width: 560px) {
  .dt-join__form.dt-signup-form { flex-direction: column; gap: 12px; }
  .dt-join__form .dt-signup-form__input { flex: none; width: 100%; height: 56px; }
  .dt-join__form .dt-btn { flex: none; width: 100%; height: 56px; }
  .dt-stmt { font-size: clamp(40px, 15vw, 72px); }
}
