/* ============================================================
   Nixon Solutions — monochrome design
   Palette is strictly greyscale. No accent colours.
   Layering: decorative waves z-index 0 (pointer-events none),
   content z-index 1 — the button is never covered.
   ============================================================ */
:root {
  --bg: #f4f4f3;
  --surface: #ffffff;
  --ink: #111113;
  --ink-2: #6b6b6f;
  --line: rgba(0, 0, 0, 0.10);
  --radius: 16px;
  --maxw: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: var(--ink); text-decoration: none; }
section { position: relative; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
    backdrop-filter 0.3s var(--ease);
}
.nav.scrolled {
  background: rgba(244, 244, 243, 0.72);
  backdrop-filter: saturate(140%) blur(18px);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  border-bottom-color: var(--line);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  height: 62px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.brand-mark { display: block; }
.nav-links { display: flex; gap: 38px; }
.nav-links a {
  color: var(--ink);
  opacity: 0.82;
  font-size: 15px;
  font-weight: 400;
  transition: opacity 0.2s ease;
}
.nav-links a:hover { opacity: 1; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 24px 0;
  overflow: hidden;
}
.hero-content {
  position: relative;
  z-index: 1;              /* always above the waves */
}
.hero h1 {
  font-size: clamp(52px, 10vw, 116px);
  line-height: 1.0;
  font-weight: 600;
  letter-spacing: -0.035em;
  margin: 0;
}
.tagline {
  margin: 26px auto 0;
  font-size: clamp(18px, 2.6vw, 25px);
  color: var(--ink-2);
  font-weight: 400;
}
.btn {
  margin-top: 42px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn svg { transition: transform 0.25s var(--ease); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.10); }
.btn:hover svg { transform: translateY(3px); }

/* ---------- Flowing waves ---------- */
.waves {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 0;
  pointer-events: none;
  width: 100%;
  height: 46vh;
  min-height: 300px;
}
.waves svg { width: 100%; height: 100%; display: block; }

/* Each ribbon drifts sideways at its own slow pace; soft shadow adds depth. */
.wlayer { animation: drift linear infinite; }
.wlayer-1 { animation-duration: 46s; filter: drop-shadow(0 -10px 18px rgba(0,0,0,0.12)); }
.wlayer-2 { animation-duration: 60s; animation-direction: reverse; filter: drop-shadow(0 -10px 18px rgba(0,0,0,0.10)); }
.wlayer-3 { animation-duration: 78s; filter: drop-shadow(0 -10px 18px rgba(0,0,0,0.09)); }
.wlayer-4 { animation-duration: 96s; animation-direction: reverse; filter: drop-shadow(0 -8px 14px rgba(0,0,0,0.08)); }

@keyframes drift {
  from { transform: translateX(0); }
  to   { transform: translateX(-1440px); }  /* one wavelength → seamless loop */
}

/* ---------- Products (glass 3D cards) ---------- */
.products {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 90px 32px 40px;
}
/* Soft greyscale blobs give the frosted glass something to refract. */
.products-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.products-bg span {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.7;
}
.products-bg span:nth-child(1) {
  width: 460px; height: 460px; top: 40px; left: -60px;
  background: radial-gradient(circle at 40% 40%, #ffffff, #d8d8d4 70%, transparent 75%);
}
.products-bg span:nth-child(2) {
  width: 420px; height: 420px; bottom: -40px; right: -40px;
  background: radial-gradient(circle at 50% 50%, #e8e8e4, #cfcfca 68%, transparent 74%);
}

.section-head { position: relative; z-index: 1; text-align: center; max-width: 720px; margin: 0 auto 52px; }
.section-eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-2); margin: 0 0 12px;
}
.section-head h2 {
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 600; letter-spacing: -0.03em; margin: 0;
}

.product-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  perspective: 1300px;             /* enables the 3D tilt */
}
.product-card {
  position: relative;
  display: block;
  border-radius: 26px;
  padding: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.14),
    0 2px 8px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform-style: preserve-3d;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
  will-change: transform;
  overflow: hidden;
  max-height: 50vh;               /* never taller than half the viewport */
}
.product-card:hover {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.9),
    0 0 46px rgba(255, 255, 255, 0.55),   /* soft glow */
    0 34px 74px rgba(0, 0, 0, 0.22),
    0 4px 12px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}
.pc-inner { display: block; transform: translateZ(0.01px); }
.pc-media {
  position: relative;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  transform: translateZ(40px);      /* lifts the image toward the viewer */
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
  height: clamp(180px, 30vh, 320px);
}
.pc-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
/* Hover overlay — the whole card is the link */
.pc-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 17, 19, 0.34);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.pc-overlay-txt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 21px;
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.92);
  color: #111113;
  font-size: 15px;
  font-weight: 600;
  transform: translateY(8px) scale(0.96);
  transition: transform 0.35s var(--ease);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
}
.product-card:hover .pc-overlay { opacity: 1; }
.product-card:hover .pc-overlay-txt { transform: translateY(0) scale(1); }

.pc-body { display: block; padding: 15px 10px 7px; transform: translateZ(26px); }
.pc-title { display: block; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.pc-desc { display: block; margin-top: 6px; color: var(--ink-2); font-size: 14.5px; line-height: 1.45; }

/* Moving light glare */
.pc-glare {
  position: absolute;
  inset: 0;
  border-radius: 26px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  background: radial-gradient(
    circle at var(--gx, 50%) var(--gy, 0%),
    rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 45%);
  mix-blend-mode: soft-light;
}
.product-card:hover .pc-glare { opacity: 1; }

/* ---------- Company details ---------- */
.details {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 110px 32px 70px;
}
.details-title {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0 0 40px;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.detail {
  background: var(--surface);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.detail-wide { grid-column: 1 / -1; }
.detail .k {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.detail .v {
  font-size: 17px;
  color: var(--ink);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}
.detail .v a { font-weight: 500; border-bottom: 1px solid transparent; transition: border-color 0.2s ease; }
.detail .v a:hover { border-bottom-color: var(--ink); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg); }
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 26px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink-2);
  font-size: 13px;
}
.footer a { color: var(--ink-2); }
.footer a:hover { color: var(--ink); }
.footer .dot { margin: 0 10px; }

/* ---------- Privacy hub + policy documents ---------- */
.doc-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 130px 32px 80px;
}
.doc-head { margin-bottom: 44px; }
.doc-head h1 {
  font-size: clamp(34px, 6vw, 54px);
  font-weight: 600; letter-spacing: -0.03em; margin: 6px 0 0;
}
.doc-sub { color: var(--ink-2); font-size: 18px; margin: 14px 0 0; }

/* List of policies */
.policy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.policy-item {
  display: flex; align-items: center; gap: 20px;
  padding: 24px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.policy-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.09);
  border-color: rgba(0, 0, 0, 0.16);
}
.pi-text { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.pi-name { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.pi-ext { font-size: 12px; font-weight: 500; color: var(--ink-2); vertical-align: middle; }
.pi-desc { font-size: 15px; color: var(--ink-2); }
.pi-arrow { color: var(--ink-2); flex: none; transition: transform 0.25s var(--ease); }
.policy-item:hover .pi-arrow { transform: translateX(3px); }

/* Back link */
.doc-back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink-2); font-size: 15px; font-weight: 500;
  margin-bottom: 30px;
}
.doc-back:hover { color: var(--ink); }

/* Rendered markdown */
.doc { color: var(--ink); font-size: 16.5px; line-height: 1.65; }
.doc h1 { font-size: clamp(32px, 5vw, 46px); font-weight: 600; letter-spacing: -0.03em; margin: 0 0 8px; }
.doc h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin: 44px 0 12px; }
.doc h3 { font-size: 19px; font-weight: 600; margin: 28px 0 8px; }
.doc p { margin: 0 0 16px; }
.doc ul, .doc ol { margin: 0 0 18px; padding-left: 22px; }
.doc li { margin: 0 0 8px; }
.doc li::marker { color: var(--ink-2); }
.doc a { color: var(--ink); font-weight: 500; border-bottom: 1px solid rgba(0,0,0,0.28); }
.doc a:hover { border-bottom-color: var(--ink); }
.doc strong { font-weight: 600; }
.doc code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 6px; border-radius: 6px;
}
.doc em { font-style: italic; color: var(--ink-2); }
.doc-loading, .doc-error { color: var(--ink-2); }
.doc-error { color: #7a2020; }

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .nav-links { gap: 20px; }
  .nav-links a { font-size: 14px; }
  .detail-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 10px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .wlayer { animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .pc-media, .pc-body { transform: none !important; }
}
