/* Tidewell Pool Co. — design system */

:root {
  /* Neutrals (warm cream → ink) */
  --bg: oklch(97.5% 0.006 85);
  --bg-2: oklch(95% 0.008 85);
  --paper: oklch(99% 0.004 85);
  --ink: oklch(18% 0.015 240);
  --ink-2: oklch(35% 0.015 240);
  --ink-3: oklch(52% 0.012 240);
  --hair: oklch(88% 0.01 85);
  --hair-strong: oklch(80% 0.012 85);

  /* Accent — pool aqua (default) */
  --accent: oklch(58% 0.12 220);
  --accent-deep: oklch(42% 0.11 230);
  --accent-soft: oklch(92% 0.04 220);

  /* Type */
  --display: "Instrument Serif", "Cormorant Garamond", Georgia, serif;
  --sans: "Geist", "Inter", system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;

  /* Sizes */
  --rad: 4px;
  --rad-lg: 14px;
  --maxw: 1360px;
  --pad: clamp(20px, 4vw, 56px);
}

[data-palette="forest"] {
  --accent: oklch(48% 0.09 155);
  --accent-deep: oklch(34% 0.08 160);
  --accent-soft: oklch(92% 0.04 155);
}
[data-palette="sand"] {
  --accent: oklch(55% 0.1 55);
  --accent-deep: oklch(40% 0.09 50);
  --accent-soft: oklch(93% 0.04 70);
}
[data-palette="ink"] {
  --accent: oklch(28% 0.04 240);
  --accent-deep: oklch(20% 0.03 240);
  --accent-soft: oklch(92% 0.01 240);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

/* ——————— Typography ——————— */
.display {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.01em;
  line-height: 0.95;
  color: var(--ink);
}
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.mono { font-family: var(--mono); }

/* ——————— Layout ——————— */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}
.section {
  padding: clamp(64px, 8vw, 120px) 0;
  border-top: 1px solid var(--hair);
}
.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 56px;
}
.section-head h2 {
  margin: 16px 0 0;
  font-size: clamp(40px, 5vw, 68px);
}
.section-head p {
  font-size: 16px;
  color: var(--ink-2);
  max-width: 44ch;
  margin: 0;
  line-height: 1.55;
}

/* ——————— Header ——————— */
.topbar {
  background: var(--ink);
  color: oklch(85% 0.01 240);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 34px;
  white-space: nowrap;
  overflow: hidden;
}
.topbar .links { display: flex; gap: 24px; flex-shrink: 0; }
.topbar .links a { opacity: 0.8; }
.topbar .links a:hover { opacity: 1; color: var(--accent-soft); }

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--hair);
}
.header .container {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 76px;
  gap: 40px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 26px;
  font-style: italic;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, oklch(96% 0.05 220), var(--accent) 60%, var(--accent-deep));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ink) 18%, transparent);
}
.nav {
  display: flex;
  gap: 32px;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
}
.nav a {
  color: var(--ink-2);
  position: relative;
  padding: 6px 2px;
  transition: color 0.15s;
}
.nav a:hover { color: var(--ink); }
.nav a.has-sub::after {
  content: "";
  display: inline-block;
  width: 4px; height: 4px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  margin-left: 6px;
  opacity: 0.6;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Region pill */
.region-toggle {
  display: inline-flex;
  border: 1px solid var(--hair-strong);
  border-radius: 999px;
  padding: 3px;
  background: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.region-toggle button {
  border: 0;
  background: transparent;
  padding: 6px 12px;
  color: var(--ink-3);
  border-radius: 999px;
  text-transform: uppercase;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
}
.region-toggle button.active {
  background: var(--ink);
  color: var(--bg);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  transition: transform 0.15s, background 0.15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--hair-strong);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn .arr {
  display: inline-block;
  width: 14px; height: 14px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-left: 2px;
  position: relative;
  top: -1px;
}
.btn .arr::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 1.5px;
  background: currentColor;
  top: 12px;
  left: -8px;
  transform: rotate(-45deg);
  transform-origin: right center;
}

/* ——————— Hero ——————— */
.hero {
  padding: clamp(40px, 6vw, 80px) 0 clamp(40px, 4vw, 60px);
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: end;
}
.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(64px, 9vw, 148px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}
.hero h1 em {
  font-style: italic;
  color: var(--accent-deep);
}
.hero h1 .swash {
  font-style: italic;
}
.hero-sub {
  margin-top: 28px;
  font-size: 18px;
  color: var(--ink-2);
  max-width: 50ch;
  line-height: 1.5;
}
.hero-cta {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--hair);
}
.hero-meta dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 6px;
}
.hero-meta dd {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.hero-meta dd .unit {
  font-family: var(--sans);
  font-style: normal;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: 0;
  margin-left: 4px;
  vertical-align: middle;
}

.hero-visual {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--rad-lg);
  overflow: hidden;
  background: var(--ink);
  isolation: isolate;
}
.hero-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.8) contrast(1.08) brightness(0.92);
}
.hero-visual::before {
  /* editorial cool wash on hero photo */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    color-mix(in oklab, var(--accent-deep) 14%, transparent) 0%,
    transparent 40%,
    color-mix(in oklab, var(--ink) 30%, transparent) 100%);
  mix-blend-mode: multiply;
  z-index: 1;
}
.hero-visual::after {
  /* grain texture for editorial feel */
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(115deg,
    oklch(100% 0 0 / 0) 0px,
    oklch(100% 0 0 / 0.025) 1px,
    oklch(100% 0 0 / 0) 3px,
    oklch(100% 0 0 / 0) 12px);
  mix-blend-mode: screen;
  z-index: 2;
}
.hero-visual .placeholder-tag,
.hero-visual .float-card { z-index: 3; }
.hero-visual .placeholder-tag {
  position: absolute;
  left: 16px; bottom: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: oklch(99% 0 0 / 0.8);
  background: oklch(20% 0.02 240 / 0.5);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid oklch(100% 0 0 / 0.18);
  backdrop-filter: blur(6px);
}
.hero-visual .float-card {
  position: absolute;
  right: 18px;
  top: 18px;
  background: var(--paper);
  color: var(--ink);
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  box-shadow: 0 10px 30px oklch(0% 0 0 / 0.18);
  min-width: 220px;
}
.float-card .dot {
  width: 8px; height: 8px;
  background: oklch(64% 0.18 145);
  border-radius: 50%;
  box-shadow: 0 0 0 4px oklch(64% 0.18 145 / 0.2);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px oklch(64% 0.18 145 / 0.2); }
  50% { box-shadow: 0 0 0 8px oklch(64% 0.18 145 / 0.05); }
}
.float-card .label {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}
.float-card .value {
  font-family: var(--display);
  font-style: italic;
  font-size: 22px;
  line-height: 1;
  margin-top: 2px;
}

/* ——————— Marquee bar ——————— */
.marquee {
  background: var(--ink);
  color: var(--bg);
  overflow: hidden;
  padding: 18px 0;
}
.marquee-track {
  display: flex;
  gap: 60px;
  animation: marquee 35s linear infinite;
  white-space: nowrap;
  font-family: var(--display);
  font-style: italic;
  font-size: 26px;
  letter-spacing: -0.01em;
}
.marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 60px;
}
.marquee-track .dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ——————— Product grid ——————— */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
}
.product-card {
  background: var(--bg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 320px;
  position: relative;
  transition: background 0.25s;
  cursor: pointer;
}
.product-card:hover { background: var(--bg-2); }
.product-card .pc-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.14em;
  display: none; /* now lives inside the image as a badge */
}
.product-card .pc-img {
  flex: 1;
  background: var(--ink);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 200px;
}
.product-card .pc-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.05) brightness(0.94);
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1), filter 0.4s;
}
.product-card:hover .pc-img img {
  transform: scale(1.04);
  filter: saturate(1) contrast(1.05) brightness(1);
}
.product-card .pc-img::before {
  /* subtle cool wash to unify mixed-source photography */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    color-mix(in oklab, var(--accent-deep) 12%, transparent) 0%,
    transparent 30%,
    transparent 65%,
    color-mix(in oklab, var(--ink) 50%, transparent) 100%);
  z-index: 1;
  pointer-events: none;
}
.product-card .pc-img .pc-num-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: color-mix(in oklab, var(--ink) 65%, transparent);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid oklch(100% 0 0 / 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  white-space: nowrap;
}
.product-card .pc-img .pc-caption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: oklch(100% 0 0 / 0.78);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.product-card .pc-img .pc-caption > span {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.product-card .pc-img svg { width: 60%; height: auto; opacity: 0.85; }
.product-card .pc-title {
  font-family: var(--display);
  font-style: italic;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.01em;
}
.product-card .pc-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--ink-3);
}
.product-card .pc-meta .arrow {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--hair-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.product-card:hover .pc-meta .arrow {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  transform: translate(2px, -2px);
}
.product-card.featured {
  grid-column: span 2;
  grid-row: span 2;
  background: var(--ink);
  color: var(--bg);
}
.product-card.featured .pc-img {
  min-height: 320px;
}
.product-card.featured .pc-img img {
  filter: saturate(0.7) contrast(1.1) brightness(0.85);
}
.product-card.featured .pc-img::before {
  background: linear-gradient(180deg,
    color-mix(in oklab, var(--accent-deep) 22%, transparent) 0%,
    transparent 40%,
    color-mix(in oklab, var(--ink) 75%, transparent) 100%);
}
.product-card.featured .pc-num { color: oklch(75% 0.02 240); }
.product-card.featured:hover { background: oklch(15% 0.015 240); }
.product-card.featured .pc-meta { color: oklch(75% 0.02 240); }
.product-card.featured .pc-meta .arrow { border-color: oklch(75% 0.02 240 / 0.4); color: var(--bg); }

/* Card style variants */
[data-cardstyle="bordered"] .product-card {
  border-radius: 0;
}
[data-cardstyle="soft"] .product-grid {
  background: transparent;
  gap: 14px;
  border: 0;
}
[data-cardstyle="soft"] .product-card {
  border-radius: 14px;
  border: 1px solid var(--hair);
  background: var(--paper);
}
[data-cardstyle="soft"] .product-card.featured {
  background: var(--ink);
  border-color: var(--ink);
}

/* ——————— Certifications ——————— */
.certs {
  background: var(--paper);
}
.certs-grid {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 56px;
  align-items: start;
}
.certs-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
}
.cert-item {
  background: var(--paper);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 180px;
}
.cert-badge {
  width: 56px;
  height: 56px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  font-weight: 600;
  text-align: center;
  line-height: 1.1;
}
.cert-item h4 {
  font-family: var(--display);
  font-style: italic;
  font-size: 22px;
  margin: 0;
  line-height: 1;
}
.cert-item p {
  font-size: 13px;
  color: var(--ink-2);
  margin: 0;
  line-height: 1.5;
}

/* ——————— Planner ——————— */
.planner {
  background: var(--ink);
  color: var(--bg);
}
.planner .section-head h2 { color: var(--bg); }
.planner .section-head p { color: oklch(78% 0.02 240); }
.planner .eyebrow { color: oklch(70% 0.04 220); }

.planner-card {
  background: oklch(22% 0.02 240);
  border: 1px solid oklch(30% 0.02 240);
  border-radius: var(--rad-lg);
  padding: clamp(28px, 4vw, 48px);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: stretch;
}
.planner-form .form-group {
  margin-bottom: 28px;
}
.planner-form label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: oklch(70% 0.02 240);
  margin-bottom: 12px;
}
.planner-form .options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.planner-form .options button {
  background: transparent;
  color: var(--bg);
  border: 1px solid oklch(40% 0.02 240);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-family: inherit;
  transition: all 0.15s;
}
.planner-form .options button:hover { border-color: oklch(65% 0.02 240); }
.planner-form .options button.active {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--bg);
}
.planner-form input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}
.range-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--display);
  font-style: italic;
  font-size: 32px;
  line-height: 1;
  margin-bottom: 12px;
}
.range-row .unit {
  font-family: var(--sans);
  font-style: normal;
  font-size: 12px;
  color: oklch(70% 0.02 240);
  align-self: end;
  margin-bottom: 4px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.planner-summary {
  background: oklch(15% 0.015 240);
  border-radius: 10px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.planner-summary h3 {
  font-family: var(--display);
  font-style: italic;
  font-size: 28px;
  margin: 0 0 4px;
  line-height: 1;
}
.planner-summary .sub {
  font-size: 12px;
  color: oklch(70% 0.02 240);
  margin-bottom: 22px;
}
.planner-summary .line {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid oklch(28% 0.02 240);
  font-size: 13px;
}
.planner-summary .line:last-of-type { border-bottom: 0; }
.planner-summary .line .name { color: oklch(80% 0.02 240); }
.planner-summary .line .val { font-family: var(--mono); color: var(--bg); }
.planner-summary .total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid oklch(35% 0.02 240);
}
.planner-summary .total .label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: oklch(70% 0.02 240);
}
.planner-summary .total .amt {
  font-family: var(--display);
  font-style: italic;
  font-size: 44px;
  line-height: 1;
  color: var(--accent-soft);
}
.planner-summary .total .amt .ccy {
  font-family: var(--mono);
  font-style: normal;
  font-size: 11px;
  color: oklch(70% 0.02 240);
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0.1em;
}
.planner-summary .btn-light {
  margin-top: 24px;
  background: var(--bg);
  color: var(--ink);
  border-color: var(--bg);
  justify-content: center;
}

/* ——————— Applications ——————— */
.applications {
  background: var(--bg-2);
}
.app-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(360px, 1fr);
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 16px;
  scrollbar-width: thin;
}
.app-card {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.app-img {
  aspect-ratio: 4/3;
  border-radius: var(--rad-lg);
  background: linear-gradient(135deg, oklch(60% 0.08 220), oklch(40% 0.08 235));
  position: relative;
  overflow: hidden;
}
.app-img.var-2 { background: linear-gradient(135deg, oklch(70% 0.06 200), oklch(35% 0.06 215)); }
.app-img.var-3 { background: linear-gradient(135deg, oklch(50% 0.07 230), oklch(25% 0.05 240)); }
.app-img.var-4 { background: linear-gradient(135deg, oklch(65% 0.09 195), oklch(45% 0.09 220)); }
.app-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(110deg, oklch(100% 0 0 / 0) 0, oklch(100% 0 0 / 0.05) 1px, oklch(100% 0 0 / 0) 4px, oklch(100% 0 0 / 0) 16px);
}
.app-img .loc {
  position: absolute;
  left: 16px; top: 16px;
  background: oklch(20% 0.02 240 / 0.55);
  color: var(--bg);
  border: 1px solid oklch(100% 0 0 / 0.18);
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}
.app-img .ph {
  position: absolute;
  right: 16px;
  bottom: 16px;
  font-family: var(--mono);
  font-size: 9px;
  color: oklch(100% 0 0 / 0.7);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.app-card h3 {
  font-family: var(--display);
  font-style: italic;
  font-size: 30px;
  margin: 0;
  line-height: 1;
}
.app-card .meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--ink-3);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ——————— Resources ——————— */
.resources-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}
.res-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 0;
  border-top: 1px solid var(--hair);
  transition: padding 0.2s;
  cursor: pointer;
}
.res-card:hover { padding-left: 8px; }
.res-card .tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent-deep);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.res-card h4 {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(26px, 2.5vw, 36px);
  line-height: 1.05;
  margin: 0;
  letter-spacing: -0.01em;
}
.res-card .date {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: auto;
}
.res-card.feature h4 {
  font-size: clamp(34px, 3.6vw, 52px);
}

/* ——————— Footer ——————— */
.footer {
  background: var(--ink);
  color: oklch(80% 0.01 240);
  padding: 80px 0 40px;
}
.footer-display {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(72px, 12vw, 200px);
  line-height: 0.85;
  letter-spacing: -0.03em;
  color: var(--bg);
  padding-bottom: 56px;
  border-bottom: 1px solid oklch(30% 0.015 240);
  margin-bottom: 48px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid oklch(30% 0.015 240);
}
.footer h5 {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: oklch(60% 0.02 240);
  margin: 0 0 18px;
  font-weight: 500;
}
.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer a:hover { color: var(--bg); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: oklch(55% 0.01 240);
}
.footer-bottom .legal { display: flex; gap: 24px; }
.subscribe {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.subscribe input {
  background: transparent;
  border: 0;
  border-bottom: 1px solid oklch(35% 0.015 240);
  padding: 10px 0;
  color: var(--bg);
  font: inherit;
  flex: 1;
}
.subscribe input::placeholder { color: oklch(55% 0.01 240); }
.subscribe input:focus { outline: 0; border-color: var(--bg); }
.subscribe button {
  background: transparent;
  border: 0;
  color: var(--bg);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}

/* ——————— Hero variant: image-first ——————— */
[data-hero="imagefirst"] .hero-grid {
  grid-template-columns: 1fr;
}
[data-hero="imagefirst"] .hero-visual {
  aspect-ratio: 21/9;
  order: -1;
  margin-bottom: 56px;
}
[data-hero="imagefirst"] .hero h1 { font-size: clamp(56px, 7vw, 120px); }

/* ——————— Hero variant: centered ——————— */
[data-hero="centered"] .hero-grid {
  grid-template-columns: 1fr;
  text-align: center;
  justify-items: center;
}
[data-hero="centered"] .hero-sub { margin-left: auto; margin-right: auto; }
[data-hero="centered"] .hero-cta { justify-content: center; }
[data-hero="centered"] .hero-meta { width: 100%; }
[data-hero="centered"] .hero-visual {
  aspect-ratio: 21/9;
  margin-top: 56px;
  width: 100%;
}

/* ——————— Responsive ——————— */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-card.featured { grid-column: span 2; grid-row: auto; }
  .section-head { grid-template-columns: 1fr; gap: 16px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { aspect-ratio: 16/9; margin-top: 40px; }
  .certs-grid { grid-template-columns: 1fr; }
  .planner-card { grid-template-columns: 1fr; }
  .resources-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .nav { display: none; }
  .topbar .links:first-child { display: none; }
}
@media (max-width: 640px) {
  .product-grid { grid-template-columns: 1fr; }
  .product-card.featured { grid-column: auto; }
  .hero-meta { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .topbar .links { display: none; }
}

/* ═══════════════════════════════════════
   PRODUCT CATALOG PAGE
   ═══════════════════════════════════════ */
.page-hero {
  padding: clamp(80px, 10vw, 140px) 0 clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--hair);
}
.page-hero .crumb {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 24px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.page-hero .crumb a:hover { color: var(--ink); }
.page-hero h1 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(56px, 8vw, 140px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin: 0;
}
.page-hero h1 em { font-style: italic; color: var(--accent-deep); }
.page-hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: end;
  margin-top: 28px;
}
.page-hero-lead {
  font-size: 17px;
  color: var(--ink-2);
  max-width: 50ch;
  line-height: 1.55;
}
.page-hero-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: grid;
  grid-template-columns: auto auto;
  gap: 8px 18px;
  justify-content: end;
  text-align: right;
}

.catalog-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 0;
  border-bottom: 1px solid var(--hair);
  flex-wrap: wrap;
}
.catalog-filters .label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.catalog-filters .chip {
  border: 1px solid var(--hair-strong);
  background: transparent;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-2);
  transition: all 0.15s;
}
.catalog-filters .chip:hover { border-color: var(--ink); color: var(--ink); }
.catalog-filters .chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.catalog-filters .count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
}

/* ═══════════════════════════════════════
   PRODUCT DETAIL PAGE
   ═══════════════════════════════════════ */
.pd-top {
  padding: clamp(40px, 5vw, 80px) 0;
  border-bottom: 1px solid var(--hair);
}
.pd-top .crumb {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 32px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  white-space: nowrap;
}
.pd-top .crumb a:hover { color: var(--ink); }
.pd-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}
.pd-gallery {
  position: sticky;
  top: 100px;
}
.pd-main-img {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--rad-lg);
  background: var(--ink);
  overflow: hidden;
}
.pd-main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.05) brightness(0.95);
}
.pd-main-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    color-mix(in oklab, var(--accent-deep) 12%, transparent) 0%,
    transparent 35%,
    color-mix(in oklab, var(--ink) 35%, transparent) 100%);
  pointer-events: none;
}
.pd-main-img .tag {
  position: absolute;
  top: 16px; left: 16px;
  z-index: 2;
  background: color-mix(in oklab, var(--ink) 65%, transparent);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid oklch(100% 0 0 / 0.18);
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  white-space: nowrap;
}
.pd-main-img .caption {
  position: absolute;
  left: 16px; right: 16px;
  bottom: 16px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: oklch(100% 0 0 / 0.75);
}
.pd-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.pd-thumb {
  aspect-ratio: 1;
  background: var(--ink);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border 0.15s;
}
.pd-thumb.active { border-color: var(--ink); }
.pd-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.7) brightness(0.9);
}
.pd-thumb.alt-1 { filter: hue-rotate(8deg); }
.pd-thumb.alt-2 { filter: brightness(0.85); }
.pd-thumb.alt-3 { filter: contrast(1.1) brightness(0.9); }

.pd-info .eyebrow { margin-bottom: 8px; }
.pd-info h1 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(48px, 6vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.pd-info .lead {
  font-size: 17px;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0 0 32px;
  max-width: 50ch;
}
.pd-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  margin-bottom: 28px;
}
.pd-price {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  color: var(--ink);
}
.pd-price .ccy {
  font-family: var(--mono);
  font-style: normal;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.12em;
  margin-left: 8px;
  vertical-align: 0.4em;
}
.pd-price .from {
  font-family: var(--mono);
  font-style: normal;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}
.pd-stock {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-align: right;
}
.pd-stock .dot {
  display: inline-block;
  width: 7px; height: 7px;
  background: oklch(64% 0.18 145);
  border-radius: 50%;
  margin-right: 6px;
  box-shadow: 0 0 0 3px oklch(64% 0.18 145 / 0.18);
}

.pd-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.pd-specs {
  margin-top: 24px;
}
.pd-specs h3 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 18px;
  font-weight: 500;
}
.pd-specs dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0;
}
.pd-specs .spec {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid var(--hair);
  font-size: 14px;
}
.pd-specs .spec dt { color: var(--ink-3); }
.pd-specs .spec dd {
  margin: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
}

.pd-bom {
  margin-top: 40px;
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: var(--rad-lg);
}
.pd-bom h3 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 14px;
  font-weight: 500;
}
.pd-bom ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}
.pd-bom li {
  font-size: 14px;
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.pd-bom li::before {
  content: "";
  width: 4px; height: 4px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  transform: translateY(-2px);
}

/* Related products row */
.pd-related {
  border-top: 1px solid var(--hair);
}
.pd-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
}

/* ═══════════════════════════════════════
   ABOUT / APPLICATIONS / CONTACT
   ═══════════════════════════════════════ */
.story {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
  margin-bottom: 80px;
}
.story h2 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 8px 0 0;
}
.story h2 em { color: var(--accent-deep); }
.story-body p {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 18px;
  max-width: 60ch;
}
.story-body p strong { color: var(--ink); font-weight: 500; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  margin: 64px 0;
}
.stat {
  padding: 32px 24px;
  border-right: 1px solid var(--hair);
}
.stat:last-child { border-right: 0; }
.stat dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.stat dd {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(40px, 4.5vw, 64px);
  line-height: 1;
  letter-spacing: -0.01em;
}
.stat dd .unit {
  font-family: var(--sans);
  font-style: normal;
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0;
  margin-left: 6px;
  vertical-align: 0.6em;
}

/* Applications page */
.app-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.app-grid .app-card { gap: 20px; }
.app-grid .app-img { aspect-ratio: 5/4; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.contact-card {
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: var(--rad-lg);
}
.contact-card h4 {
  font-family: var(--display);
  font-style: italic;
  font-size: 30px;
  margin: 0 0 18px;
  line-height: 1;
}
.contact-card .row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--hair);
  font-size: 14px;
}
.contact-card .row:first-of-type { border-top: 0; padding-top: 0; }
.contact-card .row .k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.contact-form {
  display: grid;
  gap: 18px;
}
.contact-form label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: block;
  margin-bottom: 8px;
}
.contact-form .field {
  display: flex;
  flex-direction: column;
}
.contact-form input,
.contact-form textarea,
.contact-form select {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hair-strong);
  padding: 12px 0;
  font: inherit;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
}
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus { border-color: var(--ink); }
.contact-form textarea { min-height: 100px; resize: vertical; }
.contact-form .row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

/* Page-level back-link in pd-related */
@media (max-width: 1024px) {
  .pd-grid { grid-template-columns: 1fr; }
  .pd-gallery { position: static; }
  .pd-specs dl { grid-template-columns: 1fr; }
  .pd-bom ul { grid-template-columns: 1fr; }
  .pd-related-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--hair); }
  .story { grid-template-columns: 1fr; }
  .app-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .page-hero-grid { grid-template-columns: 1fr; }
  .page-hero-meta { justify-content: start; text-align: left; }
}
