/* The Left Sock company site. Every colour comes from theme.css (generated: npm run theme). */

:root {
  --surface: var(--md-sys-color-surface);
  --card: var(--md-sys-color-surface-container);
  --card-high: var(--md-sys-color-surface-container-high);
  --text: var(--md-sys-color-on-surface);
  --muted: var(--md-sys-color-on-surface-variant);
  --edge: var(--md-sys-color-outline);
  --hairline: var(--md-sys-color-outline-variant);
  --brand: var(--md-sys-color-primary);
  --action: var(--md-sys-color-tertiary);
  --on-action: var(--md-sys-color-on-tertiary);
  --badge: var(--md-sys-color-tertiary-container);
  --on-badge: var(--md-sys-color-on-tertiary-container);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font: 1.0625rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--brand); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1rem; }

/* Header */
.brand { padding: 1.25rem 0 0; }
.brand .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mark { display: inline-block; }
.wordmark { display: block; height: 28px; width: auto; }

/* Light/dark lockup: the one matching the theme (data-theme on <html>, else the device setting). */
.wordmark-light { display: none; }
:root[data-theme="light"] .wordmark-light { display: block; }
:root[data-theme="light"] .wordmark-dark { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .wordmark-light { display: block; }
  :root:not([data-theme="dark"]) .wordmark-dark { display: none; }
}

/* Light/dark controls (docs/theme-toggle-plan.md): a two-part switch from 480px wide, a circle below.
   Hidden without JavaScript, and kept invisible (space held) until theme-toggle.js has run. The
   selected look comes from data-theme and the device setting, never from the script. */
.theme-switch, .theme-toggle { display: none; flex: none; }
[data-js] .theme-toggle { display: inline-flex; }
@media (min-width: 480px) {
  [data-js] .theme-toggle { display: none; }
  [data-js] .theme-switch { display: inline-flex; }
}
[data-js]:not([data-theme-ready]) .theme-switch,
[data-js]:not([data-theme-ready]) .theme-toggle { visibility: hidden; }

.theme-switch { padding: 3px; gap: 2px; border: 1px solid var(--hairline); border-radius: 999px; background: var(--card); }
.theme-switch button,
.theme-toggle {
  align-items: center;
  justify-content: center;
  padding: 0;
  font: inherit;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.theme-switch button { display: inline-flex; width: 38px; min-width: 38px; min-height: 38px; }
.theme-toggle { width: 44px; min-width: 44px; min-height: 44px; border: 1px solid var(--hairline); }
.theme-toggle:hover { color: var(--text); border-color: var(--edge); }
.theme-switch svg, .theme-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (pointer: coarse) { .theme-switch button { width: 44px; min-width: 44px; min-height: 44px; } }

/* Selected half, and the circle's icon (it shows the theme you'd switch to). */
.theme-switch [data-theme-set="dark"],
:root[data-theme="light"] .theme-switch [data-theme-set="light"] { background: var(--brand); color: var(--md-sys-color-on-primary); }
:root[data-theme="light"] .theme-switch [data-theme-set="dark"] { background: transparent; color: var(--muted); }
.theme-toggle .i-moon { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-moon { display: inline; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-switch [data-theme-set="light"] { background: var(--brand); color: var(--md-sys-color-on-primary); }
  :root:not([data-theme="dark"]) .theme-switch [data-theme-set="dark"] { background: transparent; color: var(--muted); }
  :root:not([data-theme="dark"]) .theme-toggle .i-sun { display: none; }
  :root:not([data-theme="dark"]) .theme-toggle .i-moon { display: inline; }
}
/* Hover only the unselected half (:root lifts it above the resets above). */
:root .theme-switch button:hover:not([aria-pressed="true"]) { color: var(--text); }

/* Windows high contrast: the selected half in system highlight colours, with a visible focus ring. */
@media (forced-colors: active) {
  .theme-switch [data-theme-set="dark"],
  :root[data-theme="light"] .theme-switch [data-theme-set="light"] { forced-color-adjust: none; background: Highlight; color: HighlightText; outline-color: CanvasText; }
  :root[data-theme="light"] .theme-switch [data-theme-set="dark"] { forced-color-adjust: auto; }
}
@media (forced-colors: active) and (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-switch [data-theme-set="light"] { forced-color-adjust: none; background: Highlight; color: HighlightText; outline-color: CanvasText; }
  :root:not([data-theme="dark"]) .theme-switch [data-theme-set="dark"] { forced-color-adjust: auto; }
}

/* Headings and text */
h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); line-height: 1.08; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 1rem; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 1.25rem; }
h3 { font-size: 1.15rem; margin: 0 0 0.4rem; }
p { margin: 0 0 1rem; }
.lede { color: var(--muted); font-size: 1.15rem; max-width: 40rem; }

/* Sections */
section { padding: 3.5rem 0; border-top: 1px solid var(--hairline); }
.hero { border-top: 0; padding: 3rem 0 4rem; }

/* Call-to-action links styled as buttons */
.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.75rem 1.6rem;
  font-weight: 700;
  color: var(--on-action);
  background: var(--action);
  border-radius: 10px;
  text-decoration: none;
}

/* "Pay for the product" offers */
.offers { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .offers { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.offer { background: var(--card); border: 1px solid var(--hairline); border-left: 4px solid var(--brand); border-radius: 14px; padding: 1.25rem; }
.offer p { color: var(--muted); margin: 0; }

/* "Sound familiar?" tap-to-reveal cards */
.situations { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .situations { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; } }
.situation { background: var(--card); border: 1px solid var(--hairline); border-radius: 14px; }
.situation summary {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 44px;
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  list-style: none;
}
.situation summary::-webkit-details-marker { display: none; }
.card-title { font-weight: 700; font-size: 1.1rem; }
.see { color: var(--brand); font-weight: 600; font-size: 0.95rem; }
.see::after { content: " \25B8"; display: inline-block; transition: transform 0.15s; }
.situation[open] .see::after { transform: rotate(90deg); }
.situation ul { margin: 0; padding: 0 1.25rem 1.1rem 2.4rem; color: var(--muted); }
.situation li { margin: 0.35rem 0; }
@media print { details::details-content { content-visibility: visible; } }

/* What we've built */
.product { background: var(--card); border: 1px solid var(--hairline); border-left: 4px solid var(--action); border-radius: 14px; padding: 1.5rem; max-width: 46rem; }
.product h3 { display: flex; align-items: center; gap: 0.75rem; font-size: 1.4rem; }
.badge { font-size: 0.8rem; font-weight: 700; color: var(--on-badge); background: var(--badge); border-radius: 999px; padding: 0.2rem 0.65rem; }
.product p { color: var(--muted); margin: 0; }
/* The card's one link, stretched over the whole card so any tap on it follows the link. */
.product { position: relative; }
.product .visit { margin-top: 1rem; }
.product .visit a { font-weight: 600; }
.product .visit a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.product .visit a:focus-visible { outline: none; }
.product:has(.visit a:focus-visible) { outline: 3px solid var(--brand); outline-offset: 2px; }
@media (hover: hover) {
  .product:hover { border-color: var(--edge); border-left-color: var(--action); background: var(--card-high); }
  .product:hover .visit a { text-decoration-thickness: 2px; }
}

/* Story */
.story p { max-width: 46rem; color: var(--muted); font-size: 1.1rem; }

/* Bottom call to action */
.cta { text-align: left; }
.cta .band { background: var(--card-high); border-radius: 18px; padding: 2.25rem 1.5rem; }
.cta p { color: var(--muted); }

/* Footer */
footer { border-top: 1px solid var(--hairline); padding: 1.5rem 0 3rem; color: var(--muted); font-size: 0.95rem; }
footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; align-items: center; }
footer a { display: inline-flex; align-items: center; min-height: 44px; }

/* Privacy and 404 */
.doc { max-width: 46rem; padding-top: 2rem; padding-bottom: 3rem; } /* sides come from .wrap */
.doc h1 { font-size: 2.2rem; }
.doc p { color: var(--muted); }
.doc strong { color: var(--text); }
.updated { font-size: 0.95rem; }
.links { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: center; }
