/* ==========================================================================
   ReefIQ — reefiq.tech
   "Daylight Reef" design system · light, calm, evidence-forward
   Brand tokens mirror the ReefIQ app (AppColors); light-mode variant 2026-07-17.
   ========================================================================== */

:root {
  /* Brand */
  --brand:        #0070FF;
  --brand-deep:   #0056C6;
  --cyan:         #00A9DE;   /* deepened for legibility on white */
  --cyan-bright:  #00D1FF;   /* gradients / glows only */
  --violet:       #9C3FD1;   /* deepened for legibility on white */
  --teal:         #0B9E6E;
  --amber:        #C98A1F;
  --rose:         #D93359;

  /* Daylight surfaces */
  --ink:          #0B1B33;
  --bg:           #F7FAFD;
  --bg-2:         #FFFFFF;
  --surface:      #FFFFFF;
  --surface-2:    #F1F6FC;
  --surface-3:    #E7EFF9;
  --line:         rgba(11,42,84,0.10);
  --line-strong:  rgba(11,42,84,0.18);

  /* Text */
  --text:         #1C2B45;
  --text-2:       #4A5D80;
  --text-3:       #7688A6;

  /* Effects */
  --glow-blue:    rgba(0,112,255,0.18);
  --glow-cyan:    rgba(0,209,255,0.14);
  --shadow-card:  0 24px 50px rgba(23,59,110,0.10);
  --shadow-deep:  0 30px 70px rgba(23,59,110,0.14);
  --radius:       20px;
  --radius-lg:    28px;
  --radius-sm:    12px;
  --maxw:         1120px;

  --grad-brand:   linear-gradient(135deg, #0070FF 0%, #00D1FF 100%);
  --grad-brand-v: linear-gradient(135deg, #0056C6 0%, #0095D6 60%, #9C3FD1 130%);

  /* Typography mirrors the ReefIQ app: Manrope headings · Inter body · JetBrains Mono data */
  --font-display: "Manrope", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-body:    "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", monospace;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

/* Keyboard focus ring — visible on the light theme, hidden for mouse users */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
:focus:not(:focus-visible) { outline: none; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  letter-spacing: 0.1px;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Atmospheric background: daylight gradient + soft reef glows + faint grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 720px at 78% -8%, rgba(0,112,255,0.10), transparent 60%),
    radial-gradient(900px 620px at 6% 8%,  rgba(0,209,255,0.08), transparent 55%),
    radial-gradient(1200px 900px at 50% 118%, rgba(156,63,209,0.06), transparent 60%),
    linear-gradient(180deg, #FFFFFF 0%, #F5F9FD 45%, #F2F7FC 100%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
}

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { position: relative; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; color: var(--ink); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--brand-deep);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: linear-gradient(90deg, var(--brand-deep), transparent); }
.grad-text { background: var(--grad-brand-v); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  background: rgba(255,255,255,0.75);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
/* The two-tone wordmark sits directly on the light nav — no chip needed */
.brand img { height: 46px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--text-2); text-decoration: none; font-size: 0.92rem; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { padding: 9px 18px; border-radius: 999px; background: var(--grad-brand); color: #fff !important; font-weight: 600; box-shadow: 0 6px 20px rgba(0,112,255,0.28); }
.nav-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-body); font-weight: 600; font-size: 0.98rem; padding: 14px 24px; border-radius: 999px; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform .18s ease, box-shadow .25s ease, background .25s; }
.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: 0 10px 30px rgba(0,112,255,0.30); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(0,112,255,0.40); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-strong); box-shadow: 0 6px 18px rgba(23,59,110,0.08); }
.btn-ghost:hover { background: var(--surface-2); transform: translateY(-2px); }
.btn svg { width: 20px; height: 20px; }
.btn small { display: block; font-size: 0.66rem; font-weight: 500; opacity: 0.8; letter-spacing: 0.02em; line-height: 1; margin-bottom: 2px; }
.btn b { font-weight: 700; font-size: 1.02rem; line-height: 1; }
.btn .stack { text-align: left; }
.btn-soon { opacity: 0.6; pointer-events: none; }

/* ---------- Hero ---------- */
.hero { padding: 76px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 4.8vw, 3.6rem); font-weight: 800; margin: 20px 0 20px; }
.hero .sub { font-size: 1.16rem; color: var(--text-2); max-width: 520px; margin-bottom: 34px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-badges { display: flex; gap: 22px; margin-top: 30px; flex-wrap: wrap; }
.hero-badge { display: flex; align-items: center; gap: 9px; font-size: 0.86rem; color: var(--text-2); }
.hero-badge svg { width: 17px; height: 17px; color: var(--teal); }

/* ---------- Device frame for real app screenshots ---------- */
.device { position: relative; justify-self: center; }
.device-glow { position: absolute; inset: -40px; background: radial-gradient(closest-side, rgba(0,112,255,0.20), transparent 70%); filter: blur(30px); z-index: -1; }
.phone {
  width: 300px; border-radius: 42px; padding: 12px;
  background: linear-gradient(160deg, #223050, #101829);
  border: 1px solid rgba(11,42,84,0.30);
  box-shadow: 0 40px 90px rgba(23,59,110,0.28), inset 0 1px 0 rgba(255,255,255,0.08);
}
.phone-screen { border-radius: 32px; background: #F4F6FB; overflow: hidden; }
.phone.real { padding: 10px; }
.phone.real .phone-screen { padding: 0; }
.phone.real img { display: block; width: 100%; height: auto; border-radius: 26px; }

/* 3-up gallery of real app screens */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; max-width: 940px; margin: 46px auto 0; align-items: start; }
.gallery figure { margin: 0; }
.gallery .phone { width: 100%; }
.gallery figcaption { margin-top: 16px; text-align: center; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }

/* Cora Max hardware showcase band */
.hw-showcase { position: relative; margin-top: 56px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line-strong); background: #fff; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 0; align-items: center; box-shadow: var(--shadow-deep); }
.hw-showcase .hw-copy { padding: 44px 44px 44px 48px; }
.hw-showcase .hw-copy h3 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); margin: 12px 0 12px; }
.hw-showcase .hw-copy p { color: var(--text-2); font-size: 1.02rem; margin-bottom: 20px; }
.hw-showcase .hw-media { position: relative; align-self: stretch; min-height: 320px; }
.hw-showcase .hw-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hw-showcase .hw-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #FFFFFF 0%, rgba(255,255,255,0.55) 22%, transparent 55%); }

/* ---------- Section scaffolding ---------- */
.section { padding: 84px 0; }
.section-head { max-width: 680px; margin: 0 auto 52px; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin: 16px 0 14px; }
.section-head p { color: var(--text-2); font-size: 1.06rem; }

/* ---------- Feature grid ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform .25s ease, border-color .25s, box-shadow .25s;
}
.feat:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow-card); }
.feat-ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(0,112,255,0.10), rgba(0,209,255,0.06)); border: 1px solid var(--line-strong); margin-bottom: 16px; }
.feat-ico svg { width: 23px; height: 23px; color: var(--brand); }
.feat h3 { font-size: 1.08rem; margin-bottom: 8px; }
.feat p { color: var(--text-2); font-size: 0.93rem; }

/* ---------- Decision Card showcase ---------- */
.dc-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 56px; align-items: center; }
.dc-grid h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin: 16px 0 18px; }
.dc-grid > div > p { color: var(--text-2); font-size: 1.04rem; margin-bottom: 14px; }
.decision-card { background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); padding: 26px 30px; box-shadow: var(--shadow-deep); }
.dc-row { display: grid; grid-template-columns: 172px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.dc-row:last-child { border-bottom: 0; }
.dc-k { font-family: var(--font-mono); font-size: 0.64rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-deep); padding-top: 3px; }
.dc-v { color: var(--text-2); font-size: 0.93rem; }
.loop { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 22px; }
.loop-step { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.04em; color: var(--brand-deep); background: rgba(0,112,255,0.06); border: 1px solid rgba(0,112,255,0.22); border-radius: 999px; padding: 5px 12px; }
.loop-step:not(:last-child)::after { content: "→"; margin-left: 10px; margin-right: -4px; color: var(--text-3); }

/* ---------- Product cards ---------- */
.products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.product {
  position: relative; overflow: hidden;
  background: linear-gradient(165deg, #FFFFFF, #F4F8FD);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 34px 32px;
  transition: transform .3s ease, border-color .3s, box-shadow .3s;
}
.product:hover { transform: translateY(-5px); border-color: rgba(0,112,255,0.35); box-shadow: var(--shadow-card); }
.product::before { content: ""; position: absolute; top: -60px; right: -60px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(closest-side, var(--glow-blue), transparent 70%); opacity: 0.5; filter: blur(20px); }
.product-tag { position: relative; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--brand-deep); }
.product h3 { position: relative; font-size: 1.5rem; margin: 12px 0 10px; }
.product p { position: relative; color: var(--text-2); font-size: 0.96rem; }
.product .spec { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.04em; color: var(--text-2); background: rgba(11,42,84,0.04); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }
.soon { border: 1px dashed rgba(156,63,209,0.35); background: linear-gradient(165deg, rgba(216,116,255,0.05), #FFFFFF); }
.soon .product-tag { color: var(--violet); }
.badge-soon { position: relative; display: inline-block; margin-left: 10px; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.14em; color: var(--violet); border: 1px solid rgba(156,63,209,0.4); border-radius: 999px; padding: 3px 9px; vertical-align: middle; }

/* ---------- Split / app feature band ---------- */
.band { background: linear-gradient(180deg, rgba(0,112,255,0.035), transparent); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin: 16px 0 18px; }
.split p { color: var(--text-2); font-size: 1.04rem; margin-bottom: 14px; }
.checklist { list-style: none; display: grid; gap: 14px; margin-top: 20px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); font-size: 0.98rem; }
.checklist svg { flex: none; width: 22px; height: 22px; color: var(--teal); margin-top: 1px; }
.checklist b { color: var(--ink); font-weight: 600; }

/* ---------- Trust / integration strip ---------- */
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.trust .feat-ico { margin-bottom: 14px; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; padding: 92px 0; }
.cta-band h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 16px; }
.cta-band p { color: var(--text-2); font-size: 1.1rem; max-width: 520px; margin: 0 auto 32px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 54px 0 40px; margin-top: 20px; background: #fff; }
.foot-grid { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; align-items: flex-start; }
.foot-brand { max-width: 300px; }
.foot-brand .brand { margin-bottom: 14px; }
.foot-brand p { color: var(--text-3); font-size: 0.9rem; }
.foot-cols { display: flex; gap: 60px; flex-wrap: wrap; }
.foot-col h4 { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3); margin-bottom: 16px; }
.foot-col a { display: block; color: var(--text-2); text-decoration: none; font-size: 0.92rem; margin-bottom: 11px; transition: color .2s; }
.foot-col a:hover { color: var(--brand-deep); }
.foot-bottom { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--text-3); font-size: 0.84rem; }

/* ---------- Legal / long-form pages ---------- */
.legal-hero { padding: 60px 0 26px; text-align: center; border-bottom: 1px solid var(--line); }
.legal-hero .eyebrow { justify-content: center; }
.legal-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 16px 0 10px; }
.legal-hero .date { color: var(--text-3); font-family: var(--font-mono); font-size: 0.82rem; }
.legal { max-width: 820px; margin: 0 auto; padding: 48px 24px 80px; }
.legal-doc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 48px clamp(24px, 5vw, 56px); box-shadow: var(--shadow-card); }
.legal-doc h2 { font-size: 1.35rem; margin: 40px 0 14px; padding-top: 8px; }
.legal-doc h2:first-child { margin-top: 0; }
.legal-doc h3 { font-size: 1.05rem; color: var(--brand-deep); margin: 26px 0 10px; font-family: var(--font-body); font-weight: 700; letter-spacing: 0; }
.legal-doc p { color: var(--text-2); margin-bottom: 14px; font-size: 0.97rem; }
.legal-doc ul { list-style: none; margin: 6px 0 16px; padding: 0; }
.legal-doc li { position: relative; color: var(--text-2); padding-left: 22px; margin-bottom: 9px; font-size: 0.96rem; }
.legal-doc li::before { content: ""; position: absolute; left: 4px; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--grad-brand); }
.legal-doc strong { color: var(--ink); font-weight: 600; }
.legal-doc a { color: var(--brand-deep); text-decoration: none; border-bottom: 1px solid rgba(0,112,255,0.3); }
.legal-doc a:hover { border-color: var(--brand-deep); }
.legal-doc .lead { font-size: 1.04rem; color: var(--text); border-left: 3px solid var(--brand); padding-left: 18px; margin-bottom: 28px; }
.legal-table { width: 100%; border-collapse: collapse; margin: 14px 0 20px; font-size: 0.9rem; }
.legal-table th, .legal-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--text-2); }
.legal-table th { color: var(--ink); font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; }
.legal-table tr td:first-child { color: var(--ink); font-weight: 600; }
.callout { background: rgba(0,112,255,0.06); border: 1px solid rgba(0,112,255,0.22); border-radius: var(--radius-sm); padding: 16px 20px; margin: 18px 0; color: var(--text); font-size: 0.95rem; }
.back-home { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); text-decoration: none; font-size: 0.9rem; margin-bottom: 8px; }
.back-home:hover { color: var(--brand-deep); }
.back-home svg { width: 16px; height: 16px; }

/* ---------- Reveal on load ---------- */
.reveal { opacity: 0; transform: translateY(22px); animation: rise .8s cubic-bezier(.2,.7,.2,1) forwards; }
.reveal.d1 { animation-delay: .08s; } .reveal.d2 { animation-delay: .16s; }
.reveal.d3 { animation-delay: .24s; } .reveal.d4 { animation-delay: .32s; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; opacity: 1; transform: none; } html { scroll-behavior: auto; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .split, .dc-grid { grid-template-columns: 1fr; gap: 40px; }
  .device { order: -1; }
  .feat-grid, .trust { grid-template-columns: 1fr 1fr; }
  .products { grid-template-columns: 1fr; }
  .gallery { gap: 18px; }
  .hw-showcase { grid-template-columns: 1fr; }
  .hw-showcase .hw-copy { padding: 34px 28px; order: 2; }
  .hw-showcase .hw-media { order: 1; min-height: 240px; }
  .hw-showcase .hw-media::after { background: linear-gradient(0deg, #FFFFFF 0%, transparent 45%); }
  .nav-links { display: none; }
  .nav-links.open { display: flex; position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; gap: 4px; padding: 14px 24px 20px; background: rgba(255,255,255,0.97); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
  .nav-links.open a { padding: 10px 0; }
  .nav-toggle { display: inline-flex; background: none; border: 1px solid var(--line-strong); border-radius: 10px; width: 42px; height: 40px; color: var(--ink); align-items: center; justify-content: center; cursor: pointer; }
  .nav-toggle svg { width: 22px; height: 22px; }
}
@media (max-width: 560px) {
  .feat-grid, .trust { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 20px; }
  .section { padding: 60px 0; }
  .phone { width: 260px; }
  .gallery { grid-template-columns: 1fr; max-width: 300px; gap: 30px; }
  .foot-cols { gap: 36px; }
  .dc-row { grid-template-columns: 1fr; gap: 2px; }
}
