/* Island Ledger marketing site — reuses the app's brand tokens
   (see src/client/index.css) so the public site and the product
   look like one thing. Deliberately framework-free: these pages
   are plain HTML/CSS with a sprinkle of vanilla JS. */

:root {
  color-scheme: light;

  --ink: #151e29;
  --ink-soft: #263242;
  --paper: #f6faf9;
  --surface: #ffffff;
  --teal: #0e7c7b;
  --teal-soft: #e3f2f1;
  --gold: #d98e2b;
  --gold-soft: #faf0dd;
  --coral: #c0392b;
  --coral-soft: #fbe9e7;
  --slate: #5b6b73;
  --slate-soft: #e6edec;
  --border: #dbe6e4;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  margin: 0 0 0.6rem;
  color: var(--ink);
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--teal);
}

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

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

.container {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Top nav ---------- */

.site-nav {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-nav__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: 68rem;
  margin: 0 auto;
}

.site-nav__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-nav__brand-icon {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-nav__links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}

.site-nav__links a:hover {
  color: var(--teal);
}

.site-nav__cta {
  background: var(--teal);
  color: #fff !important;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  font-weight: 700 !important;
}

.site-nav__cta:hover {
  background: #0a615f;
}

/* Signups aren't open yet -- these override .btn-primary/.site-nav__cta's
   teal styling so the greyed-out state can't be confused with a working
   link. Revert to a plain <a href="/signup"> once production auth is on. */
.btn.is-disabled,
.site-nav__cta.is-disabled {
  background: var(--slate-soft);
  color: var(--slate);
  cursor: not-allowed;
  pointer-events: none;
  border-color: var(--border);
}

.btn.is-disabled:hover,
.site-nav__cta.is-disabled:hover {
  background: var(--slate-soft);
}

.site-nav__toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  font-size: 1.1rem;
  cursor: pointer;
}

/* ---------- Hero ---------- */

.hero {
  padding: 4.5rem 0 3.5rem;
}

.hero__inner {
  max-width: 40rem;
}

.hero .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 0.75rem;
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.12;
  margin-bottom: 1.1rem;
}

.hero__sub {
  font-size: 1.15rem;
  color: var(--ink-soft);
  margin-bottom: 2rem;
  max-width: 34rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
}

.hero__note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--slate);
}

.hero__note--centered {
  text-align: center;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--teal);
  color: #fff;
}

.btn-primary:hover {
  background: #0a615f;
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.btn-block {
  display: block;
  text-align: center;
  width: 100%;
}

/* ---------- Sections ---------- */

section {
  padding: 3.5rem 0;
}

/* Offsets anchor-scroll targets so the sticky nav doesn't cover the
   section heading when jumping to #features/#pricing/#how-it-works. */
#how-it-works,
#features,
#pricing {
  scroll-margin-top: 5rem;
}

section + section {
  border-top: 1px solid var(--border);
}

.section-head {
  max-width: 34rem;
  margin: 0 0 2.5rem;
}

.section-head .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 0.5rem;
}

.section-head h2 {
  font-size: 1.9rem;
}

.section-head p {
  color: var(--ink-soft);
  margin-bottom: 0;
}

.section-alt {
  background: var(--surface);
}

/* ---------- Feature grid ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  border-radius: 10px;
  padding: 1.75rem;
  box-shadow: 0 1px 2px rgba(21, 30, 41, 0.06);
}

.feature-card--gold {
  border-left-color: var(--gold);
}

.feature-card--coral {
  border-left-color: var(--coral);
}

.feature-card--slate {
  border-left-color: var(--slate);
}

.feature-card .icon {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 0.75rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2rem;
  counter-reset: step;
}

.step {
  position: relative;
  padding-left: 3rem;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
  font-family: var(--font-display);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.step p {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-bottom: 0;
}

/* ---------- Pricing ---------- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.pricing-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2.5rem;
  box-shadow: 0 8px 24px rgba(21, 30, 41, 0.08);
}

/* The yearly plan costs less overall, so it's called out as the default
   pick rather than leaving all three cards visually equal. */
.pricing-card--featured {
  border: 2px solid var(--gold);
  box-shadow: 0 12px 32px rgba(217, 142, 43, 0.2);
}

.pricing-card__badge {
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  white-space: nowrap;
}

.pricing-card .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.5rem;
}

.pricing-card__price {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0.25rem 0 0.5rem;
}

.pricing-card__period {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--slate);
}

.pricing-card__save {
  font-size: 0.85rem;
  color: var(--teal);
  font-weight: 600;
  margin: 0 0 1rem;
}

.pricing-card ul {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.pricing-card li {
  display: flex;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.pricing-card li::before {
  content: "\2713";
  color: var(--teal);
  font-weight: 700;
}

/* ---------- FAQ ---------- */

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:first-child {
  border-top: 1px solid var(--border);
}

.faq-item summary {
  padding: 1.1rem 0;
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font-display);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--teal);
}

.faq-item[open] summary::after {
  content: "\2212";
}

.faq-item p {
  color: var(--ink-soft);
  padding-bottom: 1.1rem;
}

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--ink);
  color: #fff;
  text-align: center;
  padding: 4rem 0;
}

.cta-band h2 {
  color: #fff;
  font-size: 1.9rem;
}

.cta-band p {
  color: #c3d0d6;
  margin-bottom: 2rem;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  font-size: 0.88rem;
  color: var(--slate);
}

.site-footer__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.site-footer a {
  color: var(--slate);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--teal);
}

/* ---------- Legal doc typography (Terms / Privacy) ---------- */

.legal-doc {
  max-width: 42rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.legal-doc h1 {
  font-size: 2rem;
}

.legal-doc .updated {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--slate);
  margin-bottom: 2.5rem;
}

.legal-doc h2 {
  font-size: 1.25rem;
  margin-top: 2.5rem;
}

.legal-doc h3 {
  font-size: 1.05rem;
  margin-top: 1.5rem;
}

.legal-doc p,
.legal-doc li {
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.legal-doc ul,
.legal-doc ol {
  padding-left: 1.4rem;
}

.legal-doc .placeholder {
  background: var(--gold-soft);
  border: 1px dashed var(--gold);
  border-radius: 4px;
  padding: 0.05rem 0.4rem;
  color: var(--ink);
  font-weight: 600;
}

.legal-doc .callout {
  background: var(--teal-soft);
  border: 1px solid var(--teal);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* ---------- Responsive ---------- */

@media (max-width: 767px) {
  .hero {
    padding: 3rem 0 2.5rem;
  }

  .hero h1 {
    font-size: 2.1rem;
  }

  .hero__sub {
    font-size: 1.05rem;
  }

  .site-nav__toggle {
    display: block;
  }

  .site-nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.5rem 1.5rem;
    gap: 1rem;
  }

  .site-nav__links.is-open {
    display: flex;
  }

  section {
    padding: 2.5rem 0;
  }

  .cta-band {
    padding: 3rem 0;
  }

  .pricing-card {
    padding: 1.75rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.75rem;
  }

  .section-head h2 {
    font-size: 1.5rem;
  }
}
