/* ─────────────────────────────────────────────────────────────────
   IEngrave Optics — marketing site
   Tailwind CDN handles utilities; this file owns brand tokens, font
   loading, animations, and a few effects Tailwind can't easily
   express inline.
   ───────────────────────────────────────────────────────────────── */

:root {
  --brand-blue: #1E5BBE;
  --brand-blue-dark: #1748A0;
  --brand-blue-tint: #F4F7FC;
  --ink: #111827;
  --ink-soft: #4B5563;
  --ink-muted: #9CA3AF;
  --rule: #E5E7EB;
  --rule-soft: #F3F4F6;
  --surface: #FFFFFF;
  --surface-soft: #FAFAFA;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Default body paragraph leading is generous so wrapped lines on
   narrow viewports don't crowd. 1.75 reads comfortably even at a
   360-400px viewport. */
section p, footer p, aside p { line-height: 1.75; }

/* ─── Display heading ───────────────────────────────────────────
   The previous 1.05 desktop line-height was clipping descenders on
   the larger headlines (commas/y/g overlapping the next line's
   cap-height). Bumped to 1.15 desktop / 1.25 mobile so multi-line
   heads breathe. */
.display {
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  text-wrap: balance;
}
@media (min-width: 768px) {
  .display { line-height: 1.15; }
}

.eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand-blue);
}

/* ─── Reveal-on-scroll ─────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms ease, transform 700ms ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.stagger-1 { transition-delay: 60ms; }
.stagger-2 { transition-delay: 120ms; }
.stagger-3 { transition-delay: 180ms; }
.stagger-4 { transition-delay: 240ms; }
.stagger-5 { transition-delay: 300ms; }
.stagger-6 { transition-delay: 360ms; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  [class*="stagger"] { transition-delay: 0ms; }
}

/* ─── Hero atmospherics ─────────────────────────────────────────
   Two drifting blue blobs behind the hero, plus a base gradient
   wash. The drift is a few degrees faster than before so the page
   reads more alive on first view. */
.hero-bg {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #FFFFFF 0%, #F4F8FE 100%);
}
.hero-bg::before, .hero-bg::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}
.hero-bg::before {
  top: -25%; right: -15%;
  width: 70%; height: 70%;
  background: rgba(30, 91, 190, 0.18);
  animation: drift-a 14s ease-in-out infinite;
}
.hero-bg::after {
  bottom: -25%; left: -15%;
  width: 60%; height: 60%;
  background: rgba(30, 91, 190, 0.10);
  animation: drift-b 18s ease-in-out infinite;
}
.hero-bg > * { position: relative; z-index: 1; }

@keyframes drift-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-70px, 50px) scale(1.06); }
}
@keyframes drift-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, -40px) scale(1.10); }
}

/* ─── Band variants ────────────────────────────────────────────
   Solid tinted band — the only "blue moment" in the body of the
   page besides the hero and the catalog finale. Used in rotation
   with bg-white sections so the page rhythms clearly. */
.band-tint {
  position: relative;
  overflow: hidden;
  background: var(--brand-blue-tint);
}
.band-tint::before {
  content: "";
  position: absolute;
  top: 0; right: -10%;
  width: 50%; height: 100%;
  background: rgba(30, 91, 190, 0.06);
  border-radius: 50%;
  filter: blur(110px);
  animation: drift-b 22s ease-in-out infinite;
  pointer-events: none;
}
.band-tint > * { position: relative; z-index: 1; }

/* Catalog band — almost imperceptible brand-blue tint at the very
   bottom. Lowered the blob's opacity again and pushed the white stop
   further down so the gradient barely registers — it now reads as the
   page softening into the footer, not as a coloured band. */
.bg-catalog {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFFFF 60%, #F4F6FB 100%);
}
.bg-catalog::after {
  content: ""; position: absolute;
  bottom: -45%; left: 50%; transform: translateX(-50%);
  width: 65%; height: 65%;
  background: rgba(30, 91, 190, 0.035);
  border-radius: 50%;
  filter: blur(130px);
  animation: drift-b 22s ease-in-out infinite;
  pointer-events: none;
}
.bg-catalog > * { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .hero-bg::before, .hero-bg::after,
  .band-tint::before,
  .bg-catalog::after { animation: none; }
}

/* ─── Fade frame ───────────────────────────────────────────────
   Soft radial mask fades the image edges into the section background
   so the photo reads as a vignette instead of a hard-edged plate.
   Used on the catalog-fade image (which has translucent gradient
   edges that pair well with the mask). */
.fade-frame {
  position: relative;
}
.fade-frame img {
  display: block;
  width: 100%;
  height: auto;
  -webkit-mask-image: radial-gradient(ellipse 95% 105% at center, black 65%, transparent 100%);
  mask-image: radial-gradient(ellipse 95% 105% at center, black 65%, transparent 100%);
}

/* ─── Image card ───────────────────────────────────────────────
   Soft-shadowed plate for photos that don't take well to the radial
   mask (e.g. the who-we-are image, which has its own grey edge
   gradients baked in — masking it cuts off the intentional softness
   and reads as a hard ellipse). The card sits with a thin hairline
   outline plus a wide, soft drop shadow so the image floats over the
   section like a matted print. */
.image-card {
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  background: #FFFFFF;
  box-shadow:
    0 1px 0 rgba(17, 24, 39, 0.04),
    0 24px 50px -12px rgba(17, 24, 39, 0.16),
    0 8px 16px -8px rgba(17, 24, 39, 0.08),
    0 0 0 1px rgba(17, 24, 39, 0.05);
}
.image-card img {
  display: block;
  width: 100%;
  height: auto;
}

/* ─── Form chrome ─────────────────────────────────────────────── */
.field-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}
.field {
  width: 100%;
  padding: 0.6875rem 0.9375rem;
  border: 1px solid var(--rule);
  border-radius: 0.625rem;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.9375rem;
  font-family: inherit;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.field:focus, .field:focus-within {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(30, 91, 190, 0.15);
}
.field::placeholder { color: var(--ink-muted); }

/* ─── Custom dropdown ───────────────────────────────────────── */
.dropdown { position: relative; }
.dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.dropdown-label { color: var(--ink-muted); }
.dropdown.has-value .dropdown-label { color: var(--ink); }
.dropdown-arrow {
  width: 0.875rem;
  height: 0.875rem;
  color: var(--ink-muted);
  transition: transform 200ms ease, color 200ms ease;
  flex-shrink: 0;
}
.dropdown.is-open .dropdown-arrow {
  transform: rotate(180deg);
  color: var(--brand-blue);
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
  padding: 0.375rem;
  list-style: none;
  margin: 0;
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.10), 0 2px 6px rgba(17, 24, 39, 0.04);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 30;
  max-height: 260px;
  overflow-y: auto;
}
.dropdown.is-open .dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.dropdown-menu li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.9375rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}
.dropdown-menu li:hover, .dropdown-menu li.is-focus {
  background: var(--brand-blue-tint);
  color: var(--brand-blue);
}
.dropdown-menu li.is-selected {
  background: var(--brand-blue);
  color: #FFFFFF;
}
.dropdown-menu li.is-selected:hover { background: var(--brand-blue-dark); }

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.005em;
  transition: transform 150ms ease, background-color 200ms ease, border-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
}
.btn-lg {
  padding: 0.8125rem 1.375rem;
  font-size: 0.9375rem;
  border-radius: 0.75rem;
}
.btn-primary {
  background: var(--brand-blue);
  color: #FFFFFF;
  border: 1px solid var(--brand-blue);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 1px 2px rgba(30, 91, 190, 0.18);
}
.btn-primary:hover {
  background: var(--brand-blue-dark);
  border-color: var(--brand-blue-dark);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 6px 18px rgba(30, 91, 190, 0.28);
  transform: translateY(-1px);
}
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--rule);
}
.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--surface-soft);
}
.btn-link {
  color: var(--brand-blue);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 150ms ease;
}
.btn-link:hover { border-bottom-color: var(--brand-blue); }

/* Hero primary CTA gets a slow pulse-glow to draw the eye on
   first paint. Other primaries inherit the regular hover only. */
.btn-pulse::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: var(--brand-blue);
  opacity: 0;
  filter: blur(10px);
  z-index: -1;
  animation: pulse-glow 3.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes pulse-glow {
  0%, 100% { opacity: 0; }
  50% { opacity: 0.32; }
}
@media (prefers-reduced-motion: reduce) {
  .btn-pulse::after { animation: none; }
}

/* Icon-nudge on hover. */
.btn .icon-shift { transition: transform 200ms ease; }
.btn:hover .icon-shift { transform: translateX(3px); }
.btn .icon-down { transition: transform 200ms ease; }
.btn:hover .icon-down { transform: translateY(2px); }

.footer-link {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 150ms ease;
}
.footer-link:hover { color: var(--ink); }

/* ─── Nav ────────────────────────────────────────────────────── */
[data-nav] { transition: background-color 250ms ease, border-color 250ms ease, backdrop-filter 250ms ease, box-shadow 250ms ease; }
.nav-scrolled {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--rule-soft);
}
.nav-divider {
  display: inline-block;
  width: 1px;
  height: 16px;
  background: var(--rule);
}
.nav-logo { height: 1.25rem; }
@media (min-width: 768px) { .nav-logo { height: 1.5rem; } }

/* ─── Mobile drawer ──────────────────────────────────────────
   Hamburger button (in nav) toggles a right-side slide-in panel +
   a translucent backdrop. JS owns the .is-open class on the wrapper.
   On desktop the wrapper is `display: none` via Tailwind's `md:hidden`,
   so the markup is harmless at larger viewports. */
.hamburger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  transition: background-color 150ms ease, border-color 150ms ease;
  cursor: pointer;
}
.hamburger-btn:hover { background: var(--surface-soft); border-color: var(--rule); }

[data-drawer] {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
}
[data-drawer].is-open { pointer-events: auto; }

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 320ms ease;
}
[data-drawer].is-open .drawer-backdrop { opacity: 1; }

.drawer-panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 86%;
  max-width: 340px;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: -10px 0 36px rgba(17, 24, 39, 0.14);
}
[data-drawer].is-open .drawer-panel { transform: translateX(0); }

/* Each nav row staggers in once the panel is open. Delays start a
   beat after the panel slide so the user sees the surface arrive
   first, then the contents settle. */
.drawer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 0;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-soft);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 320ms ease,
    transform 320ms ease,
    color 150ms ease;
}
.drawer-link:hover { color: var(--brand-blue); }
.drawer-link svg { color: var(--ink-muted); transition: transform 200ms ease, color 200ms ease; }
.drawer-link:hover svg { color: var(--brand-blue); transform: translateX(2px); }
/* Current-page state — link gets a brand-blue label + a small dot to
   the left so the user knows where they are in the menu. */
.drawer-link.is-current {
  color: var(--brand-blue);
  position: relative;
  padding-left: 1rem;
}
.drawer-link.is-current::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: var(--brand-blue);
}
.drawer-link.is-current svg { color: var(--brand-blue); }

[data-drawer].is-open .drawer-link {
  opacity: 1;
  transform: translateY(0);
}
[data-drawer].is-open .drawer-link:nth-child(1) { transition-delay: 180ms; }
[data-drawer].is-open .drawer-link:nth-child(2) { transition-delay: 240ms; }
[data-drawer].is-open .drawer-link:nth-child(3) { transition-delay: 300ms; }

@media (prefers-reduced-motion: reduce) {
  .drawer-backdrop, .drawer-panel, .drawer-link {
    transition: none;
  }
  .drawer-panel { transform: translateX(0); }
  [data-drawer]:not(.is-open) .drawer-panel { transform: translateX(100%); }
}

/* ─── Swatch tiles + hover popup ─────────────────────────────── */
.swatch-card { position: relative; }
.swatch-tile {
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  overflow: hidden;
  background: #F1F5F9;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.04),
    0 1px 2px rgba(0, 0, 0, 0.05);
  position: relative;
  transition: transform 250ms ease, box-shadow 250ms ease;
  cursor: pointer;
}
@media (min-width: 768px) {
  .swatch-tile { width: 64px; height: 64px; }
}
.swatch-card:hover .swatch-tile {
  transform: translateY(-2px) scale(1.05);
  box-shadow:
    inset 0 0 0 1px rgba(30, 91, 190, 0.25),
    0 8px 20px rgba(30, 91, 190, 0.18);
}
.swatch-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.swatch-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 6px 10px rgba(255, 255, 255, 0.25);
  pointer-events: none;
}
/* Popup is now text-only — colorway name + CW code. Smaller and
   faster to read than the previous version with the lens preview. */
.swatch-popup {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  opacity: 0;
  pointer-events: none;
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-radius: 0.625rem;
  padding: 0.5rem 0.75rem 0.5rem;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.14), 0 2px 8px rgba(17, 24, 39, 0.06);
  min-width: 96px;
  transition: opacity 200ms ease, transform 200ms ease;
  z-index: 20;
  white-space: nowrap;
}
.swatch-card:hover .swatch-popup {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.swatch-popup .name { font-size: 0.8125rem; font-weight: 600; color: var(--ink); text-align: center; }
.swatch-popup .code {
  margin-top: 0.125rem;
  font-size: 0.6875rem;
  color: var(--ink-muted);
  text-align: center;
  letter-spacing: 0.08em;
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;
}
.swatch-popup::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #FFFFFF;
  filter: drop-shadow(0 1px 0 var(--rule));
}

/* ─── Shape hover popup ──────────────────────────────────────
   Floats above each .shape-frame with the same chrome as the
   .swatch-popup — small white card, arrow, soft shadow. Content
   (current colorway name + CW code) is rewritten by the cycler in
   script.js after every crossfade so the popup tracks the lens in
   real time. */
.shape-popup {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  opacity: 0;
  pointer-events: none;
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-radius: 0.625rem;
  padding: 0.5rem 0.75rem;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.14), 0 2px 8px rgba(17, 24, 39, 0.06);
  min-width: 96px;
  transition: opacity 200ms ease, transform 200ms ease;
  z-index: 20;
  white-space: nowrap;
}
.shape-frame:hover .shape-popup {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.shape-popup .name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
}
.shape-popup .code {
  margin-top: 0.125rem;
  font-size: 0.6875rem;
  color: var(--ink-muted);
  letter-spacing: 0.08em;
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;
  text-align: center;
}
.shape-popup::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #FFFFFF;
  filter: drop-shadow(0 1px 0 var(--rule));
}

/* ─── Shape row ──────────────────────────────────────────────────
   Each lens shape gets a full-width row showing both cuts in a
   cycled color. Images sit inside white card frames so they don't
   bleed into the section background (the lens .webp files have
   white backgrounds, not transparency). */
.shape-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 768px) {
  /* Text column is 1fr, images column is 1.4fr — images get the
     larger share. .shape-row-rev flips the visual order AND the
     column proportions so Mykonos's images aren't squeezed into
     the smaller column. Before this fix the reversed row inherited
     1fr / 1.4fr without swapping, so images landed in the 1fr slot. */
  .shape-row { grid-template-columns: 1fr 1.4fr; gap: 4rem; }
  .shape-row-rev { grid-template-columns: 1.4fr 1fr; }
  .shape-row-rev .shape-row-text { order: 2; }
  .shape-row-rev .shape-row-images { order: 1; }
}
.shape-row-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (min-width: 768px) {
  .shape-row-images { gap: 1.5rem; }
}
.shape-row-images figure {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}
/* Card frame for the lens image. Subtle border + soft shadow so the
   white-backgrounded lens has a visible boundary against any section
   color. Two .shape-layer imgs stack in the same grid cell — one
   active, one preloaded with the next colorway — so JS can toggle
   classes for a true crossfade (no flash of empty/wrong-color image).
   `overflow: visible` lets the hover popup escape the frame; the
   ::before gradient gets its own border-radius so it still respects
   the rounded corners without needing overflow:hidden on the parent. */
.shape-frame {
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-radius: 1rem;
  padding: 1rem;
  display: grid;
  place-items: center;
  min-height: 140px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
  position: relative;
  overflow: visible;
  transition: transform 350ms ease, border-color 350ms ease, box-shadow 350ms ease;
}
.shape-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse at center, rgba(30, 91, 190, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.shape-frame:hover {
  border-color: var(--brand-blue);
  box-shadow: 0 12px 28px rgba(30, 91, 190, 0.12);
}
@media (min-width: 768px) {
  .shape-frame { min-height: 200px; padding: 1.5rem; }
}
/* Layers occupy the same grid cell (1 / 1) and cross-fade via opacity.
   `is-active` carries opacity 1; the other layer holds the preloaded
   next colorway invisibly at opacity 0. Transition is slow (1.1s) so
   the cross actually reads as a wash, not a snap. */
.shape-layer {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: contain;
  opacity: 0;
  transition: opacity 1100ms ease, transform 400ms ease;
  z-index: 1;
}
.shape-layer.is-active { opacity: 1; }
@media (min-width: 768px) {
  .shape-layer { max-height: 220px; }
}
.shape-frame:hover .shape-layer.is-active { transform: scale(1.04); }
.shape-row-images figcaption {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-align: center;
}

/* ─── Custom cut grid ────────────────────────────────────────
   Cards live in .custom-cut-grid. On hover, the touched card pops
   forward (scale 1.22, brand border, soft shadow) while every other
   card in the grid dims, shrinks, and blurs — pulled off via the
   :has() selector on the grid container so it's CSS-only. The
   transitions are tuned long (400ms) so the focus-pull reads as a
   deliberate gesture, not a flicker. */
.custom-cut-grid { position: relative; }
.custom-cut-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
  padding: 1.125rem;
  border: 1px solid var(--rule);
  border-radius: 1rem;
  background: var(--surface);
  transition:
    transform 400ms ease,
    border-color 400ms ease,
    box-shadow 400ms ease,
    opacity 400ms ease,
    filter 400ms ease;
  transform-origin: center;
}
@media (min-width: 768px) {
  .custom-cut-card { padding: 1.5rem; gap: 1rem; }
}
.custom-cut-card img {
  display: block;
  width: 100%;
  height: 96px;
  object-fit: contain;
  transition: transform 400ms ease;
}
@media (min-width: 768px) {
  .custom-cut-card img { height: 120px; }
}
.custom-cut-card figcaption {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
}

/* Recede every card when the cursor is over the grid… */
.custom-cut-grid:hover .custom-cut-card {
  opacity: 0.4;
  transform: scale(0.94);
  filter: blur(1.5px);
  border-color: var(--rule);
  box-shadow: none;
}
/* …then promote the one actually being hovered. z-index lifts it
   above siblings; the brand border + shadow tells the eye it's
   active. The image inside also nudges a touch on top of the card
   scale. */
.custom-cut-grid .custom-cut-card:hover {
  opacity: 1;
  transform: scale(1.22);
  filter: none;
  border-color: var(--brand-blue);
  box-shadow: 0 28px 56px rgba(30, 91, 190, 0.22), 0 6px 14px rgba(30, 91, 190, 0.10);
  z-index: 10;
}
.custom-cut-grid .custom-cut-card:hover img { transform: scale(1.05); }

@media (prefers-reduced-motion: reduce) {
  .custom-cut-grid:hover .custom-cut-card,
  .custom-cut-grid .custom-cut-card:hover {
    transform: none;
    filter: none;
    opacity: 1;
  }
}

/* ─── Showcase + generic card hover ───────────────────────────── */
.showcase-card {
  border-radius: 1rem;
  overflow: hidden;
  background: #FFFFFF;
  border: 1px solid var(--rule);
  transition: transform 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
}
.showcase-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-blue);
  box-shadow: 0 14px 32px rgba(30, 91, 190, 0.10);
}
.showcase-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}
.showcase-card:hover img { transform: scale(1.03); }
.showcase-card figcaption {
  padding: 0.875rem 1rem;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--rule-soft);
}

.card-hover { transition: transform 350ms ease, border-color 350ms ease, box-shadow 350ms ease; }
.card-hover:hover { transform: translateY(-4px); border-color: var(--brand-blue); box-shadow: 0 14px 32px rgba(30, 91, 190, 0.10); }

/* ─── Portal cards ────────────────────────────────────────────
   Stacked vertically in the portal section: one card for the
   dashboard, one for the order builder. Each carries a small browser-
   chrome strip above the screenshot so the image reads as a real app
   window, then a row of copy + CTA underneath. Equal weight: neither
   surface reads as the "real" product, both are real. */
.portal-card {
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-radius: 1.25rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.04);
  transition: transform 350ms ease, border-color 350ms ease, box-shadow 350ms ease;
}
.portal-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-blue);
  box-shadow: 0 24px 44px rgba(30, 91, 190, 0.14), 0 6px 16px rgba(17, 24, 39, 0.06);
}

/* Browser-chrome strip — three soft dots on the left + a URL pill
   centred. Gives the screenshot the feel of a real browser tab
   without using the bright traffic-light colours (which would
   pull attention away from the screenshot itself). */
.portal-card-chrome {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.625rem 1rem;
  background: #F4F6FB;
  border-bottom: 1px solid var(--rule);
}
.portal-card-dots {
  display: inline-flex;
  gap: 0.375rem;
  flex-shrink: 0;
}
.portal-card-dots span {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: rgba(17, 24, 39, 0.16);
}
.portal-card-url {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  max-width: 320px;
  margin: 0 auto;
  padding: 0.25rem 0.75rem;
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;
  color: var(--ink-muted);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.portal-card-url svg {
  flex-shrink: 0;
  width: 0.625rem;
  height: 0.625rem;
  color: var(--ink-muted);
}
/* Screenshot fills the card's top frame edge-to-edge.
   • Mobile uses a 1:1 aspect (a dedicated square crop of each
     screenshot is swapped in via <picture>; matters because a 16:10
     dashboard image becomes a thin band on a 360px viewport).
   • Desktop uses 16:10 — matches the source files, no crop, every
     UI element on the screenshot stays visible. */
.portal-card-image {
  background: var(--brand-blue-tint);
  display: block;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}
@media (min-width: 768px) {
  .portal-card-image { aspect-ratio: 16 / 10; }
}
.portal-card-image picture,
.portal-card-image img {
  display: block;
  width: 100%;
  height: 100%;
}
.portal-card-image img {
  object-fit: cover;
  object-position: center;
  transition: transform 500ms ease;
}
.portal-card:hover .portal-card-image img {
  transform: scale(1.02);
}

/* Body row — mobile stacks (title, copy, CTA in a column). Desktop
   shifts to a horizontal feature-row: title + copy on the left,
   CTA pushed to the right and vertically centred. Matches the new
   full-width card silhouette where each card reads as one wide
   row, not a stacked panel. */
.portal-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem;
}
.portal-card-body h3 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.portal-card-body p {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  line-height: 1.65;
}
.portal-card-body .btn {
  margin-top: 0.75rem;
  align-self: flex-start;
  flex-shrink: 0;
}
@media (min-width: 768px) {
  .portal-card-body {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.75rem 2rem;
  }
  .portal-card-body > .portal-card-text { flex: 1; }
  .portal-card-body .btn { margin-top: 0; align-self: center; }
}
