.site-orders {
  margin-block: -12px;
  padding-block: 12px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.site-orders:hover,
.site-orders:focus-visible {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: .2em;
}

.home-hero {
  isolation: isolate;
  position: relative;
  display: grid;
  align-items: center;
  min-height: clamp(23rem, 45vw, 32rem);
  margin-inline: calc(-1 * var(--page-gutter));
  padding: clamp(32px, 6vw, 72px) var(--page-gutter);
}

.home-intro h1 {
  margin: 0;
  max-width: 15ch;
  font: 700 clamp(2rem, 5.2vw, 3.65rem)/1.08 var(--display);
  letter-spacing: -.058em;
  text-wrap: balance;
}

.home-intro > p {
  margin: 18px 0 0;
  max-width: 34ch;
  color: var(--muted);
}

.home-actions {
  display: grid;
  width: min(100%, 20rem);
  margin-top: 24px;
  gap: 8px;
}

.home-actions .button {
  justify-content: space-between;
  min-width: 0;
  padding-inline: clamp(12px, 2vw, 20px);
}

.home-actions .button span { transition: transform .24s var(--ease); }

.home-actions .button:is(:hover, :focus-visible) span { transform: translateX(3px); }

.home-actions .secondary {
  background: var(--bg-elevated);
  border-color: var(--line);
}

.home-actions .secondary:hover { background: var(--accent-soft); }

.home-photo {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 32%;
  overflow: hidden;
  display: block;
  --photo-top: 21%;
  --photo-right: 17%;
  --photo-bottom: 28%;
  /* Fade to page bg without going through black (avoids a muddy/hard stripe). */
  --photo-fade: color-mix(in srgb, var(--bg) 0%, transparent);
}

.home-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: home-photo-in 2.4s var(--ease);
}

.home-photo::before,
.home-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.home-photo::before {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  /* Intersect edge fades; default "add" leaves a hard blur rectangle while scrolling. */
  -webkit-mask-image:
    linear-gradient(to bottom, #000, transparent var(--photo-top)),
    linear-gradient(to left, #000, transparent var(--photo-right)),
    linear-gradient(to top, #000, transparent var(--photo-bottom));
  mask-image:
    linear-gradient(to bottom, #000, transparent var(--photo-top)),
    linear-gradient(to left, #000, transparent var(--photo-right)),
    linear-gradient(to top, #000, transparent var(--photo-bottom));
  -webkit-mask-composite: source-in, source-in;
  mask-composite: intersect;
}

.home-photo::after {
  background:
    linear-gradient(to bottom, var(--bg), var(--photo-fade) var(--photo-top)),
    linear-gradient(to left, var(--bg), var(--photo-fade) var(--photo-right)),
    linear-gradient(to top, var(--bg), var(--photo-fade) var(--photo-bottom)),
    linear-gradient(
      to right,
      var(--bg) 12%,
      color-mix(in srgb, var(--bg) 94%, transparent) 40%,
      var(--photo-fade) 83%
    );
}

@keyframes home-photo-in {
  from { transform: scale(1.09) translateX(1%); }
  to { transform: scale(1); }
}

.home-section {
  border-top: 1px solid var(--line-soft);
  padding-block: clamp(28px, 5vw, 52px);
}

.home-flow {
  --flow-bg: color-mix(in srgb, var(--accent-soft) 64%, var(--bg));
  background: var(--flow-bg);
  box-shadow: 0 0 0 100vmax var(--flow-bg);
  clip-path: inset(0 -100vmax);
}

.home-flow,
.home-flow + .home-section {
  border-top: 0;
}

@property --home-wave-lift {
  syntax: "<length>";
  inherits: false;
  initial-value: 3px;
}

@property --home-wave-boost {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

@property --home-wave-drift {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

@property --home-ripple-lift {
  syntax: "<length>";
  inherits: false;
  initial-value: 2px;
}

@property --home-ripple-drift {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

@supports (width: 100cqw) and (clip-path: shape(from 0 0, line to 100% 100%, close)) {
  .home-page { container-type: inline-size; }

  .home-flow {
    position: relative;
    isolation: isolate;
    background: none;
    box-shadow: none;
    clip-path: none;
  }

  /* Deep swell — large visible undulation + current drift. */
  .home-flow::before {
    content: "";
    position: absolute;
    z-index: -2;
    inset-block: -40px;
    left: 50%;
    width: 120cqw;
    transform: translateX(calc(-50% + var(--home-wave-drift, 0px)));
    pointer-events: none;
    background:
      linear-gradient(
        to bottom,
        color-mix(in srgb, var(--accent-soft) 40%, var(--flow-bg)) 0,
        var(--flow-bg) 28px,
        var(--flow-bg) calc(100% - 28px),
        color-mix(in srgb, var(--accent-soft) 40%, var(--flow-bg)) 100%
      );
    --wave-amplitude: calc(var(--home-wave-lift, 8px) + var(--home-wave-boost, 0px));
    --wave-high: calc(40px - var(--wave-amplitude));
    --wave-low: calc(40px + var(--wave-amplitude));
    clip-path: shape(
      from 0 40px,
      curve to 50% 40px with 16% var(--wave-high) / 34% var(--wave-high),
      curve to 100% 40px with 66% var(--wave-low) / 84% var(--wave-low),
      line to 100% calc(100% - 40px),
      curve to 50% calc(100% - 40px) with 84% calc(100% - var(--wave-high)) / 66% calc(100% - var(--wave-high)),
      curve to 0 calc(100% - 40px) with 34% calc(100% - var(--wave-low)) / 16% calc(100% - var(--wave-low)),
      close
    );
  }

  /* Bright surface film — short ripples + acid crest (must read as water). */
  .home-flow::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset-block: -40px;
    left: 50%;
    width: 128cqw;
    transform: translateX(calc(-50% + var(--home-ripple-drift, 0px)));
    pointer-events: none;
    opacity: .92;
    mix-blend-mode: soft-light;
    background:
      linear-gradient(
        to bottom,
        color-mix(in srgb, var(--acid) 55%, #fff) 0,
        color-mix(in srgb, var(--acid) 35%, var(--flow-bg)) 10px,
        color-mix(in srgb, var(--flow-bg) 55%, transparent) 36px,
        transparent 52%,
        color-mix(in srgb, var(--flow-bg) 55%, transparent) calc(100% - 36px),
        color-mix(in srgb, var(--acid) 28%, var(--flow-bg)) calc(100% - 10px),
        color-mix(in srgb, var(--acid) 45%, #fff) 100%
      );
    --ripple-amp: var(--home-ripple-lift, 6px);
    --r1: calc(40px - var(--ripple-amp));
    --r2: calc(40px + var(--ripple-amp) * .7);
    --r3: calc(40px - var(--ripple-amp) * .5);
    --r4: calc(40px + var(--ripple-amp));
    clip-path: shape(
      from 0 40px,
      curve to 20% 40px with 6% var(--r1) / 13% var(--r2),
      curve to 40% 40px with 27% var(--r3) / 34% var(--r1),
      curve to 60% 40px with 47% var(--r4) / 54% var(--r2),
      curve to 80% 40px with 67% var(--r3) / 74% var(--r4),
      curve to 100% 40px with 87% var(--r1) / 94% var(--r2),
      line to 100% calc(100% - 40px),
      curve to 80% calc(100% - 40px) with 94% calc(100% - var(--r1)) / 87% calc(100% - var(--r2)),
      curve to 60% calc(100% - 40px) with 74% calc(100% - var(--r3)) / 67% calc(100% - var(--r4)),
      curve to 40% calc(100% - 40px) with 54% calc(100% - var(--r2)) / 47% calc(100% - var(--r1)),
      curve to 20% calc(100% - 40px) with 34% calc(100% - var(--r4)) / 27% calc(100% - var(--r3)),
      curve to 0 calc(100% - 40px) with 13% calc(100% - var(--r2)) / 6% calc(100% - var(--r1)),
      close
    );
  }
}

@media (prefers-reduced-motion: no-preference) {
  .home-flow::before {
    animation: home-wave-swell 1.9s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate;
    transition: --home-wave-boost .5s cubic-bezier(0.33, 0.1, 0.25, 1);
  }

  .home-flow::after {
    animation: home-wave-ripple 1.05s cubic-bezier(0.4, 0.05, 0.6, 0.95) infinite alternate;
    transition: opacity .28s ease;
  }

  .home-flow.is-scrolling::before {
    --home-wave-boost: 18px;
    transition-duration: .25s;
    transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
  }

  .home-flow.is-scrolling::after {
    opacity: 1;
  }
}

@keyframes home-wave-swell {
  from {
    --home-wave-lift: 6px;
    --home-wave-drift: -28px;
  }
  to {
    --home-wave-lift: 16px;
    --home-wave-drift: 32px;
  }
}

@keyframes home-wave-ripple {
  from {
    --home-ripple-lift: 4px;
    --home-ripple-drift: 22px;
  }
  to {
    --home-ripple-lift: 13px;
    --home-ripple-drift: -30px;
  }
}

.home-section h2 {
  margin: 0 0 18px;
  font: 600 clamp(1.2rem, 3vw, 1.75rem)/1.2 var(--display);
  letter-spacing: -.04em;
}

.home-steps,
.home-types {
  display: grid;
  list-style: none;
  padding: 0;
  margin: 0;
}

.home-steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.home-steps li {
  padding: clamp(14px, 2.3vw, 24px);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.home-steps span {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  color: var(--accent-text);
  background: var(--accent-soft);
  font: 600 .8rem/1 var(--display);
}

.home-steps h3 {
  margin: 12px 0 4px;
  font-size: 1.05rem;
  line-height: 1.25;
}

.home-section p {
  margin: 0;
  color: var(--muted);
}

.home-catalog,
.home-faq {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr);
  gap: clamp(12px, 4vw, 40px);
}

.home-catalog h2 { margin-bottom: 8px; }

.home-types {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.home-types li {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  font-weight: 750;
  overflow-wrap: anywhere;
}

.home-faq h2 { margin: 0; }

.home-faq details {
  padding-inline: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft);
  background: var(--bg-elevated);
  transition: background-color .2s ease;
}

.home-faq details + details { margin-top: 8px; }

.home-faq details[open] { background: var(--accent-soft); }

.home-faq details p { padding-bottom: 14px; }

.home-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding-block: 8px;
  cursor: pointer;
  list-style: none;
  font-weight: 750;
}

.home-faq summary::-webkit-details-marker { display: none; }

.home-faq summary::after {
  content: "";
  flex: 0 0 9px;
  height: 9px;
  margin: -4px 3px 0 0;
  border: solid var(--accent-text);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  transition: transform .2s var(--ease);
}

.home-faq details[open] summary::after { transform: translateY(4px) rotate(225deg); }

.home-faq summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (max-width: 740px) {
  .home-steps { grid-template-columns: 1fr; }
  .home-steps li {
    display: grid;
    grid-template-columns: 2rem 1fr;
    column-gap: 12px;
    row-gap: 4px;
  }
  .home-steps span { grid-row: span 2; }
  .home-steps h3 { margin: 0; padding-top: 4px; }
  .home-catalog,
  .home-faq { grid-template-columns: 1fr; }
}

@media (741px <= width <= 940px) {
  .home-types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .home-hero { padding-block: 0 24px; }
  .home-photo {
    position: relative;
    inset: auto;
    z-index: 0;
    height: 10.25rem;
    margin-inline: calc(-1 * var(--page-gutter));
    margin-bottom: -1.75rem;
    overflow: hidden;
    isolation: isolate;
  }
  .home-photo img {
    object-position: center 63%;
    animation: none;
    /* No CSS mask — masks often flash a hard seam on mobile scroll. */
  }
  .home-photo::before {
    content: none;
  }
  .home-photo::after {
    /* Same-hue multi-stop fade into page bg (never through black). */
    content: "";
    inset: 0;
    background:
      linear-gradient(
        to bottom,
        var(--bg) 0%,
        color-mix(in srgb, var(--bg) 72%, transparent) 18%,
        color-mix(in srgb, var(--bg) 0%, transparent) 36%
      ),
      linear-gradient(
        to top,
        var(--bg) 0%,
        color-mix(in srgb, var(--bg) 78%, transparent) 28%,
        color-mix(in srgb, var(--bg) 28%, transparent) 55%,
        color-mix(in srgb, var(--bg) 0%, transparent) 78%
      );
  }
  .home-intro {
    position: relative;
    z-index: 1;
    margin-top: 0;
  }
  .home-actions { width: 100%; }
  .home-types { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /*
   * Mobile: full-bleed wave band (break out of main gutter),
   * idle only — no scroll-boost / horizontal drift.
   */
  .home-flow {
    background: none;
    box-shadow: none;
    clip-path: none;
    margin-inline: calc(-1 * var(--page-gutter));
    padding-inline: var(--page-gutter);
  }
  .home-flow::before,
  .home-flow::after {
    left: 0;
    width: 100%;
    transform: none;
    --home-wave-drift: 0px;
    --home-ripple-drift: 0px;
  }
  .home-flow::before {
    content: "";
    animation-duration: 2.2s;
    transition: none !important;
    --home-wave-boost: 0px !important;
  }
  .home-flow::after {
    content: "";
    animation-duration: 1.25s;
    opacity: .85;
    mix-blend-mode: soft-light;
  }
  .home-flow.is-scrolling::before {
    --home-wave-boost: 0px !important;
  }
  .home-flow.is-scrolling::after {
    opacity: .85;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-photo img { animation: none; }
  .home-flow::before,
  .home-flow::after {
    animation: none !important;
    transition: none !important;
    transform: translateX(-50%);
  }
  .home-flow::before {
    --home-wave-lift: 2px;
    --home-wave-boost: 0px;
    --home-wave-drift: 0px;
  }
  .home-flow::after {
    --home-ripple-lift: 1.5px;
    --home-ripple-drift: 0px;
    opacity: .4;
  }
  .home-actions .button span,
  .home-faq details,
  .home-faq summary::after { transition: none; }
  .home-actions .button:is(:hover, :focus-visible) span { transform: none; }
}
