/* ===========================================================
   THALOSS · Design System
   Palette: deep water teal / algae green / warm sand / amber
   Display: Space Grotesk (geometric, matches the mark)
   Body: Inter | Utility/mono: IBM Plex Mono
=========================================================== */

:root{
  --ink:        #0B1F1A;
  --deep:       #0F2E27;
  --forest:     #1E4A3D;
  --algae:      #5FA987;
  --algae-lt:   #9FCBB2;
  --sand:       #F4F0E6;
  --sand-2:     #ECE5D3;
  --paper:      #FBFAF6;
  --amber:      #C9974F;
  --line:       rgba(11,31,26,0.12);
  --line-lt:    rgba(255,255,255,0.16);

  --head:  "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --body:  "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, monospace;

  --maxw: 1180px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  animation: page-fade-in .5s ease both;
}
@keyframes page-fade-in{
  from{ opacity: 0; }
  to{ opacity: 1; }
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }

::selection{ background: var(--algae); color: var(--ink); }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior:auto !important; }
}

/* ---------- layout helpers ---------- */
.wrap{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}
section{ position: relative; }

/* ---------- typography ---------- */
h1,h2,h3,h4{
  font-family: var(--head);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}
.eyebrow{
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--forest);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before{
  content:"";
  width: 22px; height: 1px;
  background: var(--amber);
  display:inline-block;
}
.eyebrow-lt{
  color: var(--paper);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  padding: 7px 16px 7px 12px;
  border-radius: 999px;
  font-weight: 600;
  backdrop-filter: blur(6px);
}
.eyebrow-lt::before{
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px 2px rgba(201,151,79,0.6);
  animation: eyebrow-pulse 2.4s ease-in-out infinite;
}
@keyframes eyebrow-pulse{
  0%, 100%{ opacity: 1; }
  50%{ opacity: 0.5; }
}
p{ margin: 0 0 1em; }
.lede{
  font-size: 19px;
  color: #2B3B36;
  max-width: 60ch;
}

/* ---------- nav ---------- */
.site-header{
  position: sticky; top:0; z-index: 100;
  background: rgba(244,240,230,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s ease;
}
.site-header.scrolled{
  box-shadow: 0 8px 24px rgba(11,31,26,0.08);
}
.nav{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 32px;
  display:flex;
  align-items:center;
  justify-content: space-between;
}
.brand{
  display:flex;
  align-items:center;
  transition: transform .3s ease;
}
.brand:hover{ transform: scale(1.06) rotate(-2deg); }
.brand img{
  height: 42px;
  width: auto;
  display:block;
}
.nav-links{
  display:flex;
  align-items:center;
  gap: 34px;
  font-size: 14.5px;
  font-weight: 500;
}
.nav-links a{
  position: relative;
  padding: 4px 0;
  color: var(--ink);
  opacity: 0.72;
  transition: opacity .2s ease;
}
.nav-links a:hover{ opacity: 1; }
.nav-links a:not(.nav-cta)::after{
  content:"";
  position:absolute; left:0; right:100%; bottom:-6px;
  height: 2px; background: var(--amber);
  transition: right .3s cubic-bezier(.2,.8,.2,1);
}
.nav-links a:not(.nav-cta):hover::after{ right: 0; }
.nav-links a.active{ opacity: 1; }
.nav-links a.active:not(.nav-cta)::after{ right: 0; }
.nav-cta{
  position: relative;
  display:inline-flex;
  align-items:center;
  gap: 12px;
  background: rgba(30,74,61,0.06);
  border: 1px solid rgba(30,74,61,0.16);
  color: var(--forest) !important;
  padding: 7px 7px 7px 30px;
  min-height: 44px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  opacity: 1 !important;
  overflow: hidden;
  transition: border-color .35s ease, color .35s ease, box-shadow .35s ease, transform .3s ease, padding .3s ease;
}
.nav-cta::before{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(135deg, var(--forest) 0%, #2E6B57 100%);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
}
.nav-cta span:first-child{ position: relative; z-index: 1; }
.nav-cta:hover{
  color: var(--paper) !important;
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(30,74,61,0.35);
  transform: translateY(-2px);
  padding-right: 6px;
}
.nav-cta:hover::before{ transform: scaleX(1); }
.nav-cta .cta-arrow{
  position: relative;
  z-index: 1;
  display:flex; align-items:center; justify-content:center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--ink);
  flex: none;
  box-shadow: 0 0 0 0 rgba(201,151,79,0.5);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease;
}
.nav-cta .cta-arrow svg{ width: 14px; height: 14px; }
.nav-cta:hover .cta-arrow{
  transform: rotate(45deg) scale(1.06);
  box-shadow: 0 0 0 6px rgba(201,151,79,0.18);
}
.nav-toggle{ display:none; }

@media (max-width: 760px){
  .nav-links{
    position: fixed; inset: 64px 0 0 0;
    background: var(--sand);
    flex-direction: column;
    justify-content: flex-start;
    padding: 36px 32px;
    gap: 26px;
    font-size: 18px;
    transform: translateX(100%);
    transition: transform .35s ease;
  }
  .nav-links.open{ transform: translateX(0); }
  .nav-toggle{
    display:flex; flex-direction:column; gap:5px;
    background:none; border:none; cursor:pointer; padding: 6px;
    z-index: 110;
  }
  .nav-toggle span{ width:22px; height:2px; background: var(--ink); display:block; }
}

/* ---------- waterline divider (signature element) ---------- */
.waterline{
  display:block;
  width:100%;
  height: 40px;
  line-height:0;
}
.waterline svg{ width:100%; height:100%; display:block; }
.waterline path{ animation: drift 14s ease-in-out infinite alternate; }
@keyframes drift{
  0%{ transform: translateX(0); }
  100%{ transform: translateX(-24px); }
}

/* ---------- buttons ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  border: 1px solid transparent;
  cursor:pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover{ transform: translateY(-1px); }
.btn-primary{ background: var(--amber); color: var(--ink); }
.btn-primary:hover{ background: #dcae66; }
.btn-ghost{ border-color: var(--line-lt); color: var(--paper); }
.btn-ghost:hover{ background: rgba(255,255,255,0.08); }
.btn-outline{ border-color: var(--forest); color: var(--forest); }
.btn-outline:hover{ background: var(--forest); color: var(--paper); }

/* ---------- footer ---------- */
.site-footer{
  background: var(--ink);
  color: var(--sand-2);
  padding: 56px 0 28px;
}
.footer-top{
  display:flex; justify-content:space-between; align-items:flex-start;
  flex-wrap: wrap; gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line-lt);
}
.footer-brand img{ height: 40px; width: auto; display:block; }
.footer-tagline{
  font-size: 13.5px; color: #9FB0AA; max-width: 30ch; margin-top: 8px;
}
.footer-links{ display:flex; gap: 48px; flex-wrap: wrap; }
.footer-col h5{
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--algae-lt); margin-bottom: 12px; font-weight:600;
}
.footer-col a, .footer-col div{
  display:block; font-size: 14px; color: #C9D3CE; margin-bottom: 8px;
}
.footer-col a:hover{ color: var(--paper); }
.footer-bottom{
  display:flex; justify-content:space-between; flex-wrap:wrap; gap: 10px;
  padding-top: 20px; font-size: 12.5px; color: #75887F;
}

/* ---------- word-split heading reveal (data-split) ---------- */
.word{
  display: inline-block;
  opacity: 0;
  transform: translateY(24px);
  animation: word-in .7s cubic-bezier(.2,.7,.2,1) forwards;
}
@keyframes word-in{
  to{ opacity: 1; transform: translateY(0); }
}

/* ---------- dot-grid texture (used on dark sections to avoid flat blocks) ---------- */
.texture-dots{
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(159,203,178,0.16) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 40%, transparent 85%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- brand watermark (used across dark sections) ---------- */
.section-watermark{
  position: absolute;
  width: 340px;
  max-width: 46vw;
  opacity: 0.05;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  animation: section-watermark-drift 20s ease-in-out infinite;
  transform-origin: center;
}
@keyframes section-watermark-drift{
  0%, 100%{ transform: rotate(4deg) scale(1); }
  50%{ transform: rotate(10deg) scale(1.05); }
}
.section-watermark.centered{
  width: 460px;
  max-width: 70vw;
  opacity: 0.08;
  top: 50%; left: 50%; right: auto; bottom: auto;
  animation: centered-watermark-drift 20s ease-in-out infinite;
}
@keyframes centered-watermark-drift{
  0%, 100%{ transform: translate(-50%,-50%) rotate(-6deg) scale(1); }
  50%{ transform: translate(-50%,-50%) rotate(0deg) scale(1.06); }
}

/* ---------- reveal on scroll ---------- */
.reveal{
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.in{ opacity: 1; transform: translateY(0); }

/* ---------- stat chips ---------- */
.stats{
  display:grid;
  grid-template-columns: repeat(3,1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 40px;
}
.stat{
  background: var(--paper);
  padding: 26px 22px;
  transition: transform .3s ease, background .3s ease;
}
.stat:hover{ background: var(--sand-2); }
.stats .stat:nth-child(1){ transition-delay: .02s; }
.stats .stat:nth-child(2){ transition-delay: .12s; }
.stats .stat:nth-child(3){ transition-delay: .22s; }
.stat .num{
  font-family: var(--head);
  font-size: 34px;
  color: var(--forest);
  line-height:1;
}
.stat .lbl{
  font-size: 13px; color: #5C6A64; margin-top: 8px;
}
@media (max-width: 700px){
  .stats{ grid-template-columns: 1fr; }
}
