:root, [data-theme="light"] {
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #1d1d1f;
  --ink-soft: #6e6e73;
  --gold: #b1882f;
  --gold-bright: #c79a3a;
  --hairline: rgba(0, 0, 0, 0.12);
  --shadow: 0 4px 30px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.05);
  --btn-hover: rgba(0, 0, 0, 0.04);
  --toggle-track: #e9e9ec;
  --toggle-knob: #ffffff;
  --knob-icon: #b1882f;
}

[data-theme="dark"] {
  --bg: #000000;
  --surface: #1c1c1e;
  --ink: #f5f5f7;
  --ink-soft: #98989d;
  --gold: #e3c266;
  --gold-bright: #efd089;
  --hairline: rgba(255, 255, 255, 0.14);
  --shadow: 0 10px 50px rgba(0, 0, 0, 0.55);
  --btn-hover: rgba(255, 255, 255, 0.06);
  --toggle-track: #2c2c2e;
  --toggle-knob: #e3c266;
  --knob-icon: #1c1c1e;
}

:root {
  --serif: ui-serif, "New York", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.3s ease, color 0.3s ease;
}

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  padding: max(1.25rem, env(safe-area-inset-top)) 1.25rem 1.25rem;
}

.card {
  background: var(--surface);
  width: min(40rem, 100%);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: clamp(1.9rem, 5vw, 3.25rem);
  border: 1px solid var(--hairline);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.eyebrow {
  position: relative;
  margin: 0 0 1.4rem;
  padding-bottom: 0.9rem;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold);
}
.eyebrow::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 2.25rem;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
  opacity: 0.85;
}

.quote {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 1rem + 1.7vw, 1.78rem);
  line-height: 1.55;
  letter-spacing: -0.003em;
  color: var(--ink);
}
.quote p { margin: 0 0 1rem; }
.quote p:last-child { margin-bottom: 0; }
.quote p:first-child::before {
  content: "“";
  font-family: Georgia, serif;
  font-size: 2.5em;
  line-height: 0;
  color: var(--gold);
  vertical-align: -0.45em;
  margin-right: 0.05em;
}

.source {
  display: inline-block;
  margin-top: 1.8rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
  transition: color 0.15s, border-color 0.15s;
}
.source:hover { color: var(--gold); border-color: var(--gold); }

.bar {
  margin-top: 1.9rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.date {
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.date::first-letter { text-transform: uppercase; }

.actions { display: flex; gap: 0.5rem; }

button {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: 980px;
  padding: 0.46rem 0.95rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
button:hover { border-color: var(--gold); color: var(--gold); background: var(--btn-hover); }
button:active { transform: translateY(0.5px); }

/* ---- Switch claro/escuro (estilo iOS) ---- */
.theme-toggle {
  position: fixed;
  top: max(0.95rem, env(safe-area-inset-top));
  right: max(0.95rem, env(safe-area-inset-right));
  z-index: 20;
  border: 0;
  background: transparent;
  padding: 6px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.theme-toggle .track {
  position: relative;
  display: block;
  width: 56px;
  height: 30px;
  border-radius: 999px;
  background: var(--toggle-track);
  border: 1px solid var(--hairline);
  transition: background 0.25s ease;
}
.theme-toggle .knob {
  position: absolute;
  top: 50%;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--toggle-knob);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), background 0.25s ease;
}
[data-theme="dark"] .theme-toggle .knob { transform: translate(26px, -50%); }
.theme-toggle .ico { width: 14px; height: 14px; color: var(--knob-icon); }
[data-theme="light"] .theme-toggle .ico-moon { display: none; }
[data-theme="dark"] .theme-toggle .ico-sun { display: none; }
.theme-toggle:focus-visible { outline: none; }
.theme-toggle:focus-visible .track { box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 45%, transparent); }

.fade { animation: fade 0.45s ease; }
@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ---- Dica de rolagem + manual de instalação ---- */
.scroll-hint {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.4rem 0.6rem;
}
.scroll-hint span { display: inline-block; animation: bob 1.8s ease-in-out infinite; }
.scroll-hint:hover { color: var(--gold); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }

.guide {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0.5rem 1.25rem max(3rem, env(safe-area-inset-bottom));
  scroll-margin-top: 1rem;
}
.guide-title {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 1rem + 1.5vw, 1.9rem);
  margin: 0 0 0.3rem;
  color: var(--ink);
}
.guide-sub { margin: 0 0 1.6rem; color: var(--ink-soft); font-size: 0.95rem; }
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
}
.guide-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 1.25rem 1.35rem;
}
.guide-head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.9rem; }
.guide-ico { width: 26px; height: 26px; color: var(--gold); flex: none; }
.guide-head h3 { margin: 0; font-size: 1rem; font-weight: 600; color: var(--ink); }
.guide-os { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.guide-card ol { margin: 0; padding-left: 1.15rem; display: grid; gap: 0.55rem; }
.guide-card li { font-size: 0.9rem; line-height: 1.5; color: var(--ink-soft); }
.guide-card li b { color: var(--ink); font-weight: 600; }
.guide-card li::marker { color: var(--gold); }

.noscript-msg { text-align: center; font-family: var(--serif); padding: 2rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
