/* lightsoutlabs.ai apex landing — page styles.
   Ports the design's per-element styles onto classes; the design system tokens
   (fonts/colors/typography/spacing/components) come from the sibling files. */

/* The token file paints dark from [data-theme="dark"] alone, which the head
   script sets. With JavaScript off nothing sets it, so the OS preference is
   honoured here instead; a stored "light" choice still wins because the head
   script stamps the attribute this rule excludes. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #111316;
    --surface: #191C21;
    --surface-raised: #22262D;
    --code: #0C0E11;
    --ink: #F2F0E8;
    --muted: #A8AFB8;
    --line: #747D89;
    --line-soft: #59616C;
    --accent: #FB923C;
    --accent-hover: #FDBA74;
    --accent-ink: #1A1005;
    --accent-tint: rgba(251, 146, 60, 0.10);
    --code: #0C0E11;
    --status-blocker: #FF7B86;
    --status-concern: #F0B35B;
    --status-note: #7FB0FF;
    --status-pass: #65C890;
    --status-blocker-tint: rgba(255, 123, 134, 0.10);
    --status-concern-tint: rgba(240, 179, 91, 0.10);
    --status-note-tint: rgba(127, 176, 255, 0.10);
    --status-pass-tint: rgba(101, 200, 144, 0.10);
    color-scheme: dark;
  }
}

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

/* html carries the canvas so the overscroll area matches the theme. */
html { background: var(--canvas); }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

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

/* ---------- shared bits ---------- */

.label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-head {
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 12px;
}
.section-head-split {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.section-head a { text-decoration: none; }
.section-head a:hover { color: var(--accent); }

/* ---------- header ---------- */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* wraps rather than pushing the booking button off a narrow viewport */
  flex-wrap: wrap;
  gap: 16px;
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 32px;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
/* SVG presentation attributes do not resolve var(), so the mark takes its
   colors from CSS instead. */
.brand-mark path { stroke: var(--ink); }
.brand-mark rect { fill: var(--accent); }
.brand-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.site-nav { display: flex; align-items: center; gap: 16px; }

.nav-current {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}
.nav-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
.nav-link:hover { color: var(--ink); }

.theme-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  padding: 6px 10px;
  cursor: pointer;
}
.theme-btn:hover { border-color: var(--line); color: var(--ink); }
/* The button ships `hidden` and is revealed once script has wired it. Any class
   rule that set `display` would out-specify the UA's [hidden] rule and show it
   anyway — the same trap `.consent` documents further down. It does not set
   `display` today; this states the requirement so a later one cannot break it. */
.theme-btn[hidden] { display: none; }

/* ---------- main column ---------- */

.main {
  flex: 1;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 64px 32px 0;
}

/* ---------- hero ---------- */

.hero { position: relative; }
.hero-mark {
  position: absolute;
  right: 0;
  top: -32px;
  z-index: 0;
  pointer-events: none;
}
.hero-body { position: relative; z-index: 1; }
.hero-mark path { stroke: var(--line-soft); }
.hero-mark rect { fill: var(--accent); }

.hero-title {
  margin: 0;
  font-size: 56px;
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
  max-width: 14ch;
  text-wrap: balance;
}
.hero-lede {
  margin: 24px 0 0;
  font-size: 19px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 50ch;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.underlined {
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
}
.underlined:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* intro animation — stroke draw then the lit window.
   Replays only on a first visit; [data-intro="done"] pins the end state. */
@keyframes lolDraw { to { stroke-dashoffset: 0; } }
@keyframes lolWinOn {
  0% { opacity: 0; }
  35% { opacity: 1; }
  55% { opacity: 0.2; }
  80% { opacity: 1; }
  100% { opacity: 1; }
}
[data-draw] {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: lolDraw 1.1s cubic-bezier(0.2, 0, 0, 1) 0.2s forwards;
}
[data-draw-late] { animation-duration: 0.9s; animation-delay: 1.1s; }
[data-win] { opacity: 0; animation: lolWinOn 0.5s linear 2s forwards; }

[data-intro="done"] [data-draw] { animation: none !important; stroke-dashoffset: 0 !important; }
[data-intro="done"] [data-win] { animation: none !important; opacity: 1 !important; }

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- capability strip ---------- */

.strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 64px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.strip .label { padding: 16px 24px; }
.strip .label:first-child { padding-left: 0; }
.strip .label.label-last { color: var(--ink); padding-right: 0; }
.strip-arrow {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--line);
}

/* ---------- problem cards ---------- */

.section { margin-top: 96px; }

.cards {
  display: grid;
  /* the design's minmax(320px,1fr): min() keeps it from overflowing a 320px viewport */
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 32px 48px;
  margin-top: 32px;
}
.card-item { border-left: 1px solid var(--line); padding-left: 16px; }
.card-item h2 {
  margin: 8px 0 0;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--ink);
}
.card-item p {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

/* ---------- post rows ---------- */

.post-row { padding: 24px 0; border-bottom: 1px solid var(--line-soft); }
.post-row h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.post-row h2 a { color: var(--accent); text-decoration: none; }
.post-row h2 a:hover { color: var(--accent-hover); text-decoration: underline; }
.post-row p {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 62ch;
}

/* ---------- contact panel ---------- */

.contact {
  margin: 96px 0 0;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: var(--surface);
  padding: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.contact h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.contact p { margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
.contact-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }

.mailto {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0;
  cursor: pointer;
}
.mailto:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- contact dialog ---------- */

.contact-dialog {
  width: min(calc(100% - 40px), 440px);
  padding: 0;
  color: var(--ink);
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}
.contact-dialog::backdrop { background: rgba(0, 0, 0, 0.62); }
.contact-dialog-inner { padding: 28px; }
.contact-dialog h2 { margin: 0; font-size: 22px; line-height: 1.25; }
.contact-dialog p { margin: 12px 0 0; color: var(--muted); line-height: 1.5; }
.contact-address {
  display: inline-block;
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--accent);
}
.contact-dialog-close { margin-top: 24px; }

/* ---------- footer ---------- */

.site-footer {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 48px 32px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-note { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
}
.footer-links a:hover { color: var(--ink); }
/* The control that reopens the consent notice. A button, not a link: it
   navigates nowhere, and nothing on this page may issue a request the visitor
   did not ask for. It reads as one of the footer's links. */
.footer-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.footer-btn:hover { color: var(--ink); }

/* ---------- consent banner ----------
   Hidden by default and shown only when the blocking head script has stamped
   data-consent="ask" on the root. Deciding in CSS, before first paint, is what
   keeps a fixed bar from appearing under the cursor of a visitor who already
   answered — and a visitor with no JavaScript, who can neither answer nor have
   an answer honoured, never sees it at all. */

.consent {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  background: var(--surface);
  border-top: 1px solid var(--line-soft);
}
[data-consent="ask"] .consent { display: block; }
.consent-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.consent p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink); max-width: 62ch; }
.consent-actions { display: flex; align-items: center; gap: 12px; }

/* ---------- narrow viewports ----------
   The design ships no breakpoints; these two rules keep it inside a 320px
   viewport, using the design system's own mobile display size. */

@media (max-width: 640px) {
  .site-header, .main, .site-footer, .consent-inner { padding-left: 20px; padding-right: 20px; }
  .hero-title { font-size: var(--text-display-mobile); }
  /* the decorative mark has nowhere to sit beside a full-width column */
  .hero-mark { display: none; }
}
