/* ==========================================================================
   KrakenTheMeta — the public site shell ("The Descent", inner pages)
   Load after kraken.css + ui.css. The nav, phone menu and footer are the landing
   page's (same markup via partials/), plus the scaffolding every inner page shares:
   the page header band, breadcrumbs, sections, SEO prose, FAQ, CTA bands, tool links.
   ========================================================================== */

body.site {
  background:
    radial-gradient(ellipse 70% 40% at 80% 0%, rgba(23, 68, 99, 0.18), transparent 70%),
    linear-gradient(180deg, #030a12 0, #04101c 520px, #030b15 1400px, #02080f 100%);
  background-color: var(--abyss-1);
}

/* ==========================================================================
   NAV (identical to the landing page)
   ========================================================================== */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: 72px;
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s, border-color 0.4s, backdrop-filter 0.4s, height 0.4s;
}
.nav.is-scrolled {
  background: rgba(3, 10, 18, 0.74);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  border-color: var(--line);
}
.nav__inner {
  height: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav__links { display: flex; gap: 2px; margin-left: auto; }
.nav__links a {
  position: relative;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 550;
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}
.nav__links a:hover { color: var(--ink); background: rgba(150, 205, 240, 0.07); }
.nav__links a.is-active { color: var(--glow-hi); }
.nav__links a.is-active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 2px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glow), transparent);
}
.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav__signin {
  padding: 8px 10px;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  opacity: 0.9;
}
.nav__signin:hover { opacity: 1; color: var(--glow-hi); }
.nav__toggle {
  display: none;
  width: 42px; height: 42px;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 11px;
  background: rgba(150, 205, 240, 0.05);
  color: var(--ink);
  cursor: pointer;
}
.nav__toggle .i { width: 22px; height: 22px; }
@media (max-width: 1080px) {
  .nav__links { display: none; }
  .nav__actions { margin-left: auto; }
  .nav__toggle { display: inline-grid; }
}
@media (max-width: 560px) {
  .nav { height: 64px; }
  .nav__signin { display: none; }
  .brand__word { font-size: 18px; }
  .brand__mark { width: 27px; height: 27px; }
  .nav__actions .btn--sm { --h: 36px; padding: 0 12px; font-size: 13.5px; }
}

.menu {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 96px var(--gutter) max(28px, env(safe-area-inset-bottom));
  background: rgba(2, 7, 13, 0.97);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  overflow-y: auto;
}
.menu[hidden] { display: none; }
.menu__links a {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font: 500 clamp(26px, 7vw, 34px)/1.15 var(--font-display);
  letter-spacing: -0.015em;
  text-decoration: none;
  opacity: 0;
  transform: translateY(14px);
  animation: menu-in 0.6s var(--ease-out) forwards;
  animation-delay: calc(var(--i) * 45ms + 60ms);
}
.menu__foot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@keyframes menu-in { to { opacity: 1; transform: none; } }
body.menu-open { overflow: hidden; }

/* ==========================================================================
   FOOTER (identical to the landing page)
   ========================================================================== */

.foot { position: relative; z-index: 2; padding: 72px 0 32px; border-top: 1px solid var(--line); background: var(--abyss-0); }
.foot__grid { display: grid; grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr)); gap: 40px; }
.foot__brand p { max-width: 34ch; margin: 16px 0 20px; font-size: 15px; color: var(--ink-3); }
.foot__social {
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  color: var(--ink-2);
  transition: color 0.2s, border-color 0.2s;
}
.foot__social:hover { color: var(--ink); border-color: var(--line-3); }
.foot__social .i { width: 16px; height: 16px; }
.foot__col { display: flex; flex-direction: column; gap: 11px; }
.foot__label { margin-bottom: 5px; font: 500 10px/1 var(--font-mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-4); }
.foot__col a { font-size: 14.5px; color: var(--ink-2); text-decoration: none; transition: color 0.2s; }
.foot__col a:hover { color: var(--ink); }
.foot__legal {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-4);
}
.foot__legal a { color: var(--ink-3); }
.foot__bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: 8px; color: var(--ink-3); }
@media (max-width: 860px) {
  .foot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot__brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) { .foot__grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Inner pages
   ========================================================================== */

.page { position: relative; padding-top: 72px; }
@media (max-width: 560px) { .page { padding-top: 64px; } }

/* The page header band: the painting, dimmed, with the page's title and tools on top */
.phead {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(36px, 6vw, 72px) 0 clamp(28px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
}
.phead::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -2;
  background: url("../img/kraken-deep-1600.webp") 70% 32% / cover no-repeat;
  opacity: 0.26;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
}
.phead::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 55% 70% at 85% 10%, rgba(var(--glow-rgb), 0.12), transparent 70%),
    linear-gradient(180deg, rgba(3, 10, 18, 0.35) 0%, rgba(3, 10, 18, 0.78) 70%, rgba(3, 10, 18, 0.96) 100%);
}
.phead--art::before { background-image: var(--art); background-position: center 26%; opacity: 0.42; -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 100%), linear-gradient(90deg, transparent 0%, #000 45%); mask-image: linear-gradient(90deg, transparent 0%, #000 45%); }
.phead__inner { position: relative; display: flex; flex-direction: column; gap: 16px; }
.phead h1 {
  max-width: 20ch;
  font-size: clamp(36px, 5.6vw, 64px);
  letter-spacing: -0.03em;
  line-height: 1.02;
}
.phead h1 em {
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "SOFT" 100;
  background: linear-gradient(100deg, var(--ink) 0%, var(--glow-hi) 45%, var(--glow) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.06em;
}
.phead .lede { max-width: 64ch; }
.phead__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 14px; color: var(--ink-3); }
.phead__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 0; list-style: none; font: 500 10.5px/1.4 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-4); }
.crumbs li { display: inline-flex; align-items: center; gap: 8px; }
.crumbs li + li::before { content: "/"; color: var(--ink-4); }
.crumbs a { color: var(--ink-3); text-decoration: none; transition: color 0.2s; }
.crumbs a:hover { color: var(--glow-hi); }
.crumbs [aria-current] { color: var(--glow); }

/* Sections */
.sect { position: relative; padding-block: clamp(34px, 5vw, 60px); }
.sect--tight { padding-block: clamp(22px, 3vw, 34px); }
.sect + .sect--line { border-top: 1px solid var(--line); }
.sect__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 22px; }
.sect__head h2 { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -0.024em; }
.sect__head p { max-width: 60ch; margin-top: 8px; color: var(--ink-3); font-size: 15.5px; }
.sect__head a { font-size: 14px; font-weight: 600; color: var(--glow-hi); text-decoration: none; }
.sect__head a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* SEO copy: readable, restrained, linked */
.prose { max-width: 74ch; color: var(--ink-2); font-size: 16.5px; line-height: 1.72; }
.prose > * + * { margin-top: 14px; }
.prose h2 { margin-top: 42px; font-size: clamp(26px, 3vw, 34px); color: var(--ink); line-height: 1.12; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 28px; font: 650 19px/1.35 var(--font-ui); color: var(--ink); letter-spacing: -0.005em; }
.prose a { color: var(--glow-hi); text-decoration: underline; text-decoration-color: rgba(var(--glow-rgb), 0.4); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--glow-hi); }
.prose strong { color: var(--ink); font-weight: 650; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 6px; }
.prose code { padding: 1px 6px; border-radius: 6px; background: rgba(150, 205, 240, 0.08); font: 13.5px var(--font-mono); color: var(--ink); }

/* FAQ accordion */
.faqs { border-top: 1px solid var(--line); }
.faqs details { border-bottom: 1px solid var(--line); }
.faqs summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 2px;
  list-style: none;
  cursor: pointer;
  font: 550 17px/1.4 var(--font-ui);
  color: var(--ink);
}
.faqs summary::-webkit-details-marker { display: none; }
.faqs summary .i { width: 20px; height: 20px; flex: none; color: var(--glow); transition: transform 0.3s var(--ease-out); }
.faqs details[open] summary .i { transform: rotate(45deg); }
.faqs .faq__a { max-width: 72ch; padding: 0 2px 20px; color: var(--ink-2); line-height: 1.7; }
.faqs .faq__a a { color: var(--glow-hi); }

/* The build call to action */
.cta-band {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px 28px;
  padding: clamp(22px, 3.4vw, 36px);
  overflow: hidden;
  border: 1px solid rgba(var(--lure-rgb), 0.3);
  border-radius: 24px;
  background:
    radial-gradient(ellipse 70% 130% at 100% 0%, rgba(var(--lure-rgb), 0.13), transparent 60%),
    radial-gradient(ellipse 50% 90% at 0% 100%, rgba(var(--glow-rgb), 0.08), transparent 60%),
    linear-gradient(180deg, rgba(12, 34, 56, 0.6), rgba(5, 18, 32, 0.85));
}
.cta-band h2 { font-size: clamp(26px, 3.2vw, 36px); }
.cta-band p { margin-top: 8px; max-width: 58ch; color: var(--ink-2); }
.cta-band__go { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; } .cta-band__go .btn { flex: 1; } }

/* Links to the other free tools */
.toolrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.toolrow a {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(8, 24, 40, 0.45);
  text-decoration: none;
  transition: border-color 0.25s, background-color 0.25s, transform 0.25s var(--ease-out);
}
.toolrow a:hover { border-color: rgba(var(--glow-rgb), 0.35); background: rgba(10, 30, 50, 0.6); transform: translateY(-2px); }
.toolrow .i { width: 22px; height: 22px; flex: none; margin-top: 2px; color: var(--glow); }
.toolrow b { display: block; font-size: 15px; font-weight: 650; color: var(--ink); }
.toolrow small { display: block; margin-top: 3px; font-size: 13px; line-height: 1.45; color: var(--ink-3); }

/* A result count / status line */
.countline { font: 500 11px/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }

/* Scroll reveal for inner pages (kraken.css owns [data-reveal]) */

@media (prefers-reduced-motion: reduce) {
  .menu__links a { opacity: 1; transform: none; animation: none; }
}
