/* Tango Learn — shared styles */

:root {
  --bg: #fdfaf7;
  --bg-elevated: #ffffff;
  --text: #241c1a;
  --text-muted: #6b5f5b;
  --accent: #9b1b30;
  --accent-soft: #f3e3e6;
  --border: #e8ddd7;
  --shadow: 0 1px 2px rgba(36, 28, 26, .06), 0 8px 24px rgba(36, 28, 26, .05);
  --radius: 14px;
  --maxw: 760px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16110f;
    --bg-elevated: #1f1917;
    --text: #f2ebe7;
    --text-muted: #a99c97;
    --accent: #e8677f;
    --accent-soft: #33191f;
    --border: #322a27;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

:root[data-theme="dark"] {
  --bg: #16110f;
  --bg-elevated: #1f1917;
  --text: #f2ebe7;
  --text-muted: #a99c97;
  --accent: #e8677f;
  --accent-soft: #33191f;
  --border: #322a27;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px;
}

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

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -.01em;
}

.brand .mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 16px;
  flex: none;
}

nav.site-nav {
  display: flex;
  gap: 20px;
  font-size: 15px;
}

nav.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

nav.site-nav a:hover,
nav.site-nav a[aria-current="page"] {
  color: var(--accent);
}

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

.hero {
  padding: 72px 0 56px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(30px, 6vw, 46px);
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0 0 16px;
}

.hero p.lede {
  font-size: clamp(17px, 2.4vw, 20px);
  color: var(--text-muted);
  margin: 0 auto 28px;
  max-width: 34em;
}

.hero p.lede.last { margin-bottom: 0; }

/* ---------- content ---------- */

main { padding-bottom: 72px; }

h2 {
  font-size: 24px;
  letter-spacing: -.01em;
  margin: 44px 0 12px;
}

h3 {
  font-size: 18px;
  margin: 28px 0 8px;
}

p, ul, ol { margin: 0 0 16px; }

ul, ol { padding-left: 22px; }

li { margin-bottom: 6px; }

a { color: var(--accent); }

.page-title {
  padding: 56px 0 8px;
}

.page-title h1 {
  font-size: clamp(28px, 5vw, 38px);
  letter-spacing: -.02em;
  margin: 0 0 8px;
}

.updated {
  color: var(--text-muted);
  font-size: 15px;
  margin: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin: 8px 0 8px;
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  text-decoration: none;
  color: inherit;
  display: block;
}

.card h3 { margin: 0 0 6px; }

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

.callout {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  margin: 24px 0;
}

.callout :last-child { margin-bottom: 0; }

details {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

details summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

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

details summary::after {
  content: "+";
  color: var(--accent);
  font-size: 20px;
  line-height: 1;
  flex: none;
}

details[open] summary::after { content: "–"; }

details .answer { padding-top: 10px; }

details .answer :last-child { margin-bottom: 0; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 999px;
}

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

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  color: var(--text-muted);
  font-size: 15px;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 18px;
}

.site-footer a:first-child { margin-left: 0; }

.site-footer a:hover { color: var(--accent); }

@media (max-width: 520px) {
  .site-footer .wrap { flex-direction: column; gap: 8px; }
  .site-footer a { margin: 0 18px 0 0; }
}
