/* Reef Inc. — local draft site. No external fonts, CDNs, or trackers. */

@font-face {
  font-family: "Reef Stretch";
  src: url("../fonts/roboto-flex-var-latin.woff2") format("woff2");
  font-weight: 100 400;
  font-stretch: 100% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #0b1c2c;
  --deep: #0b2a3a;
  --ink: #143044;
  --muted: #3a5560;
  --ocean: #1f7a8c;
  --ocean-dark: #165e6c;
  --turquoise: #2ec4b6;
  --turquoise-dim: #1a9e93;
  --foam: #e7f6f3;
  --foam-bright: #f4fffc;
  --sand: #f6fbfa;
  --paper: rgba(255, 255, 255, 0.78);
  --line: rgba(31, 122, 140, 0.18);
  --ok-wash: #e4f6f3;
  --warn-ink: #6b4e12;
  --warn-wash: #f6efd8;
  --radius: 1.1rem;
  --shadow: 0 10px 30px rgba(11, 28, 44, 0.08), 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  --font-display: "Reef Stretch", "Helvetica Neue", Helvetica, Arial, "Segoe UI", sans-serif;
  --font-sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", "Noto Sans", "Liberation Sans", sans-serif;
  --space: 1rem;
  --wrap: 70rem;
  --header-h: 3.9rem;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.5rem);
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(720px 380px at 56% -12%, rgba(255, 255, 255, 0.85), transparent 58%),
    radial-gradient(1200px 520px at 78% -8%, rgba(46, 196, 182, 0.28), transparent 60%),
    radial-gradient(900px 480px at 8% 0%, rgba(31, 122, 140, 0.2), transparent 55%),
    linear-gradient(180deg, #d4f0ed 0%, #cfeceb 16%, var(--foam) 36%, #e4f3f0 64%, #d4eae6 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }

a {
  color: var(--ocean-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover { color: var(--navy); }

:focus-visible {
  outline: 2px solid var(--ocean);
  outline-offset: 3px;
}

::selection {
  background: rgba(46, 196, 182, 0.35);
  color: var(--navy);
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 20;
  padding: 0.5rem 0.85rem;
  background: #fff;
  color: var(--navy);
  border-radius: 0.5rem;
  transform: translateY(-150%);
}

.skip:focus {
  transform: none;
}

.wrap {
  width: min(100% - 1.75rem, var(--wrap));
  margin-inline: auto;
}

/* --- Underwater atmosphere --- */

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  contain: paint;
}

.water-depth,
.sun,
.sunbeams,
.surface,
.caustics,
.horizon,
.caustic-svg,
.drift {
  position: absolute;
  inset: 0;
}

/* Slight aqua depth toward the bottom, so shafts of light can read. */
.water-depth {
  background:
    radial-gradient(ellipse 85% 75% at 56% 0%, transparent 0%, rgba(31, 122, 140, 0.05) 72%),
    linear-gradient(180deg,
      rgba(31, 122, 140, 0) 0%,
      rgba(31, 122, 140, 0.035) 42%,
      rgba(20, 70, 82, 0.1) 100%);
  pointer-events: none;
}

/* Bright sun just under the surface, slightly right of centre. */
.sun {
  left: 56%;
  top: -10%;
  right: auto;
  bottom: auto;
  width: min(38vw, 30rem);
  height: min(26vw, 18rem);
  transform: translateX(-50%);
  background:
    radial-gradient(ellipse 42% 40% at 50% 38%,
      rgba(255, 255, 255, 1) 0%,
      rgba(255, 252, 240, 0.9) 12%,
      rgba(255, 250, 230, 0.45) 28%,
      rgba(231, 246, 243, 0.2) 50%,
      rgba(46, 196, 182, 0.06) 64%,
      transparent 74%);
  mix-blend-mode: screen;
  opacity: 0.95;
  animation: sun-breathe 12s ease-in-out infinite;
}

.sunbeams {
  width: 100%;
  height: 100%;
  mix-blend-mode: screen;
  opacity: 0.9;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 38%, rgba(0, 0, 0, 0.45) 70%, transparent 94%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 38%, rgba(0, 0, 0, 0.45) 70%, transparent 94%);
}

.sunbeams-sharp {
  mix-blend-mode: normal;
  opacity: 0.8;
}

.beam-group {
  transform-box: view-box;
  transform-origin: 56% 0%;
  animation: beam-sway 26s ease-in-out infinite;
}

.beam-wrap {
  animation: beam-shimmer 9s ease-in-out infinite;
}

.beam-wrap:nth-child(2n) { animation-duration: 11s; animation-delay: -3s; }
.beam-wrap:nth-child(3n) { animation-duration: 13s; animation-delay: -6s; }
.beam-wrap:nth-child(4n) { animation-duration: 8s; animation-delay: -1.5s; }

/* Rippling surface shimmer, kept to the upper water. */
.surface {
  inset: auto 0 auto 0;
  top: 0;
  height: 48vh;
  overflow: hidden;
}

.surface-sheen {
  position: absolute;
  left: -5%;
  right: -5%;
  top: -6%;
  height: 28%;
  background:
    radial-gradient(ellipse 70% 80% at 56% 0%, rgba(255, 255, 255, 0.7), transparent 70%),
    radial-gradient(ellipse 40% 60% at 30% 10%, rgba(255, 255, 255, 0.35), transparent 68%),
    radial-gradient(ellipse 36% 50% at 78% 8%, rgba(232, 255, 250, 0.4), transparent 70%);
  mix-blend-mode: screen;
  animation: sheen-drift 16s ease-in-out infinite alternate;
}

.ripple-svg {
  position: absolute;
  left: -8%;
  top: -2%;
  width: 116%;
  height: 72%;
  mix-blend-mode: screen;
  opacity: 0.9;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 35%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 35%, transparent 100%);
}

.ripple-group {
  transform-box: view-box;
  transform-origin: 50% 0%;
  animation: ripple-drift 14s ease-in-out infinite alternate;
}

.ripple-group-b {
  animation-duration: 18s;
  animation-direction: alternate-reverse;
  animation-delay: -5s;
}

.caustics {
  background:
    radial-gradient(28% 36% at 18% 18%, rgba(255, 255, 255, 0.7), transparent 62%),
    radial-gradient(22% 28% at 42% 8%, rgba(167, 241, 230, 0.55), transparent 64%),
    radial-gradient(26% 32% at 62% 14%, rgba(255, 255, 255, 0.55), transparent 62%),
    radial-gradient(20% 40% at 84% 22%, rgba(94, 234, 212, 0.4), transparent 66%),
    radial-gradient(34% 24% at 32% 32%, rgba(255, 255, 255, 0.32), transparent 70%),
    radial-gradient(24% 30% at 72% 36%, rgba(232, 255, 250, 0.35), transparent 68%);
  background-repeat: no-repeat;
  mix-blend-mode: soft-light;
  opacity: 0.95;
  animation: drift-a 22s ease-in-out infinite alternate;
}

.caustics-b {
  background:
    radial-gradient(18% 42% at 10% 30%, rgba(255, 255, 255, 0.45), transparent 64%),
    radial-gradient(30% 24% at 50% 16%, rgba(127, 219, 218, 0.42), transparent 66%),
    radial-gradient(16% 30% at 76% 6%, rgba(255, 255, 255, 0.5), transparent 62%),
    radial-gradient(36% 28% at 88% 40%, rgba(46, 196, 182, 0.28), transparent 70%);
  animation: drift-b 28s ease-in-out infinite alternate;
  opacity: 0.8;
}

.horizon {
  top: auto;
  height: 28rem;
  bottom: 0;
  width: 100%;
  object-fit: cover;
  object-position: center bottom;
  opacity: 0.95;
}

.caustic-svg {
  inset: -8% -10% auto -10%;
  height: 48%;
  width: 120%;
  mix-blend-mode: screen;
  opacity: 0.5;
  pointer-events: none;
  animation: caustic-drift 20s ease-in-out infinite alternate;
}

/* Slow drifting motes of light in the water column. */
.drift {
  background:
    radial-gradient(1.2px 1.2px at 18% 28%, rgba(255, 255, 255, 0.7), transparent 70%),
    radial-gradient(1.6px 1.6px at 42% 46%, rgba(255, 255, 255, 0.45), transparent 70%),
    radial-gradient(1px 1px at 68% 22%, rgba(255, 255, 255, 0.6), transparent 70%),
    radial-gradient(1.4px 1.4px at 82% 58%, rgba(231, 246, 243, 0.5), transparent 70%),
    radial-gradient(1px 1px at 30% 70%, rgba(255, 255, 255, 0.35), transparent 70%),
    radial-gradient(1.8px 1.8px at 58% 34%, rgba(255, 255, 255, 0.4), transparent 70%);
  mix-blend-mode: screen;
  opacity: 0.7;
  animation: drift-motes 36s linear infinite;
}

@keyframes drift-a {
  from { transform: translate3d(-2%, -1%, 0) scale(1.02); }
  to   { transform: translate3d(3%, 2%, 0) scale(1.08); }
}

@keyframes drift-b {
  from { transform: translate3d(2%, 1%, 0) scale(1.05); }
  to   { transform: translate3d(-3%, -2%, 0) scale(1.12); }
}

@keyframes caustic-drift {
  from { transform: translate3d(-2.5%, 0, 0) scale(1.04); }
  to   { transform: translate3d(3%, 1.5%, 0) scale(1.1); }
}

@keyframes beam-sway {
  0%, 100% { transform: rotate(-1.15deg); }
  50%      { transform: rotate(1.35deg); }
}

@keyframes beam-shimmer {
  0%, 100% { opacity: 0.78; }
  50%      { opacity: 1; }
}

@keyframes sun-breathe {
  0%, 100% { opacity: 0.88; transform: translateX(-50%) scale(1); }
  50%      { opacity: 1; transform: translateX(-50%) scale(1.04); }
}

@keyframes sheen-drift {
  from { transform: translate3d(-2%, 0, 0); opacity: 0.85; }
  to   { transform: translate3d(3%, 2%, 0); opacity: 1; }
}

@keyframes ripple-drift {
  from { transform: translate3d(-4%, 0, 0); }
  to   { transform: translate3d(4%, 2%, 0); }
}

@keyframes drift-motes {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, -4%, 0); }
}

/* --- Header --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(231, 246, 243, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(31, 122, 140, 0.12);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 1.75rem, var(--wrap));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--navy);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.brand img {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.55rem;
  box-shadow: 0 2px 8px rgba(11, 28, 44, 0.16);
}

.brand:hover { color: var(--ocean-dark); }

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1.1rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 550;
}

.nav a:hover,
.nav a:focus-visible { color: var(--navy); }

/* --- Layout stacking --- */

.site-header,
main,
.site-footer { position: relative; z-index: 1; }

/* --- Hero --- */

.hero {
  padding: 2.6rem 0 2.75rem;
  background:
    radial-gradient(ellipse 50% 65% at 56% -4%, rgba(255, 252, 240, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 90% at 56% -8%, rgba(46, 196, 182, 0.22), transparent 60%),
    radial-gradient(ellipse 42% 55% at 82% 0%, rgba(255, 255, 255, 0.1), transparent 52%),
    rgba(11, 42, 58, 0.82);
  color: var(--foam);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 1.5rem;
}

.hero-copy { max-width: 44rem; }

.hero-mark {
  display: none;
  width: min(16rem, 32vw);
  height: auto;
  justify-self: end;
  opacity: 0.22;
  filter: brightness(2.6) saturate(0.35);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 0.7rem;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ocean-dark);
}

.hero .eyebrow {
  color: var(--turquoise);
}

/* Display headings: self-hosted Roboto Flex Light at width 118. */
.display,
.hero h1,
.section-head h2,
.card h3,
.principles h3,
.display-sub {
  font-family: var(--font-display);
  font-weight: 300;
  font-stretch: 118%;
  font-optical-sizing: auto;
  font-synthesis: none;
  overflow-wrap: break-word;
  hyphens: none;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.9rem, 8vw, 5.15rem);
  line-height: 0.96;
  letter-spacing: 0.012em;
  color: var(--foam-bright);
}

.tagline,
.display-sub {
  margin: 0.95rem 0 0;
  font-size: clamp(1.2rem, 2.6vw, 1.7rem);
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: rgba(231, 246, 243, 0.92);
  max-width: 22em;
}

.lede {
  margin: 0.85rem 0 0;
  color: rgba(231, 246, 243, 0.78);
  max-width: 38rem;
}

/* --- Sections --- */

.section-head {
  max-width: 40rem;
  margin-bottom: 1rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3.4vw, 2.55rem);
  line-height: 1.08;
  letter-spacing: 0.012em;
  color: var(--navy);
}

.section-head p {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.navy-panel {
  padding: 2.15rem 1.9rem 2.2rem;
  background:
    radial-gradient(ellipse 80% 70% at 56% -10%, rgba(46, 196, 182, 0.18), transparent 58%),
    radial-gradient(ellipse 40% 50% at 90% 0%, rgba(255, 255, 255, 0.07), transparent 50%),
    rgba(11, 42, 58, 0.94);
  color: var(--foam);
  border-radius: calc(var(--radius) + 0.15rem);
  box-shadow: 0 18px 40px rgba(11, 28, 44, 0.18);
}

.navy-panel .section-head {
  max-width: 44rem;
  margin-bottom: 1.35rem;
}

.navy-panel h2 {
  color: var(--foam-bright);
  font-size: clamp(2.35rem, 6vw, 3.6rem);
  line-height: 0.98;
}

.navy-panel .eyebrow {
  color: var(--turquoise);
}

.navy-panel .display-sub {
  color: rgba(231, 246, 243, 0.92);
}

.navy-panel .detail-points {
  margin: 0;
  max-width: 42rem;
  color: rgba(231, 246, 243, 0.82);
}

.navy-panel .detail-points strong {
  color: var(--foam-bright);
}

.navy-panel .detail-points li::marker {
  color: var(--turquoise);
}

.ecosystem { padding: 0.15rem 0 3.25rem; }

.how {
  padding: 0 0 4rem;
}

.product-detail {
  padding: 0 0 3.25rem;
}

.detail-panel {
  max-width: 40rem;
  padding: 1.15rem 1.25rem 1.25rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.detail-points {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.detail-points li + li {
  margin-top: 0.55rem;
}

.detail-points li::marker {
  color: var(--ocean);
}

.detail-points strong {
  color: var(--ink);
  font-weight: 650;
}

/* --- Product cards --- */

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.card {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1.15rem 1.2rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
  min-height: 3rem;
}

.card-icon {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 0.85rem;
  background: var(--ok-wash);
  border: 1px solid rgba(31, 122, 140, 0.12);
}

.card-icon img { width: 2rem; height: 2rem; }

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.card h3 {
  margin: 0;
  font-size: 1.42rem;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--navy);
}

.product-role {
  margin: 0.12rem 0 0.5rem;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--ocean-dark);
}

.card .product-role + p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.45;
}

.card-link {
  margin-top: auto;
  padding-top: 0.85rem;
  font-size: 0.9rem;
  font-weight: 650;
}

.card-link a {
  color: var(--ocean-dark);
  text-decoration: none;
}

.card-link a:hover,
.card-link a:focus-visible {
  color: var(--navy);
  text-decoration: underline;
}

.term { white-space: nowrap; }

.card strong { color: var(--ink); font-weight: 650; }

.status {
  margin: 0.15rem 0 0;
  display: inline-block;
  flex: 0 0 auto;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--warn-wash);
  color: var(--warn-ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.status-available {
  background: var(--ok-wash);
  color: var(--ocean-dark);
}

/* --- How we work --- */

.principles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  counter-reset: step;
}

.principles li {
  position: relative;
  padding: 1.25rem 1.25rem 1.3rem 1.25rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  counter-increment: step;
}

.principles h3 {
  margin: 0 0 0.4rem;
  padding-left: 2.1rem;
  font-size: 1.22rem;
  line-height: 1.25;
  letter-spacing: 0.015em;
  color: var(--navy);
}

.principles h3::before {
  content: counter(step);
  position: absolute;
  left: 1.2rem;
  top: 1.25rem;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  background: var(--ocean);
  color: #f7fffd;
  font-size: 0.8rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  font-family: var(--font-sans);
}

.principles p {
  margin: 0;
  color: var(--muted);
}

/* --- Footer --- */

.site-footer {
  border-top: 1px solid rgba(31, 122, 140, 0.14);
  background: rgba(11, 28, 44, 0.04);
  padding: 1.4rem 0 1.6rem;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  align-items: baseline;
}

.foot p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--navy); text-decoration: underline; }

/* --- Breakpoints --- */

@media (min-width: 640px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .principles { grid-template-columns: 1fr 1fr 1fr; }
  .hero { padding: 2.8rem 0 3rem; }
}

@media (min-width: 900px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr) auto; }
  .hero-mark { display: block; }
}

@media (min-width: 1100px) {
  .cards { grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
  .wrap { width: min(100% - 2.5rem, var(--wrap)); }
  .bar { width: min(100% - 2.5rem, var(--wrap)); }
  .hero { padding: 3rem 0 3.15rem; }
}

@media (max-width: 639px) {
  html { scroll-padding-top: 6.5rem; }
  .site-header { height: auto; }
  .bar {
    flex-wrap: wrap;
    padding-block: 0.7rem;
    row-gap: 0.55rem;
  }
  .nav {
    width: 100%;
    justify-content: flex-start;
    gap: 0.35rem 1rem;
  }
}

@media (max-width: 419px) {
  .nav a { font-size: 0.88rem; }
  .hero { padding: 2.05rem 0 2.15rem; }
  .navy-panel { padding: 1.55rem 1.15rem 1.65rem; }
  .card h3 { font-size: 1.32rem; }
}

/* --- Motion --- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sun,
  .beam-group,
  .beam-wrap,
  .caustics,
  .caustics-b,
  .caustic-svg,
  .surface-sheen,
  .ripple-group,
  .drift {
    animation: none;
  }
}

html.reduce-motion .sun,
html.reduce-motion .beam-group,
html.reduce-motion .beam-wrap,
html.reduce-motion .caustics,
html.reduce-motion .caustics-b,
html.reduce-motion .caustic-svg,
html.reduce-motion .surface-sheen,
html.reduce-motion .ripple-group,
html.reduce-motion .drift {
  animation: none;
}

@media (prefers-reduced-transparency: reduce) {
  .site-header,
  .card,
  .principles li,
  .detail-panel {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #f7fffd;
  }
  .site-header { background: #e7f6f3; }
  .hero,
  .navy-panel {
    background: var(--deep);
  }
}
