/* ============ Ink & Shoal — mirofish.ink ============ */
:root {
  --paper: #F7F5F0;
  --ink: #1B2430;
  --ink-wash: #8A99A8;
  --cinnabar: #C8401F;
  --pond: #0E3A4A;
  --serif: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "IBM Plex Mono", "Cascadia Mono", Consolas, monospace;
  --maxw: 68rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
}

a { color: var(--ink); }
a:hover { color: var(--cinnabar); }

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

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

section { padding: 4.5rem 0; }
section + section { border-top: 1px solid color-mix(in srgb, var(--ink-wash) 40%, transparent); }

.kicker {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--cinnabar);
  display: block;
  margin-bottom: 0.75rem;
}

h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); margin-bottom: 1rem; }
.section-intro { max-width: 44rem; color: var(--ink); margin-bottom: 2.5rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.7rem 1.4rem;
  border-radius: 3px;
  border: 1px solid var(--ink);
  transition: background-color 0.15s, color 0.15s;
}
.btn-primary {
  background: var(--cinnabar);
  border-color: var(--cinnabar);
  color: #fff;
}
.btn-primary:hover { background: #a83519; border-color: #a83519; color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { border-color: var(--cinnabar); color: var(--cinnabar); }

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid color-mix(in srgb, var(--ink-wash) 40%, transparent);
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 3.5rem;
}
.wordmark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  text-decoration: none;
}
.wordmark .dot { color: var(--cinnabar); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  list-style: none;
  margin-left: auto;
}
.nav-links a { text-decoration: none; font-size: 0.95rem; }
.nav-links .btn { padding: 0.45rem 1rem; font-size: 0.9rem; }
.nav-gh { display: inline-flex; align-items: center; gap: 0.4rem; }
.nav-gh svg { width: 1.05rem; height: 1.05rem; fill: currentColor; }
.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--ink-wash);
  border-radius: 3px;
  padding: 0.35rem 0.6rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
    background: var(--paper);
    border-bottom: 1px solid var(--ink-wash);
    padding: 1.1rem 1.25rem 1.4rem;
  }
  .nav-links.open { display: flex; }
}

/* ---------- Hero ---------- */
.hero { padding: 5.5rem 0 4.5rem; position: relative; }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 3rem;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  margin-bottom: 1.25rem;
}
.hero h1 em {
  font-style: italic;
  color: var(--cinnabar);
}
.hero .sub {
  font-size: 1.15rem;
  max-width: 34rem;
  color: var(--ink);
  margin-bottom: 2rem;
}
.hero .ctas { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }
.shoal-stage {
  position: relative;
  min-height: 320px;
  border: 1px solid color-mix(in srgb, var(--ink-wash) 50%, transparent);
  border-radius: 4px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 70% 30%, color-mix(in srgb, var(--ink-wash) 12%, transparent), transparent 60%),
    var(--paper);
}
.shoal-stage canvas,
.shoal-stage svg.shoal-static {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.shoal-caption {
  position: absolute;
  bottom: 0.6rem;
  right: 0.8rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--ink-wash);
  letter-spacing: 0.08em;
}

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .shoal-stage { min-height: 240px; }
}

/* ---------- Demo videos ---------- */
.video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 760px) { .video-grid { grid-template-columns: 1fr; } }
.video-card figure { margin: 0; }
.video-poster {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  display: grid;
  place-items: center;
  background: var(--pond);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: #E8EEF1;
  padding: 0;
}
.video-poster:hover .play-ring { border-color: var(--cinnabar); }
.video-poster .play-ring {
  width: 4.2rem;
  height: 4.2rem;
  border: 2px solid #E8EEF1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: border-color 0.15s;
}
.video-poster .play-ring svg { width: 1.4rem; height: 1.4rem; fill: currentColor; margin-left: 3px; }
.video-poster .poster-label {
  position: absolute;
  bottom: 0.8rem;
  left: 1rem;
  right: 1rem;
  font-size: 0.85rem;
  text-align: left;
  color: #B9C7CE;
  font-family: var(--mono);
}
.video-card iframe {
  aspect-ratio: 16 / 9;
  width: 100%;
  border: 0;
  border-radius: 4px;
}
.video-card figcaption {
  margin-top: 0.7rem;
  font-size: 0.9rem;
  color: var(--ink);
}
.video-card figcaption a { color: var(--ink); }

/* ---------- Use cases ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem;
}
.card {
  border: 1px solid color-mix(in srgb, var(--ink-wash) 55%, transparent);
  border-radius: 4px;
  padding: 1.4rem 1.4rem 1.5rem;
  background: color-mix(in srgb, #fff 45%, var(--paper));
}
.card h3 { font-size: 1.2rem; margin-bottom: 0.6rem; }
.card p { font-size: 0.95rem; margin-bottom: 0.8rem; }
.card .example {
  font-style: italic;
  color: var(--pond);
  font-size: 0.92rem;
  border-left: 2px solid var(--cinnabar);
  padding-left: 0.75rem;
  display: block;
}

/* ---------- Workflow ---------- */
.steps { list-style: none; counter-reset: step; max-width: 46rem; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 1.9rem 3.4rem;
}
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 1.15rem;
  top: 2.6rem;
  bottom: 0.4rem;
  width: 1px;
  background: var(--ink-wash);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 2.3rem;
  height: 2.3rem;
  border: 1px solid var(--ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05rem;
  background: var(--paper);
}
.steps h3 { font-size: 1.15rem; margin-bottom: 0.35rem; }
.steps p { font-size: 0.97rem; }

/* ---------- Report anatomy ---------- */
.report-mock {
  background: var(--pond);
  color: #DCE7EB;
  border-radius: 6px;
  padding: 2rem clamp(1.2rem, 4vw, 2.6rem);
  max-width: 50rem;
  font-size: 0.95rem;
}
.report-mock .r-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7FA3B0;
  display: block;
  margin: 1.6rem 0 0.55rem;
}
.report-mock .r-tag:first-child { margin-top: 0; }
.report-mock .r-summary {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.45;
  color: #F2F6F8;
}
.report-mock ul { list-style: none; }
.report-mock li {
  padding: 0.4rem 0 0.4rem 1.2rem;
  position: relative;
  border-bottom: 1px solid color-mix(in srgb, #7FA3B0 25%, transparent);
}
.report-mock li:last-child { border-bottom: none; }
.report-mock li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1rem;
  width: 0.55rem;
  height: 2px;
  background: var(--cinnabar);
}

/* ---------- Playbooks ---------- */
.tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 2rem; max-width: 60rem; }
.tips h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.tips h3 .n { color: var(--cinnabar); font-family: var(--mono); font-size: 0.85rem; margin-right: 0.4rem; }
.tips p { font-size: 0.95rem; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 46rem; }
.faq-list details {
  border-bottom: 1px solid color-mix(in srgb, var(--ink-wash) 55%, transparent);
  padding: 0.4rem 0;
}
.faq-list summary {
  cursor: pointer;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
  padding: 0.7rem 0;
  list-style-position: outside;
}
.faq-list summary:hover { color: var(--cinnabar); }
.faq-list details p { padding: 0.2rem 0 1rem; max-width: 42rem; }

/* ---------- Final CTA ---------- */
.final-cta { text-align: center; }
.final-cta h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); max-width: 34rem; margin: 0 auto 1.5rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--pond);
  color: #C7D5DB;
  padding: 3rem 0 2.5rem;
  font-size: 0.92rem;
}
.site-footer a { color: #E8EEF1; }
.site-footer a:hover { color: #F0A48E; }
.site-footer .wordmark { color: #F2F6F8; }
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-links { list-style: none; display: grid; gap: 0.45rem; }
.site-footer .copyright { margin-top: 2rem; color: #7FA3B0; font-size: 0.85rem; }

/* ---------- Guide / article pages ---------- */
.breadcrumb {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-wash);
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--ink-wash); text-decoration: none; }
.breadcrumb a:hover { color: var(--cinnabar); }
.prose { max-width: 44rem; }
.prose h2 { font-size: clamp(1.35rem, 3vw, 1.7rem); margin: 2.2rem 0 0.6rem; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin-bottom: 1.1rem; }
.related {
  margin-top: 2.75rem;
  border-top: 1px solid color-mix(in srgb, var(--ink-wash) 40%, transparent);
  padding-top: 1.5rem;
}
.related ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; margin-top: 0.6rem; }
.related a { font-size: 0.95rem; text-decoration: none; }

/* ---------- Reduced motion ---------- */
.shoal-static { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .js .shoal-static { display: none; }
}
