/* ========================================================================
   Starfish Unlimited
   Restrained, typography-led. Warm paper + ink + a single amber accent.
   ======================================================================== */

:root {
  --ink: #1A1815;
  --ink-soft: #2A2825;
  --mute: #6E6A62;
  --rule: rgba(26, 24, 21, 0.12);
  --rule-soft: rgba(26, 24, 21, 0.06);
  --paper: #F4F1EA;
  --paper-deep: #ECE7DC;
  --bone: #FAF8F2;
  --accent: #B5571F;
  --rotator-blue: #2F318D;

  --font-display: "Roboto Condensed", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container: 1180px;
  --pad-x: clamp(20px, 4vw, 40px);
  --section-y: clamp(72px, 10vw, 128px);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --t: 0.35s var(--ease-out);
  --press: 120ms var(--ease-out);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.1; letter-spacing: -0.015em; text-wrap: balance; }
p { margin: 0; }

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

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

.skip-link {
  position: absolute;
  top: -100px; left: 12px;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px;
  font-size: 0.85rem;
  z-index: 1000;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--mute);
  margin: 0 0 24px;
}
.eyebrow--inverse { color: rgba(244, 241, 234, 0.6); }

.caption {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0;
}

.section-head { margin-bottom: clamp(48px, 6vw, 80px); max-width: 720px; }
.section-title {
  font-family: var(--font-body);
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}

/* ---------- Reveal (subtle) ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Buttons / links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: background var(--t), color var(--t), border-color var(--t), transform var(--press);
  white-space: nowrap;
  transform-origin: center;
}
.btn:active { transform: scale(0.97); }
.btn--ink {
  background: var(--ink);
  color: var(--paper);
}
.btn--ink:hover { background: var(--ink-soft); }
.btn--paper {
  background: var(--paper);
  color: var(--ink);
}
.btn--paper:hover { background: var(--bone); }
.btn--quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
  padding: 10px 16px;
  font-size: 0.88rem;
}
.btn--quiet:hover { border-color: var(--ink); }

.link-arrow {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  padding: 12px 4px;
  position: relative;
}
.link-arrow span { transition: transform var(--t); display: inline-block; }
.link-arrow::after {
  content: "";
  position: absolute;
  left: 4px; right: 4px; bottom: 6px;
  height: 1px;
  background: currentColor;
  opacity: 0.25;
  transition: opacity var(--t);
}
.link-arrow:hover span { transform: translateX(4px); }
.link-arrow:hover::after { opacity: 1; }

/* ========================================================================
   NAV
   ======================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 241, 234, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t), background var(--t);
}
.nav.scrolled {
  background: rgba(244, 241, 234, 0.92);
  border-bottom-color: var(--rule);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  gap: 24px;
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.nav__mark { width: 22px; height: 22px; color: var(--ink); flex-shrink: 0; }
.nav__wordmark {
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.nav__links {
  display: flex;
  gap: 32px;
  font-size: 0.92rem;
  font-weight: 500;
  margin-left: auto;
  margin-right: 24px;
}
.nav__links a {
  color: var(--ink);
  opacity: 0.7;
  transition: opacity var(--t);
}
.nav__links a:hover { opacity: 1; }
.nav__links a[aria-current="page"] { opacity: 1; color: var(--accent); }

/* About page */
.about-facts {
  padding: clamp(40px, 6vw, 64px) 0 var(--section-y);
  border-top: 1px solid var(--rule);
}
.about-facts__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(24px, 4vw, 48px);
}
.about-facts__grid > div {
  padding-top: 14px;
  border-top: 1px solid var(--ink);
}
.about-facts__value {
  font-family: var(--font-body);
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  margin-top: 8px;
}

.about-body {
  padding: var(--section-y) 0;
  border-top: 1px solid var(--rule);
}
.about-body__inner {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.about-body__col .eyebrow { margin: 0; }
.about-body__copy {
  max-width: 68ch;
  font-size: clamp(1.02rem, 1.3vw, 1.18rem);
  color: var(--ink);
}
.about-body__copy p + p { margin-top: 20px; color: var(--mute); }

@media (max-width: 900px) {
  .about-facts__grid { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
  .about-body__inner { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 480px) {
  .about-facts__grid { grid-template-columns: 1fr; row-gap: 24px; }
}

.nav__toggle {
  display: none;
  width: 36px; height: 36px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 0 6px;
}
.nav__toggle span {
  display: block;
  width: 100%; height: 1.5px;
  background: var(--ink);
  transition: transform var(--t), opacity var(--t);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* ========================================================================
   HERO — quiet, typography-led
   ======================================================================== */
.hero {
  padding: clamp(72px, 12vw, 144px) 0 clamp(48px, 8vw, 96px);
}
.hero__inner {
  max-width: 960px;
}
.hero__headline {
  font-family: var(--font-body);
  font-size: clamp(2.25rem, 5.6vw, 4.25rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--ink);
  margin: 0 0 28px;
  max-width: 18ch;
}
.hero__lede {
  max-width: 56ch;
  font-size: clamp(1.02rem, 1.3vw, 1.18rem);
  color: var(--mute);
  margin-bottom: 36px;
}
.hero__cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

/* Headline rotator */
.rotator {
  display: inline-block;
  position: relative;
  padding-bottom: 0.1em;
  vertical-align: baseline;
}
.rotator::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0.07em;
  background: var(--rotator-blue);
  border-radius: 1px;
}
.rotator__word {
  display: inline-block;
  transition: opacity 320ms var(--ease-out), transform 320ms var(--ease-out);
  will-change: transform, opacity;
}
.rotator.is-out .rotator__word {
  opacity: 0;
  transform: translateY(-0.35em);
}
.rotator.is-in .rotator__word {
  opacity: 0;
  transform: translateY(0.35em);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 4vw, 48px);
  margin-top: clamp(64px, 10vw, 112px);
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  font-size: 0.86rem;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}
.hero__meta em {
  font-style: normal;
  color: var(--ink);
  margin-right: 8px;
  font-weight: 500;
}
.meta-link {
  color: var(--mute);
  border-bottom: 1px solid transparent;
  transition: color var(--t), border-color var(--t);
}
.meta-link:hover { color: var(--ink); border-bottom-color: var(--rule); }
.meta-link:hover em { color: var(--accent); }

/* ========================================================================
   SERVICES
   ======================================================================== */
.services {
  padding: var(--section-y) 0;
  border-top: 1px solid var(--rule);
}
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
}
.service {
  padding: 40px 32px 40px 0;
  border-right: 1px solid var(--rule);
}
.service:last-child { border-right: 0; padding-right: 0; }
.service + .service { padding-left: 32px; }
.service__index {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 24px;
  font-variant-numeric: tabular-nums;
}
.service__title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 12px;
}
.service__desc {
  color: var(--mute);
  margin-bottom: 24px;
  font-size: 0.97rem;
}
.service__list {
  border-top: 1px solid var(--rule-soft);
  padding-top: 16px;
}
.service__list li {
  padding: 6px 0;
  font-size: 0.92rem;
  color: var(--ink);
  border-bottom: 1px solid var(--rule-soft);
}
.service__list li:last-child { border-bottom: 0; }

/* ========================================================================
   MARKETS
   ======================================================================== */
.markets {
  padding: var(--section-y) 0;
  border-top: 1px solid var(--rule);
}
.markets__list {
  border-top: 1px solid var(--rule);
}
.markets__list li { border-bottom: 1px solid var(--rule); }
.market {
  display: grid;
  grid-template-columns: 80px 1.1fr 2fr auto;
  gap: 32px;
  align-items: center;
  padding: 28px 0;
  transition: padding var(--t), color var(--t);
}
.market__num {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}
.market__name {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.market__desc {
  color: var(--mute);
  font-size: 0.97rem;
}
.market__arrow {
  font-size: 1.4rem;
  color: var(--ink);
  opacity: 0.4;
  transition: transform var(--t), opacity var(--t), color var(--t);
}
.market:hover .market__arrow {
  transform: translateX(8px);
  opacity: 1;
  color: var(--accent);
}
.market:hover .market__name { color: var(--accent); }

/* ========================================================================
   STATS
   ======================================================================== */
.stats {
  padding: var(--section-y) 0;
  border-top: 1px solid var(--rule);
  background: var(--paper-deep);
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(24px, 4vw, 48px);
}
.stat {
  padding-top: 6px;
  border-top: 1px solid var(--ink);
}
.stat__num {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  margin-bottom: 16px;
}
.stat__suffix { color: var(--accent); }
.stat__label {
  display: block;
  font-size: 0.86rem;
  color: var(--mute);
}
.stat__link {
  display: block;
  color: inherit;
  transition: color var(--t);
}
.stat__link:hover { color: var(--accent); }
.stat__link:hover .stat__num,
.stat__link:hover .stat__suffix { color: var(--accent); }

/* ========================================================================
   CONTACT
   ======================================================================== */
.contact {
  padding: var(--section-y) 0;
  background: var(--ink);
  color: var(--paper);
}
.contact__inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: clamp(40px, 6vw, 80px);
  align-items: end;
}
.contact__lead { max-width: 32ch; }
.contact__title {
  font-family: var(--font-body);
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
}
.contact__sub { color: rgba(244, 241, 234, 0.65); }

.contact__info {
  display: grid;
  gap: 20px;
  margin: 0;
}
.contact__info > div {
  display: grid;
  gap: 4px;
  padding-top: 14px;
  border-top: 1px solid rgba(244, 241, 234, 0.18);
}
.contact__info dt {
  font-size: 0.78rem;
  color: rgba(244, 241, 234, 0.5);
}
.contact__info dd {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
}
.contact__info a { transition: color var(--t); }
.contact__info a:hover { color: var(--accent); }

.contact__cta { display: flex; justify-content: flex-end; }

/* ========================================================================
   FOOTER
   ======================================================================== */
.footer {
  background: var(--ink);
  color: rgba(244, 241, 234, 0.55);
  border-top: 1px solid rgba(244, 241, 234, 0.1);
  padding: 28px 0;
  font-size: 0.84rem;
}
.footer__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer__brand { color: var(--paper); font-weight: 500; }
.footer__rule {
  flex: 1;
  height: 1px;
  background: rgba(244, 241, 234, 0.12);
  min-width: 40px;
}
.footer__licenses { font-variant-numeric: tabular-nums; }
.footer__copy { color: rgba(244, 241, 234, 0.4); }

/* ========================================================================
   RESPONSIVE
   ======================================================================== */
@media (max-width: 900px) {
  .services__grid { grid-template-columns: 1fr; }
  .service {
    padding: 32px 0;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }
  .service + .service { padding-left: 0; }
  .service:last-child { border-bottom: 0; }

  .stats__grid { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }

  .market { grid-template-columns: 48px 1fr auto; }
  .market__desc { grid-column: 2 / 3; }

  .contact__inner { grid-template-columns: 1fr; align-items: flex-start; }
  .contact__cta { justify-content: flex-start; }
}

@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav__cta { display: none; }
  .nav__toggle { display: flex; }
  .nav__links.is-open {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 16px var(--pad-x) 24px;
    margin: 0;
    gap: 4px;
  }
  .nav__links.is-open a {
    padding: 12px 0;
    border-bottom: 1px solid var(--rule-soft);
    opacity: 1;
  }
  .nav__links.is-open a:last-child { border-bottom: 0; }

  .footer__rule { display: none; }
  .footer__inner { gap: 8px; flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .stats__grid { grid-template-columns: 1fr; row-gap: 32px; }
  .market { grid-template-columns: 36px 1fr auto; gap: 16px; }
  .hero__meta { gap: 16px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
