/*
  Sidelark Labs: shared styles for the homepage and the Sidelarks page.
  Only index.html and sidelarks.html load this file; every rule is scoped
  to body.sl so nothing can leak into the Roll Call pages.
  Design reference: design/round3/HANDOFF.md
*/

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-var-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-italic-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

body.sl {
  --cream: #FBF6EE;
  --white: #FFFFFF;
  --peach: #FCE3C3;
  --peach-light: #FDF0DC;
  --sand: #EADBC6;
  --navy: #112337;
  --slate: #3B4A5C;
  --teal: #2BA2A1;
  --teal-ink: #17706F;
  --apricot: #F4A93E;
  --rust: #A93C10;
  --footer-muted: #C9D2DD;
  --footer-rule: #2A3B52;

  --font-display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-aside: "Newsreader", Georgia, serif;

  --gutter: clamp(16px, 4vw, 40px);
  --section-gap: clamp(56px, 8vw, 96px);

  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.sl *,
body.sl *::before,
body.sl *::after { box-sizing: border-box; }

body.sl img { max-width: 100%; }

body.sl a:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  border-radius: 6px;
}
body.sl .site-footer a:focus-visible { outline-color: var(--white); }

/* Skip link: hidden until focused. */
body.sl .skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
}
body.sl .skip-link:focus { top: 12px; }

body.sl .wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
body.sl .wrap--narrow { max-width: 1000px; }

body.sl .visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Header ---------- */
body.sl .site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 28px;
  padding-top: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--sand);
}
/* The border sits inside the gutter, like the design. */
body.sl .site-header-bar { padding: 0 var(--gutter); max-width: 1120px; margin: 0 auto; }
body.sl .site-header-bar--narrow { max-width: 1000px; }
body.sl .site-header__logo { display: inline-flex; border-radius: 6px; }
body.sl .site-header__logo img { display: block; height: 40px; width: auto; }

body.sl .nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 600;
  font-size: 16px;
}
body.sl .nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: var(--apricot);
  text-decoration-thickness: 3px;
  text-underline-offset: 7px;
}
body.sl .nav a[aria-current="page"] {
  text-decoration: none;
  box-shadow: inset 0 -3px 0 var(--apricot);
}

/* ---------- Headings and shared text ---------- */
body.sl h1,
body.sl h2,
body.sl h3 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0;
}
body.sl .section-title {
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
body.sl .aside {
  font-family: var(--font-aside);
  font-style: italic;
  font-weight: 400;
  font-size: 0.6em;
  letter-spacing: 0;
  color: var(--slate);
}
body.sl .muted { color: var(--slate); }

/* ---------- Chips ---------- */
body.sl .status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}
body.sl .chip {
  padding: 2px 10px;
  border-radius: 999px;
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}
body.sl .chip--available { background: var(--teal-ink); }
body.sl .chip--development { background: var(--rust); }
body.sl .status__meta { font-size: 14px; font-weight: 600; color: var(--slate); }
body.sl .tag {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--peach);
  font-size: 14px;
  font-weight: 600;
}

/* ---------- Buttons and links ---------- */
body.sl .button {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
}
body.sl .button--small { min-height: 44px; padding: 0 18px; }
body.sl .text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  color: var(--teal-ink);
}

/* ---------- Homepage introduction (approved: intro B) ---------- */
body.sl .intro {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(8px, 2vw, 24px) clamp(24px, 4vw, 56px);
  margin: clamp(20px, 3.5vw, 40px) 0 clamp(40px, 6.5vw, 80px);
  padding: clamp(22px, 5vw, 60px);
  border-radius: clamp(22px, 3vw, 36px);
  background-color: var(--peach-light);
  background-image: radial-gradient(#E6CFAC 1.1px, transparent 1.4px);
  background-size: 22px 22px;
  background-position: 11px 11px;
}
body.sl .intro__text { flex: 1 1 380px; min-width: 0; }
body.sl .intro h1 {
  max-width: 14ch;
  font-size: clamp(32px, 5.8vw, 66px);
  line-height: 1.04;
  letter-spacing: -0.025em;
}
body.sl .intro__underline {
  position: relative;
  white-space: nowrap;
}
body.sl .intro__underline svg {
  position: absolute;
  left: -2%;
  bottom: -0.16em;
  width: 104%;
  height: 0.3em;
  overflow: visible;
}
body.sl .intro p {
  margin: clamp(16px, 2.2vw, 26px) 0 0;
  max-width: 40ch;
  font-size: clamp(17px, 1.75vw, 20px);
  color: var(--slate);
  text-wrap: pretty;
}
body.sl .intro__art {
  flex: 0 0 auto;
  width: clamp(96px, 22vw, 260px);
  margin-left: auto;
  display: flex;
  justify-content: center;
}
body.sl .intro__art img {
  display: block;
  width: clamp(78px, 15vw, 190px);
  height: auto;
  transform: rotate(-6deg);
}

/* ---------- Sections ---------- */
body.sl .section { margin-top: var(--section-gap); }
body.sl .section-title--spaced { margin-bottom: 18px; }
body.sl .section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 24px;
  margin-bottom: 18px;
}
body.sl .section-head p { margin: 0; font-size: 15px; color: var(--slate); }

/* ---------- App cards ---------- */
body.sl .app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(16px, 2.4vw, 28px);
}
body.sl .app-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--sand);
}
body.sl .app-card__cover {
  position: relative;
  height: clamp(184px, 21vw, 236px);
}
body.sl .app-card__cover--rollcall { background: #050505; }
body.sl .app-card__cover--rollcall .app-card__photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 40% 45%;
}
body.sl .app-card__badge {
  position: absolute;
  left: 22px;
  bottom: -28px;
  width: 60px;
  height: 60px;
  border-radius: 14px;
  box-shadow: 0 0 0 4px var(--white);
}
body.sl .app-card__cover--lip {
  background: #17121F;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.sl .app-card__cover--lip img {
  width: clamp(104px, 12vw, 136px);
  height: auto;
  filter: drop-shadow(0 12px 40px rgba(255, 140, 80, 0.4));
}
body.sl .app-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 42px clamp(20px, 2.6vw, 28px) 24px;
}
body.sl .app-card h3 {
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
body.sl .app-card p { margin: 0; text-wrap: pretty; }
body.sl .app-card__tagline { font-weight: 600; }
body.sl .app-card__desc { color: var(--slate); }
body.sl .app-card__note {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 2px !important;
  font-size: 14px;
  color: var(--slate);
}
body.sl .app-card__note::before {
  content: "";
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--apricot);
  transform: translateY(-1px);
}
body.sl .app-card__actions {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
}
body.sl .app-store-link { display: inline-flex; border-radius: 8px; }
body.sl .app-store-link img { display: block; height: 46px; width: auto; }
body.sl .unavailable {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 0 16px;
  border-radius: 12px;
  border: 1.5px dashed #C9B596;
  color: #5A4A36;
  font-size: 15px;
  font-weight: 500;
}

/* ---------- Star Trek Viewing Guide ---------- */
body.sl .guide-card {
  display: flex;
  flex-wrap: wrap;
  background: var(--white);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--sand);
}
body.sl .guide-card__media {
  flex: 1 1 360px;
  min-width: 0;
  background: #0B1222;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 2.4vw, 24px);
}
body.sl .guide-card__media img {
  display: block;
  width: 100%;
  max-width: 460px;
  height: auto;
  border-radius: 10px;
}
body.sl .guide-card__body {
  flex: 1 1 360px;
  min-width: 0;
  padding: clamp(20px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}
body.sl .guide-card h3 {
  font-size: clamp(24px, 2.6vw, 30px);
  line-height: 1.12;
  letter-spacing: -0.02em;
}
body.sl .guide-card p { margin: 0; }
body.sl .guide-card .button { align-self: flex-start; margin-top: 6px; }

/* ---------- Sidelarks (homepage) ---------- */
body.sl .sidelarks-intro { margin: 6px 0 22px; max-width: 58ch; color: var(--slate); text-wrap: pretty; }
body.sl .sidelarks-panel {
  position: relative;
  padding: clamp(14px, 2.4vw, 24px);
  background: var(--peach);
  border-radius: 24px;
}
body.sl .sidelarks-panel__lark {
  position: absolute;
  top: -27px;
  right: clamp(24px, 6vw, 72px);
}
body.sl .sidelark-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 10px;
}
body.sl .sidelark-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  background: #FFFDF9;
  border-radius: 16px;
}
body.sl .sidelark-row img {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  flex-shrink: 0;
}
body.sl .sidelark-row__text { min-width: 0; }
body.sl .sidelark-row__name { display: block; font-weight: 600; }
body.sl .sidelark-row__summary { display: block; font-size: 15px; color: var(--slate); }
body.sl .sidelark-row__successor { display: block; margin-top: 2px; font-size: 14px; color: var(--rust); }
body.sl .sidelark-row--more {
  align-items: center;
  padding: 6px 16px;
  background: transparent;
  border: 1.5px solid #E2B98A;
}
body.sl .sidelark-row--more a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  color: var(--navy);
}

/* ---------- Sidelarks page ---------- */
body.sl .page-intro { padding: clamp(32px, 6vw, 72px) 0 clamp(24px, 4vw, 40px); }
body.sl .page-intro h1 {
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1;
  letter-spacing: -0.03em;
}
body.sl .page-intro h1 .aside { font-size: 0.42em; }
body.sl .page-intro p {
  margin: 18px 0 0;
  max-width: 46ch;
  font-size: clamp(18px, 2vw, 21px);
  color: var(--slate);
  text-wrap: pretty;
}
body.sl .sidelark-cards { display: flex; flex-direction: column; gap: 16px; }
body.sl .sidelark-card {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 26px;
  padding: clamp(20px, 3vw, 32px);
  background: var(--white);
  border-radius: 24px;
  box-shadow: 0 0 0 1px var(--sand);
  line-height: 1.6;
}
body.sl .sidelark-card__icon { width: 80px; height: 80px; border-radius: 18px; }
body.sl .sidelark-card__body { flex: 1 1 400px; min-width: 0; }
body.sl .sidelark-card__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}
body.sl .sidelark-card h2 {
  font-size: clamp(24px, 2.6vw, 28px);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
body.sl .sidelark-card__lead { margin: 10px 0 0; font-weight: 600; }
body.sl .sidelark-card__more { margin: 8px 0 0; color: var(--slate); text-wrap: pretty; }
body.sl .sidelark-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 16px;
}
body.sl .successor-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: #17121F;
  color: #F4EEF6;
}
body.sl .successor-note img { width: 40px; height: 40px; flex-shrink: 0; }
body.sl .successor-note strong { display: block; }
body.sl .successor-note a { color: inherit; text-decoration-color: #F4A93E; }
body.sl .successor-note a:focus-visible { outline-color: #fff; }
body.sl .successor-note span span { font-size: 15px; color: #D6CCDB; }

/* ---------- Footer ---------- */
body.sl .site-footer {
  margin-top: clamp(64px, 9vw, 112px);
  background: var(--navy);
  color: #E3E8EF;
  font-size: 14px;
}
body.sl .site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: clamp(28px, 4vw, 40px);
  padding-bottom: clamp(32px, 4vw, 44px);
}
body.sl .site-footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}
body.sl .site-footer__home { display: inline-flex; border-radius: 6px; }
body.sl .site-footer__logo { display: block; height: 32px; width: auto; }
body.sl .site-footer .nav { font-size: 14px; gap: 0 20px; }
body.sl .site-footer .nav a {
  color: var(--white);
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
body.sl .site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 40px;
  padding-top: 18px;
  border-top: 1px solid var(--footer-rule);
  color: var(--footer-muted);
}
body.sl .site-footer__bottom p { margin: 0; }
body.sl .site-footer__land { flex: 1 1 360px; max-width: 62ch; }
