/* Penglide site — shared styles. Tokens first, then components. No external requests. */
:root {
  color-scheme: light dark;

  /* colour tokens (brand: petrol, cream, amber) */
  --bg: #fbf7ee;
  --surface: #fffdf8;
  --surface-2: #f3ecdc;
  --fg: #17302f;
  --muted: #4a6261;
  --line: #e3d9c5;
  --brand: #17504f;
  --brand-ink: #0b2e30;
  --on-brand: #f7f1e5;
  --accent: #f0a93b;
  --accent-soft: #fbe7c2;
  --link: #17504f;
  --focus: #b86e00;
  --shadow: 0 1px 2px rgb(23 48 47 / 8%), 0 12px 32px rgb(23 48 47 / 12%);

  /* spacing scale */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 72px;
  --s9: 112px;

  --radius: 16px;
  --radius-lg: 28px;
  --maxw: 1120px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #08201f;
    --surface: #0f3231;
    --surface-2: #123b3c;
    --fg: #eaf2ef;
    --muted: #a9c2be;
    --line: #21504f;
    --brand: #f0a93b;
    --brand-ink: #0b2e30;
    --on-brand: #0b2e30;
    --accent-soft: #3a3219;
    --link: #f0a93b;
    --focus: #ffc766;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 12px 32px rgb(0 0 0 / 40%);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 1.0625rem/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link);
  text-underline-offset: 0.2em;
}

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

.skip {
  position: absolute;
  left: var(--s4);
  top: -80px;
  z-index: 100;
  padding: var(--s3) var(--s4);
  background: var(--brand);
  color: var(--on-brand);
  border-radius: 8px;
}

.skip:focus {
  top: var(--s3);
}

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

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.25rem, 5.2vw + 0.5rem, 4rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.75rem, 3vw + 0.75rem, 2.6rem);
  font-weight: 750;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

.eyebrow {
  display: inline-block;
  margin-bottom: var(--s3);
  padding: var(--s1) var(--s3);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--fg);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lead {
  max-width: 34em;
  margin-top: var(--s4);
  color: var(--muted);
  font-size: clamp(1.1rem, 1vw + 0.9rem, 1.3rem);
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.site-header.scrolled {
  border-bottom-color: var(--line);
}

.bar {
  display: flex;
  align-items: center;
  gap: var(--s5);
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  color: var(--fg);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.nav {
  display: none;
  gap: var(--s5);
  margin-left: auto;
}

.nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.nav a:hover {
  color: var(--fg);
}

.bar-end {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-left: auto;
}

.lang {
  padding: var(--s2) var(--s3);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}

.lang:hover {
  background: var(--surface-2);
}

.bar-end .btn {
  min-height: 40px;
  padding: 0 var(--s4);
  font-size: 0.9rem;
  white-space: nowrap;
}

.bar-end .lang {
  white-space: nowrap;
}

@media (max-width: 420px) {
  .bar {
    gap: var(--s3);
  }

  .bar-end {
    gap: var(--s2);
  }

  .brand {
    font-size: 1.05rem;
    gap: var(--s2);
  }
}

@media (min-width: 900px) {
  .nav {
    display: flex;
  }

  .bar-end {
    margin-left: var(--s5);
  }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 48px;
  padding: 0 var(--s5);
  border: 2px solid var(--brand);
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn.ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line);
}

.btn small {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  opacity: 0.8;
  letter-spacing: 0.02em;
}

.btn.store {
  flex-direction: column;
  gap: 2px;
  padding: var(--s2) var(--s5);
  align-items: flex-start;
  min-width: 168px;
}

.cta-row .btn.store {
  flex: 1 1 168px;
  max-width: 260px;
}

.btn.store span {
  font-size: 1.05rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-top: var(--s6);
}

.note {
  margin-top: var(--s4);
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- hero ---------- */
.hero {
  padding: var(--s7) 0 var(--s8);
}

.hero-grid {
  display: grid;
  gap: var(--s7);
  align-items: center;
}

.device {
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  background: var(--surface-2);
}

.device img {
  width: 100%;
}

.hero .device {
  max-width: 520px;
  justify-self: center;
}

@media (min-width: 900px) {
  .hero {
    padding: var(--s8) 0 var(--s9);
  }

  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .hero .device {
    justify-self: end;
    transform: rotate(1.5deg);
  }
}

/* ---------- trust strip ---------- */
.strip {
  border-block: 1px solid var(--line);
  background: var(--surface);
}

.strip ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s2) var(--s6);
  margin: 0;
  padding: var(--s4) 0;
  list-style: none;
  font-weight: 650;
}

.strip li::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: var(--s2);
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- sections ---------- */
section {
  padding: var(--s8) 0;
}

.split {
  display: grid;
  gap: var(--s7);
  align-items: center;
}

.split .device {
  max-width: 560px;
  justify-self: center;
}

.split.wide .device {
  max-width: 640px;
}

@media (min-width: 900px) {
  section {
    padding: var(--s9) 0;
  }

  .split {
    grid-template-columns: 1fr 1fr;
    gap: var(--s8);
  }

  .split.flip .device {
    order: -1;
  }
}

.alt {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.points {
  display: grid;
  gap: var(--s3);
  margin: var(--s6) 0 0;
  padding: 0;
  list-style: none;
}

.points li {
  padding: var(--s4) var(--s5);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg);
}

.alt .points li {
  background: var(--surface-2);
}

.points b {
  display: block;
  margin-bottom: 2px;
}

.points span {
  color: var(--muted);
  font-size: 0.97rem;
}

@media (min-width: 700px) {
  .points.cols {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .points.cols {
    grid-template-columns: repeat(3, 1fr);
  }
}

.fine {
  margin-top: var(--s5);
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- gallery ---------- */
.gallery-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: var(--s4);
  margin-bottom: var(--s6);
}

.arrows {
  display: none;
  gap: var(--s2);
}

.js .arrows {
  display: flex;
}

.arrows button {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--fg);
  font: inherit;
  font-size: 1.25rem;
  cursor: pointer;
}

.arrows button:hover {
  background: var(--surface-2);
}

.track {
  display: flex;
  gap: var(--s5);
  margin: 0;
  --edge: max(var(--s5), calc((100vw - var(--maxw)) / 2 + var(--s5)));
  padding: 0 var(--edge) var(--s5);
  overflow-x: auto;
  list-style: none;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--edge);
  scrollbar-width: thin;
}

.track li {
  flex: 0 0 min(86vw, 680px);
  scroll-snap-align: start;
}

.track img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.track figcaption {
  padding: var(--s3) var(--s1) 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.track figure {
  margin: 0;
}

/* ---------- privacy block ---------- */
.privacy {
  background: var(--brand-ink);
  color: #eaf2ef;
  border-block: 0;
}

.privacy h2 {
  color: #f7f1e5;
}

.privacy .eyebrow {
  background: #21504f;
  color: #f7f1e5;
}

.privacy .lead {
  color: #bcd2ce;
}

.facts {
  display: grid;
  gap: var(--s4);
  margin: var(--s7) 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 700px) {
  .facts {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .facts {
    grid-template-columns: repeat(3, 1fr);
  }
}

.facts li {
  padding: var(--s5);
  border: 1px solid #21504f;
  border-radius: var(--radius);
  background: #0f3a3b;
}

.facts b {
  display: block;
  margin-bottom: var(--s1);
  color: #f0a93b;
}

.facts span {
  color: #bcd2ce;
  font-size: 0.97rem;
}

.privacy a {
  color: #f0a93b;
}

/* ---------- faq ---------- */
.faq {
  max-width: 780px;
  margin: var(--s6) auto 0;
}

details {
  border-bottom: 1px solid var(--line);
}

summary {
  position: relative;
  padding: var(--s4) var(--s7) var(--s4) 0;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '+';
  position: absolute;
  right: var(--s2);
  top: 50%;
  translate: 0 -50%;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--muted);
}

details[open] summary::after {
  content: '\2212';
}

details p {
  padding: 0 0 var(--s5);
  color: var(--muted);
}

.center {
  text-align: center;
}

.center .lead {
  margin-inline: auto;
}

/* ---------- final cta ---------- */
.final {
  text-align: center;
}

.final .cta-row {
  justify-content: center;
}

.final .device {
  max-width: 96px;
  margin: 0 auto var(--s5);
  border-radius: 24px;
}

/* ---------- footer ---------- */
.site-footer {
  padding: var(--s7) 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4) var(--s6);
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s5);
}

/* ---------- legal / simple pages ---------- */
.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--s7) var(--s5) var(--s8);
}

.doc h1 {
  font-size: clamp(2rem, 4vw + 0.5rem, 2.75rem);
}

.doc h2 {
  margin-top: var(--s7);
  font-size: 1.4rem;
}

.doc p,
.doc ul {
  margin-top: var(--s3);
}

.doc li {
  margin-top: var(--s2);
}

.doc code {
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.doc .meta {
  margin-top: var(--s3);
  color: var(--muted);
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .btn:hover,
  .hero .device {
    transition: none;
    transform: none;
  }
}

@media print {
  .site-header,
  .arrows,
  .cta-row {
    display: none;
  }
}
