/* ==========================================================================
   Hue & True: the whole site's styles.
   Every color, size and font comes from the tokens in :root. Dark mode
   redefines the same tokens, so nothing below needs to know about it.
   ========================================================================== */

/* ---- Fonts (self-hosted, SIL Open Font License; licences in assets/fonts) */
@font-face {
  font-family: "Montserrat";
  src: url("../assets/fonts/Montserrat-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/Inter-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  --font-display: "Montserrat", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Paint colors: the mark's three primaries and the chips in the hero. */
  --hansa-yellow: #f2c230;
  --cerulean: #2a8fd0;
  --quin-rose: #d8336f;
  --ultramarine: #2f3f9e;
  --burnt-sienna: #a5532e;
  --viridian: #2f7d62;

  /* Surfaces and text: a warm gallery wall. */
  --bg: #f7f3ec;
  --bg-elev: #fffdf9;
  --bg-tint: #efe9df;
  --text: #17202a;
  --text-muted: #56616d;
  --line: rgb(23 32 42 / 0.1);
  --line-strong: rgb(23 32 42 / 0.2);
  --accent: #b8323f;
  --accent-hover: #9c2733;
  --accent-text: #ffffff;
  --shadow: 0 1px 2px rgb(23 32 42 / 0.06), 0 12px 32px rgb(23 32 42 / 0.1);
  --shadow-lg: 0 2px 4px rgb(23 32 42 / 0.06), 0 24px 60px rgb(23 32 42 / 0.16);

  --radius: 14px;
  --radius-lg: 22px;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1160px;
  --section-pad: clamp(4rem, 9vw, 7.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --bg-elev: #151b24;
    --bg-tint: #111720;
    --text: #eef2f6;
    --text-muted: #9eabbb;
    --line: rgb(255 255 255 / 0.09);
    --line-strong: rgb(255 255 255 / 0.18);
    --accent: #e8636f;
    --accent-hover: #f07a85;
    --accent-text: #160a0c;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px rgb(0 0 0 / 0.35);
    --shadow-lg: 0 2px 4px rgb(0 0 0 / 0.3), 0 24px 60px rgb(0 0 0 / 0.5);
  }
}

/* ---- Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--cerulean); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section-pad) 0; }
.section-tint { background: var(--bg-tint); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.h2 { font-size: clamp(1.8rem, 2.2vw + 1.1rem, 2.8rem); font-weight: 800; margin-top: 0.6rem; }
.lede { font-size: clamp(1.1rem, 0.4vw + 1.02rem, 1.3rem); color: var(--text-muted); max-width: 40rem; }
.section-head { display: grid; gap: 1rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  background: var(--accent); color: var(--accent-text);
  font-family: var(--font-display); font-weight: 700; font-size: 0.98rem;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}
.btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--text);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}
.btn-ghost:hover { background: var(--bg-elev); }
.btn .arrow { transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---- Header -------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.wordmark { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; white-space: nowrap; }
.wordmark .amp { color: var(--accent); font-weight: 600; }
.site-nav { display: flex; gap: clamp(0.9rem, 2.5vw, 2rem); }
.site-nav a { text-decoration: none; font-weight: 500; font-size: 0.95rem; color: var(--text-muted); }
.site-nav a:hover { color: var(--text); }

/* ---- Hero ---------------------------------------------------------------- */
.hero { position: relative; padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(4rem, 9vw, 7rem); overflow: hidden; }
.hero::before {
  /* A soft wash of the three primaries behind everything. */
  content: ""; position: absolute; inset: -20% -10% auto auto;
  width: min(900px, 120vw); aspect-ratio: 1;
  background:
    radial-gradient(closest-side at 35% 40%, color-mix(in srgb, var(--hansa-yellow) 32%, transparent), transparent),
    radial-gradient(closest-side at 62% 52%, color-mix(in srgb, var(--quin-rose) 22%, transparent), transparent),
    radial-gradient(closest-side at 48% 70%, color-mix(in srgb, #2aa3c0 26%, transparent), transparent);
  filter: blur(20px);
  pointer-events: none;
}
.hero .container { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: clamp(2rem, 5vw, 4rem); }
.hero h1 { font-size: clamp(2.4rem, 3.8vw + 1rem, 4.4rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.04; margin-top: 1rem; }
.hero h1 .true-colors {
  background: linear-gradient(100deg, var(--quin-rose) 0%, #e0622f 30%, var(--hansa-yellow) 52%, var(--viridian) 74%, var(--cerulean) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero .lede { margin-top: 1.5rem; }
.hero .btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.25rem; }

/* A color target: the left side shows the patches as a camera underwater sees them,
   the right side shows their true color. The cast sweeps back once on load. */
.target {
  width: 100%; max-width: 460px; margin-left: auto;
  background: var(--bg-elev);
  border-radius: 20px;
  padding: clamp(12px, 1.6vw, 18px);
  box-shadow: var(--shadow-lg);
  transform: rotate(-2deg);
}
.patch-wrap { position: relative; isolation: isolate; border-radius: 10px; overflow: hidden; }
.patches { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(6px, 0.9vw, 10px); }
.patch { aspect-ratio: 1; border-radius: 6px; background: var(--c); }
.cast {
  position: absolute; inset: 0 auto 0 0; width: 50%;
  background: linear-gradient(180deg, #6cc6d6 0%, #3d9cbc 100%);
  mix-blend-mode: multiply;
  box-shadow: 2px 0 0 #fff;
}
.split-handle {
  position: absolute; top: 50%; left: 50%; z-index: 1;
  width: 30px; height: 30px; margin: -15px 0 0 -14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.25);
  display: grid; place-items: center;
  font-size: 0.75rem; color: #17202a;
}
.target-labels {
  display: flex; justify-content: space-between; gap: 1rem;
  margin-top: 0.85rem; padding: 0 0.2rem;
  font-family: var(--font-display); font-weight: 700; font-size: 0.8rem;
}
.target-labels span { display: inline-flex; align-items: center; gap: 0.45rem; }
.target-labels span::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }

@media (prefers-reduced-motion: no-preference) {
  .target { animation: target-in 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .cast { animation: restore 1.6s 0.5s cubic-bezier(0.6, 0, 0.2, 1) both; }
  .split-handle { animation: restore-handle 1.6s 0.5s cubic-bezier(0.6, 0, 0.2, 1) both; }
  @keyframes target-in { from { opacity: 0; transform: rotate(0deg) translateY(18px); } }
  @keyframes restore { from { width: 100%; } }
  @keyframes restore-handle { from { left: 100%; opacity: 0; } }
}

/* The water behind the coming-next card. */
.product-art.water {
  position: relative; overflow: hidden; min-height: 280px;
  background: linear-gradient(180deg, #3fb0c9 0%, #16739a 42%, #0b3a5e 78%, #072a45 100%);
}
.water::before {
  /* Light rays from the surface. */
  content: ""; position: absolute; inset: -20% -30% 20%;
  background: repeating-linear-gradient(100deg, rgb(255 255 255 / 0) 0 38px, rgb(255 255 255 / 0.09) 38px 64px, rgb(255 255 255 / 0) 64px 120px);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
}
.depth {
  /* The colors water takes away, in the order it takes them. */
  position: absolute; left: clamp(18px, 3vw, 32px); top: 50%; transform: translateY(-50%);
  display: grid; gap: 10px;
}
.depth span {
  display: block; height: 10px; border-radius: 999px;
  width: var(--w); background: var(--c);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.15);
}
.water figcaption { color: #fff; }
.product + .product { margin-top: clamp(1.25rem, 3vw, 2rem); }
.product.next { box-shadow: var(--shadow); }
.product.next .product-body h3 { font-size: clamp(1.25rem, 0.8vw + 1.05rem, 1.55rem); }
.next-mark {
  width: 56px; height: 56px; border-radius: 14px;
  background: linear-gradient(160deg, #3fb0c9, #0b3a5e);
  display: grid; place-items: center;
}
.next-mark svg { width: 30px; height: 30px; }

/* ---- Principles ---------------------------------------------------------- */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.5vw, 1.75rem); }
.principle {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 2.5vw, 2rem);
}
.principle .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c); margin-bottom: 1.1rem; }
.principle h3 { font-size: 1.2rem; font-weight: 700; }
.principle p { color: var(--text-muted); margin-top: 0.6rem; }

/* ---- Products ------------------------------------------------------------ */
.product {
  display: grid; grid-template-columns: 1.05fr 1fr;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.product-art { position: relative; min-height: 320px; background: #24303c; }
.product-art img { width: 100%; height: 100%; object-fit: cover; }
.product-art figcaption {
  position: absolute; left: 14px; bottom: 14px;
  padding: 0.35rem 0.7rem; border-radius: 999px;
  background: rgb(10 15 22 / 0.62); color: #fff;
  font-size: 0.78rem;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.product-body { padding: clamp(1.75rem, 4vw, 3.25rem); display: flex; flex-direction: column; gap: 1.1rem; justify-content: center; }
.product-id { display: flex; align-items: center; gap: 0.9rem; }
.product-id img { width: 56px; height: 56px; border-radius: 14px; }
.product-id .name { font-family: var(--font-display); font-weight: 800; font-size: 1.55rem; letter-spacing: -0.02em; }
.product-id .kind { font-size: 0.85rem; color: var(--text-muted); }
.product-body h3 { font-size: clamp(1.35rem, 1vw + 1.1rem, 1.75rem); font-weight: 700; }
.product-body p { color: var(--text-muted); }
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.tags li {
  font-size: 0.8rem; font-weight: 500;
  padding: 0.3rem 0.75rem; border-radius: 999px;
  background: var(--bg-tint); border: 1px solid var(--line);
}
.product-body .btn { align-self: flex-start; margin-top: 0.4rem; }
.more { margin-top: 1.5rem; color: var(--text-muted); font-size: 0.95rem; text-align: center; }

/* ---- About and contact --------------------------------------------------- */
.about { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.about .section-head { margin-bottom: 0; }
.about p + p { margin-top: 1rem; }
.about .body p { font-size: 1.1rem; color: var(--text-muted); }
.about .body strong { color: var(--text); font-weight: 600; }

.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1rem, 2.5vw, 1.75rem); }
.contact-card {
  display: block; text-decoration: none;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.75rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.contact-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.contact-card .label { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.contact-card .what { color: var(--text-muted); font-size: 0.95rem; margin-top: 0.25rem; }
.contact-card .address { margin-top: 0.9rem; font-weight: 600; color: var(--accent); overflow-wrap: anywhere; }

/* ---- Footer -------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; color: var(--text-muted); font-size: 0.9rem; }
.site-footer .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.site-footer .brand img { width: 26px; height: 26px; }
.site-footer .wordmark { font-size: 1rem; color: var(--text); }

/* ---- Not found ----------------------------------------------------------- */
.not-found { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.not-found .lede { margin: 1rem auto 2rem; }

/* ---- Narrow screens ------------------------------------------------------ */
@media (max-width: 900px) {
  .hero .container, .product, .about { grid-template-columns: 1fr; }
  .target { margin: 1rem auto 0; }
  .product-art.water { min-height: 220px; aspect-ratio: auto; }
  .product-art { min-height: 0; aspect-ratio: 4 / 3; }
  .principles { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .contact-grid { grid-template-columns: 1fr; }
  .site-nav a.optional { display: none; }
}
