/* SpaceCue Inc — Deep Teal Editorial */
:root {
  --bg: #0f2e33;
  --bg-deep: #0b2428;
  --panel: #133940;
  --text: #f2eadb;
  --muted: #b9c3bf;
  --accent: #e9825a;
  --rule: rgba(242, 234, 219, 0.16);
  --rule-strong: rgba(242, 234, 219, 0.32);
  --serif: 'Playfair Display', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --radius: 2px;
  --wrap: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1rem; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.18; margin: 0; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--accent); color: var(--bg-deep); padding: .6rem 1rem; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15, 46, 51, 0.96);
  border-bottom: 1px solid var(--rule);
}
.site-header .bar {
  max-width: var(--wrap); margin: 0 auto; padding: .95rem var(--gutter);
  display: flex; align-items: center; gap: 2rem;
}
.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--serif); font-size: 1.3rem; letter-spacing: -.01em;
  text-decoration: none; margin-right: auto;
}
.brand-mark {
  position: relative; width: 20px; height: 22px; flex: none;
}
.brand-mark::before, .brand-mark::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 12px;
  border: 2.5px solid var(--accent);
}
.brand-mark::before { top: 0; border-right: 0; border-radius: 10px 0 0 10px; }
.brand-mark::after { bottom: 0; border-left: 0; border-radius: 0 10px 10px 0; }

.site-nav ul { list-style: none; display: flex; gap: 1.9rem; }
.site-nav a {
  display: inline-block; padding: .35rem 0; font-size: .92rem; text-decoration: none;
  color: var(--text); border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"], .site-nav a.is-section {
  color: var(--accent); border-bottom-color: var(--accent);
}
.header-cta {
  font-size: .88rem; text-decoration: none; color: var(--accent);
  border: 1px solid rgba(233, 130, 90, .55); padding: .45rem .9rem; border-radius: var(--radius);
}
.header-cta:hover { background: var(--accent); color: var(--bg-deep); }
.menu-toggle {
  display: none; width: 40px; height: 40px; padding: 0; margin: 0 0 0 -8px;
  background: none; border: 0; color: var(--text); cursor: pointer;
}
.menu-toggle .bars, .menu-toggle .bars::before, .menu-toggle .bars::after {
  display: block; width: 22px; height: 2px; background: currentColor; margin: 0 auto;
  transition: transform .2s ease, opacity .2s ease; position: relative;
}
.menu-toggle .bars::before, .menu-toggle .bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle .bars::before { top: -7px; }
.menu-toggle .bars::after { top: 7px; }
.menu-toggle[aria-expanded="true"] .bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .bars::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Shared type ---------- */
.kicker {
  font-family: var(--sans); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 .9rem;
}
.lede { font-size: 1.12rem; color: var(--muted); max-width: 38rem; }
.muted { color: var(--muted); }
.pull {
  font-family: var(--serif); font-style: italic; font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  line-height: 1.35; margin: 0;
}
.caption {
  font-size: .82rem; font-style: italic; color: var(--muted); margin: .6rem 0 0;
  padding-left: .75rem; border-left: 2px solid var(--accent);
}
.more {
  display: inline-flex; gap: .4rem; align-items: center; color: var(--accent);
  font-size: .9rem; text-decoration: none; border-bottom: 1px solid transparent;
}
.more:hover { border-bottom-color: var(--accent); }
.btn {
  display: inline-block; padding: .85rem 1.6rem; border-radius: var(--radius);
  background: var(--accent); color: var(--bg-deep); font-weight: 600; text-decoration: none;
  border: 1px solid var(--accent); font-size: .95rem;
}
.btn:hover { background: #f09670; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--rule-strong); }
.btn-ghost:hover { background: transparent; border-color: var(--accent); color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; }

.section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; border-top: 1px solid var(--rule); }
.section-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 2rem 4rem; align-items: end; margin-bottom: 2.75rem; }
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.section-head p { margin: 0; color: var(--muted); }

.photo { position: relative; margin: 0; }
.photo img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }

/* ---------- Home: hero ---------- */
.hero { padding: 0 0 clamp(3rem, 6vw, 4.5rem); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.hero-photo { margin-left: calc(-1 * var(--gutter)); }
.hero-photo .frame { aspect-ratio: 4 / 5; max-height: 680px; overflow: hidden; }
.hero-photo img { object-position: 54% 50%; border-radius: 0 var(--radius) var(--radius) 0; }
.hero-photo .caption { margin-left: var(--gutter); }
.hero-copy { padding: 3rem 0 2rem; }
.hero-copy .eyebrow { font-family: var(--serif); font-size: 1.15rem; color: var(--muted); margin-bottom: 1.25rem; }
.hero-copy h1 {
  font-style: italic; font-size: clamp(2.5rem, 4.3vw, 3.9rem); line-height: 1.12; letter-spacing: -.01em;
}
.hero-copy h1 .q { color: var(--accent); }
.hero-copy .rule { width: 5rem; height: 1px; background: var(--rule-strong); margin: 2rem 0 1.4rem; border: 0; }
.hero-copy .sub { font-family: var(--serif); font-style: italic; font-size: 1.15rem; max-width: 32rem; }
.hero-copy .lede { font-size: 1rem; margin-bottom: 2rem; }

/* ---------- Home: feature stories ---------- */
.stories { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.15fr) minmax(0, 1.15fr); gap: 2.25rem; }
.story h3 { font-size: 1.3rem; margin-bottom: 1rem; min-height: 2.6em; }
.story .frame { aspect-ratio: 4 / 3; overflow: hidden; }
.story:first-child .frame { aspect-ratio: 5 / 4; }
.story:first-child h3 { font-size: 1.6rem; }
.story p { color: var(--muted); font-size: .95rem; margin-top: 1rem; }

/* ---------- Home: chapters ---------- */
.chapters { list-style: none; border-top: 1px solid var(--rule-strong); }
.chapter {
  display: grid; grid-template-columns: 4.5rem minmax(0, 4fr) minmax(0, 5fr) auto;
  gap: 1.5rem 2.5rem; align-items: baseline; padding: 1.6rem 0; border-bottom: 1px solid var(--rule);
}
.chapter .num { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 1.5rem; }
.chapter h3 { font-size: 1.35rem; }
.chapter p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ---------- Home: use cases ---------- */
.usecase-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.usecase-grid .frame { aspect-ratio: 16 / 11; overflow: hidden; }
.audience { list-style: none; margin-top: 1.5rem; }
.audience li { padding: 1rem 0; border-top: 1px solid var(--rule); }
.audience strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.15rem; }
.audience span { color: var(--muted); font-size: .93rem; }

/* ---------- Approach ---------- */
.approach-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 5rem); }
.steps { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.25rem 2.5rem; counter-reset: step; }
.steps li { counter-increment: step; border-top: 2px solid var(--accent); padding-top: 1rem; }
.steps li::before {
  content: counter(step, decimal-leading-zero); display: block;
  font-family: var(--serif); font-style: italic; color: var(--accent); margin-bottom: .35rem;
}
.steps h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.steps p { color: var(--muted); font-size: .94rem; margin: 0; }

/* ---------- Home: about strip ---------- */
.about-strip { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.about-strip h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 1.25rem; }

/* ---------- Consult block ---------- */
.consult {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 4rem);
  background: var(--bg-deep); border: 1px solid var(--rule); padding: clamp(2rem, 5vw, 3.75rem);
}
.consult h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); margin-bottom: 1rem; }
.facts { margin: 0; display: grid; gap: 1.1rem; }
.facts div { border-top: 1px solid var(--rule); padding-top: .8rem; }
.facts dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.facts dd { margin: .2rem 0 0; font-family: var(--serif); font-size: 1.2rem; overflow-wrap: anywhere; }
.facts a { text-decoration: none; color: var(--accent); }
.facts a:hover { text-decoration: underline; }
.note { font-size: .85rem; color: var(--muted); margin-top: 1rem; }

/* ---------- Inner page heads ---------- */
.page-head { padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(2.5rem, 5vw, 3.5rem); }
.page-head h1 { font-size: clamp(2.4rem, 4.4vw, 3.6rem); margin-bottom: 1.25rem; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 1.75rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; }
.crumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--rule-strong); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current] { color: var(--text); }

/* Services overview: intro + photo, then alternating rows */
.ov-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.ov-head .frame { aspect-ratio: 16 / 10; overflow: hidden; }
.toc { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 1.5rem; font-size: .9rem; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--accent); }
.ov-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem); align-items: center; padding: clamp(2.5rem, 5vw, 4rem) 0; border-top: 1px solid var(--rule);
  scroll-margin-top: 5rem;
}
.ov-row:nth-child(even) .ov-media { order: 2; }
.ov-media .frame { aspect-ratio: 16 / 10; overflow: hidden; }
.ov-text .idx { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 1.1rem; }
.ov-text h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin: .35rem 0 1rem; }
.ov-text .benefit { font-family: var(--serif); font-style: italic; font-size: 1.1rem; border-left: 2px solid var(--accent); padding-left: 1rem; margin: 1.25rem 0; }
.ov-text ul { list-style: none; margin: 0 0 1.5rem; }
.ov-text li { padding: .45rem 0 .45rem 1.1rem; position: relative; color: var(--muted); font-size: .94rem; border-top: 1px solid var(--rule); }
.ov-text li::before { content: ""; position: absolute; left: 0; top: 1.05rem; width: 6px; height: 6px; background: var(--accent); }

/* About page */
.about-hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 4rem); align-items: end; }
.about-photo .frame { aspect-ratio: 1376 / 768; overflow: hidden; }
.columns { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 5fr) minmax(0, 4fr); gap: clamp(1.75rem, 4vw, 3.5rem); }
.columns h2 { font-size: 1.6rem; }
.columns .dropcap::first-letter { font-family: var(--serif); float: left; font-size: 3.4rem; line-height: .9; padding: .3rem .5rem 0 0; color: var(--accent); }
.svc-list { list-style: none; }
.svc-list li { border-top: 1px solid var(--rule); }
.svc-list a { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 0; text-decoration: none; font-family: var(--serif); font-size: 1.1rem; }
.svc-list a:hover { color: var(--accent); }
.svc-list a span { color: var(--accent); }

/* Contact page */
.contact-hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.email-big {
  display: inline-block; font-family: var(--serif); font-style: italic; font-size: clamp(1.6rem, 4vw, 3rem);
  color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(233, 130, 90, .5);
  overflow-wrap: anywhere; line-height: 1.2; margin: .5rem 0 1.5rem;
}
.email-big:hover { border-bottom-color: var(--accent); }
.topics { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 0 2rem; }
.topics li { border-top: 1px solid var(--rule); }
.topics a { display: block; padding: 1rem 0; text-decoration: none; }
.topics a strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.15rem; }
.topics a span { font-size: .88rem; color: var(--muted); }
.topics a:hover strong { color: var(--accent); }
.checklist { list-style: none; counter-reset: c; display: grid; gap: 1.25rem; }
.checklist li { counter-increment: c; display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: 1rem; }
.checklist li::before { content: counter(c, decimal-leading-zero); font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 1.2rem; }
.checklist strong { display: block; font-weight: 600; }
.checklist span { color: var(--muted); font-size: .95rem; }

/* Detail page */
.detail-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 4rem); align-items: end; }
.detail-head .summary { font-size: 1.15rem; color: var(--muted); margin: 0; }
.detail-figure img { width: 100%; height: auto; border-radius: var(--radius); }
.detail-body { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 5rem); }
.detail-body aside { position: sticky; top: 6rem; align-self: start; }
.detail-block + .detail-block { margin-top: 2.75rem; padding-top: 2.5rem; border-top: 1px solid var(--rule); }
.detail-block h2 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); margin-bottom: 1rem; }
.detail-block p { color: var(--muted); font-size: 1.02rem; }
.siblings { list-style: none; columns: 2; column-gap: 2.5rem; }
.siblings li { break-inside: avoid; border-top: 1px solid var(--rule); }
.siblings a { display: block; padding: .8rem 0; text-decoration: none; font-family: var(--serif); }
.siblings a:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); background: var(--bg-deep); margin-top: clamp(3rem, 6vw, 5rem); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 3fr) minmax(0, 3fr); gap: 2rem 3rem; padding: 3.5rem 0 2.5rem; }
.foot-grid h2 { font-family: var(--sans); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.foot-grid ul { list-style: none; display: grid; gap: .45rem; font-size: .92rem; }
.foot-grid a { text-decoration: none; }
.foot-grid a:hover { color: var(--accent); }
.foot-grid address { font-style: normal; color: var(--muted); font-size: .92rem; margin-top: 1rem; }
.foot-grid address a { color: var(--accent); }
.foot-base { border-top: 1px solid var(--rule); padding: 1.25rem 0 2rem; font-size: .82rem; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .site-header .bar { gap: 1rem; }
  .menu-toggle { display: block; }
  .brand { margin-right: auto; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg); border-bottom: 1px solid var(--rule);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: .5rem var(--gutter) 1.25rem; }
  .site-nav li { border-top: 1px solid var(--rule); }
  .site-nav a { display: block; padding: .9rem 0; font-size: 1.05rem; border-bottom: 0; }
  .site-nav a[aria-current="page"], .site-nav a.is-section { border-bottom: 0; }

  .hero-grid, .section-head, .usecase-grid, .approach-grid, .about-strip, .consult,
  .ov-head, .ov-row, .about-hero, .columns, .contact-hero, .detail-head, .detail-body, .foot-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .ov-row:nth-child(even) .ov-media { order: 0; }
  .detail-body aside { position: static; }
  .chapter { grid-template-columns: 3rem minmax(0, 1fr); }
  .chapter p, .chapter .more { grid-column: 2; }
  .hero-photo { margin: 0 calc(-1 * var(--gutter)); }
  .hero-photo .frame { aspect-ratio: 4 / 3; max-height: none; }
  .hero-photo img { border-radius: 0; }
  .hero-copy { padding: 1.5rem 0 0; }

  /* Feature stories become a swipeable rail */
  .stories {
    display: grid; grid-auto-flow: column; grid-template-columns: none;
    grid-auto-columns: minmax(16rem, 72%); overflow-x: auto; scroll-snap-type: x mandatory;
    margin-right: calc(-1 * var(--gutter)); padding-right: var(--gutter); padding-bottom: .75rem; gap: 1.25rem;
  }
  .story { scroll-snap-align: start; }
  .story h3, .story:first-child h3 { font-size: 1.2rem; min-height: 0; }
  .story:first-child .frame { aspect-ratio: 4 / 3; }
}
@media (max-width: 640px) {
  body { font-size: .97rem; }
  .header-cta { display: none; }
  .hero-copy h1 { font-size: clamp(1.75rem, 8vw, 2.4rem); }
  .page-head h1 { font-size: clamp(1.9rem, 8.5vw, 2.5rem); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .chapter { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .chapter p, .chapter .more { grid-column: 1; }
  .siblings { columns: 1; }
  .actions .btn { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
