/* =========================================================================
   TideFill — design system
   P3R-inspired: vibrant blues, angular motifs, dark theme.
   Brand palette folded in: pebble mint (#61C3A6), tide teal (#315A66).
   ========================================================================= */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@500;600;700;800&family=Sora:wght@300;400;500;600;700&display=swap');

/* ---- Tokens ---- */
:root {
  /* Core surfaces */
  --bg:        #070B16;
  --bg-2:      #0B1222;
  --panel:     #0F1830;
  --panel-2:   #142042;
  --line:      rgba(255,255,255,0.08);
  --line-2:    rgba(120,180,255,0.18);

  /* Accents */
  --blue:      #2E8BFF;   /* primary electric blue */
  --blue-hi:   #5BB0FF;
  --cyan:      #2BE2FF;   /* P3R glow */
  --mint:      #61C3A6;   /* brand pebble */
  --teal:      #315A66;   /* brand tide */

  /* Text */
  --ink:       #EAF1FF;
  --ink-soft:  #A9BBDA;
  --ink-mute:  #6F809F;

  /* Effects */
  --glow:      0 0 24px rgba(46,139,255,0.45);
  --glow-cyan: 0 0 28px rgba(43,226,255,0.35);
  --radius:    14px;
  --shadow:    0 18px 50px rgba(0,0,0,0.55);

  /* Type */
  --display: 'Saira Condensed', 'Arial Narrow', sans-serif;
  --body:    'Sora', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  --maxw: 1180px;
}

/* ---- Reset ---- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(1100px 620px at 88% -12%, rgba(46,139,255,0.13), transparent 58%),
    var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 300;
  line-height: 1.65;
  letter-spacing: 0.1px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
ul { list-style: none; }

/* Subtle moving grid backdrop */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(120,180,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,180,255,0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 70% 0%, rgba(0,0,0,0.7), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* ---- Layout helpers ---- */
.wrap { width: min(100% - 40px, var(--maxw)); margin-inline: auto; position: relative; z-index: 1; }
.section { padding: clamp(64px, 9vw, 130px) 0; position: relative; }
.eyebrow {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 34px; height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 0.98; letter-spacing: -0.5px; }
h2.section-title { font-size: clamp(2.2rem, 5vw, 3.8rem); text-transform: uppercase; margin: 14px 0 8px; }
.lede { color: var(--ink-soft); font-size: 1.05rem; max-width: 60ch; }

/* Angular accent slash (used sparingly) */
.slash { color: var(--blue); font-family: var(--display); font-style: italic; }
.accent { color: var(--cyan); }

.section.thin { padding: clamp(40px, 6vw, 80px) 0; }

/* Quiet aside under a grid */
.aside {
  margin-top: 28px;
  color: var(--ink-mute);
  font-family: var(--display);
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: .82rem;
}

/* Centered short statement block */
.statement { max-width: 70ch; }
.statement p { font-size: 1.18rem; color: var(--ink-soft); }
.statement .textlink { margin-top: 18px; display: inline-block; }

/* About prose column */
.prose p { color: var(--ink-soft); font-size: 1.08rem; margin-bottom: 18px; max-width: 56ch; }
.prose p:first-child { color: var(--ink); font-size: 1.28rem; }

/* Inline text link */
.textlink {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 700;
  font-size: .92rem;
  color: var(--cyan);
}
.textlink:hover { color: var(--blue-hi); }

/* Spec definition list (PermitDesk) */
.spec { display: grid; gap: 0; }
.spec > div {
  display: grid; grid-template-columns: 200px 1fr; gap: 20px;
  padding: 18px 0; border-top: 1px solid var(--line); align-items: baseline;
}
.spec > div:last-child { border-bottom: 1px solid var(--line); }
.spec dt {
  font-family: var(--display); text-transform: uppercase; letter-spacing: .06em;
  font-weight: 700; font-size: 1.15rem; color: var(--ink);
}
.spec dd { color: var(--ink-soft); font-size: .98rem; }
@media (max-width: 560px) { .spec > div { grid-template-columns: 1fr; gap: 4px; } }

/* ---- Buttons ---- */
.btn {
  --b: var(--blue);
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 13px 24px;
  color: var(--bg);
  background: var(--b);
  border: none;
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--glow); }
.btn.cyan { --b: var(--cyan); }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-2);
  clip-path: polygon(14px 0, 100% 0, 100% 100%, 0 100%);
}
.btn.ghost:hover { border-color: var(--blue); color: var(--blue-hi); box-shadow: none; }

/* =========================================================================
   Header / nav
   ========================================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: linear-gradient(180deg, rgba(7,11,22,0.92), rgba(7,11,22,0.55));
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .mark {
  width: 38px; height: 38px;
  filter: drop-shadow(0 0 10px rgba(43,226,255,0.45));
}
.brand .name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.brand .name b { color: var(--cyan); font-weight: 800; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-soft);
  padding: 10px 16px;
  position: relative;
  transition: color .15s ease;
}
.nav-links a::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 6px;
  height: 2px; background: var(--cyan); transform: scaleX(0); transform-origin: left;
  transition: transform .2s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links .btn { color: var(--bg); }
.nav-links .btn:hover { color: var(--bg); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--ink); margin: 5px 0; transition: .2s; }

/* =========================================================================
   Hero
   ========================================================================= */
.hero { padding: clamp(70px, 12vw, 150px) 0 clamp(60px, 8vw, 110px); position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; align-items: center; }
.hero h1 {
  font-size: clamp(3rem, 8vw, 6.5rem);
  text-transform: uppercase;
  margin: 18px 0 22px;
}
.hero h1 .line2 { color: transparent; -webkit-text-stroke: 2px var(--blue); }
.hero p { font-size: 1.15rem; color: var(--ink-soft); max-width: 52ch; margin-bottom: 32px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* Emblem (clean, single mark) */
.emblem {
  position: relative;
  aspect-ratio: 1;
  display: grid; place-items: center;
}
.emblem .core {
  width: 72%;
  filter: drop-shadow(0 14px 40px rgba(46,139,255,0.35));
  animation: bob 7s ease-in-out infinite;
}
.emblem .halo {
  position: absolute; inset: 22%;
  background: radial-gradient(circle, rgba(46,139,255,0.28), transparent 68%);
  filter: blur(26px);
  z-index: -1;
}
@keyframes bob { 0%,100% { transform: translateY(-5px); } 50% { transform: translateY(5px); } }

/* =========================================================================
   Product / service cards (catalog)
   ========================================================================= */
.catalog-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 44px; }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 22px;
}
.card {
  position: relative;
  background: linear-gradient(165deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  min-height: 252px;
}
.card .card-link {
  display: flex; flex-direction: column; gap: 14px;
  padding: 26px; height: 100%; color: inherit;
}
.card::before {
  content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px;
  background: var(--cyan);
  transform: scaleY(0); transform-origin: center; transition: transform .25s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: var(--shadow); }
.card:hover::before { transform: scaleY(1); }
.card .status {
  font-family: var(--display); text-transform: uppercase; letter-spacing: .14em;
  font-size: .66rem; font-weight: 700;
  padding: 3px 9px; border: 1px solid var(--line-2); border-radius: 999px;
  color: var(--cyan);
}
.card .status.soon { color: var(--ink-mute); border-color: var(--line); }
.card .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card h3 { font-size: 1.85rem; text-transform: uppercase; }
.card .tag { color: var(--mint); font-family: var(--display); letter-spacing: .1em; font-size: .82rem; text-transform: uppercase; }
.card p { color: var(--ink-soft); font-size: .95rem; flex-grow: 1; }
.card .meta { display: flex; flex-wrap: wrap; gap: 7px; }
.card .chip {
  font-size: .74rem; color: var(--ink-soft);
  background: rgba(120,180,255,0.06); border: 1px solid var(--line);
  padding: 4px 9px; border-radius: 6px;
}
.card .go {
  display: inline-flex; align-items: center; gap: 7px; align-self: flex-start;
  font-family: var(--display); text-transform: uppercase; letter-spacing: .1em;
  font-weight: 700; font-size: .88rem; color: var(--ink);
}
.card .go.soon { color: var(--ink-mute); }
.card .go .arr { transition: transform .2s ease; color: var(--cyan); font-size: 1.2em; }
.card:hover .go .arr { transform: translateX(5px); }

.card.placeholder {
  border-style: dashed;
  background: transparent;
  display: grid; place-items: center; text-align: center;
  color: var(--ink-mute); min-height: 252px; font-size: .95rem;
}
.card.placeholder:hover { transform: none; box-shadow: none; border-color: var(--line); }
.card.placeholder::before { display: none; }

/* =========================================================================
   Generic content blocks
   ========================================================================= */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.feature-list { display: grid; gap: 18px; margin-top: 26px; }
.feature {
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start;
  padding: 18px 20px;
  background: linear-gradient(160deg, var(--panel), transparent);
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 10px;
}
.feature .ico {
  width: 40px; height: 40px; display: grid; place-items: center;
  background: rgba(46,139,255,0.12); border-radius: 8px;
  color: var(--cyan); font-family: var(--display); font-weight: 800; font-size: 1.1rem;
}
.feature h4 { font-family: var(--display); text-transform: uppercase; letter-spacing: .06em; font-size: 1.15rem; margin-bottom: 3px; }
.feature p { color: var(--ink-soft); font-size: .94rem; }

/* Stat row */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 18px; }
.stat { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(160deg, var(--panel), var(--bg-2)); }
.stat .big { font-family: var(--display); font-weight: 800; font-size: 2.8rem; color: var(--cyan); line-height: 1; }
.stat .lbl { color: var(--ink-soft); text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; margin-top: 8px; font-family: var(--display); }

/* Page banner (subpages) */
.page-banner { padding: clamp(70px, 10vw, 120px) 0 clamp(30px,5vw,60px); border-bottom: 1px solid var(--line); }
.crumbs { color: var(--ink-mute); font-family: var(--display); text-transform: uppercase; letter-spacing: .16em; font-size: .8rem; margin-bottom: 14px; }
.crumbs a:hover { color: var(--cyan); }
.page-banner h1 { font-size: clamp(2.6rem, 7vw, 5rem); text-transform: uppercase; }

/* Mock UI preview (PermitDesk board) */
.mock {
  border: 1px solid var(--line-2); border-radius: var(--radius);
  background: linear-gradient(160deg, var(--panel-2), var(--bg-2));
  box-shadow: var(--shadow); overflow: hidden;
}
.mock .bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgba(0,0,0,0.25); }
.mock .bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--ink-mute); display: inline-block; }
.mock .bar i:nth-child(1){ background:#ff5f57;} .mock .bar i:nth-child(2){ background:#febc2e;} .mock .bar i:nth-child(3){ background:#28c840;}
.mock .bar .t { margin-left: 10px; color: var(--ink-mute); font-size: .8rem; font-family: var(--display); letter-spacing: .1em; text-transform: uppercase; }
.mock .body { padding: 16px; display: grid; gap: 10px; }
.job {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 12px; align-items: center;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px;
  background: rgba(120,180,255,0.04); font-size: .86rem;
}
.job .jn { font-weight: 600; color: var(--ink); }
.job .jk { color: var(--ink-mute); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; }
.job .pill { justify-self: start; font-size: .72rem; padding: 3px 9px; border-radius: 999px; font-family: var(--display); letter-spacing: .08em; text-transform: uppercase; }
.pill.pass { color: var(--mint); background: rgba(97,195,166,0.12); border:1px solid rgba(97,195,166,0.3); }
.pill.wait { color: var(--cyan); background: rgba(43,226,255,0.10); border:1px solid rgba(43,226,255,0.3); }
.pill.block { color: #ff8a8a; background: rgba(255,90,90,0.10); border:1px solid rgba(255,90,90,0.3); }

/* CTA band */
.cta-band {
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--panel), var(--bg-2));
  padding: clamp(32px, 5vw, 56px);
}
.cta-band h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); text-transform: uppercase; }
.cta-band p { color: var(--ink-soft); max-width: 56ch; margin: 12px 0 26px; }
.cta-band .hero-cta { justify-content: flex-start; }

/* About */
.founder { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
.founder .badge {
  width: 120px; height: 120px; border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, var(--panel-2), var(--bg-2));
  border: 1px solid var(--line-2);
}
.founder .badge svg { width: 64px; }
.myth {
  border-left: 3px solid var(--mint);
  padding: 18px 24px; margin-top: 8px;
  background: linear-gradient(160deg, rgba(97,195,166,0.06), transparent);
  border-radius: 0 10px 10px 0;
  font-style: italic; color: var(--ink-soft);
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; background: rgba(0,0,0,0.3); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding: 60px 0 30px; }
.site-footer .brand .name { font-size: 1.3rem; }
.site-footer p { color: var(--ink-soft); font-size: .92rem; margin-top: 14px; max-width: 38ch; }
.fcol h5 { font-family: var(--display); text-transform: uppercase; letter-spacing: .16em; font-size: .82rem; color: var(--cyan); margin-bottom: 14px; }
.fcol a { display: block; color: var(--ink-soft); padding: 5px 0; font-size: .94rem; transition: color .15s; }
.fcol a:hover { color: var(--ink); }
.footer-base { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; padding: 22px 0; border-top: 1px solid var(--line); color: var(--ink-mute); font-size: .85rem; }
.footer-base .slash { font-style: normal; }

/* =========================================================================
   Reveal animation
   ========================================================================= */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .emblem { max-width: 360px; margin-inline: auto; order: -1; }
  .split, .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .founder { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
    padding: 10px 20px 20px;
    clip-path: inset(0 0 100% 0); transition: clip-path .25s ease;
  }
  .nav-links.open { clip-path: inset(0 0 0 0); }
  .nav-links a { padding: 14px 6px; border-bottom: 1px solid var(--line); }
  .nav-links .btn { margin-top: 12px; justify-content: center; }
  .job { grid-template-columns: 1fr auto; }
  .job .jk, .job .nextcol { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
