/* ================================
   Themes and Global Styles
   ================================ */

:root {
  --bg: #0f0f10;
  --card: #111214;
  --muted: #c9d2da;
  --accent: #eaeaea;
  --accent-2: #8bd3c7;
  --three: #881;
}

[data-theme="light"] {
  --bg: #fdfdfd;
  --card: #ffffff;
  --muted: #555;
  --accent: #111;
  --accent-2: #2a7d8c;
}

[data-theme="readability-focused"] {
  --bg: linear-gradient(135deg, #fffdd0db, #fffdd084);
  --card: #FFFDD0;
  --muted: darkblue;
  --accent: darkblue;
  --accent-2: darkblue;
  --three: darkblue;
  font-family: 'Lexend', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

[data-theme="readability-focused"] .strong,
[data-theme="readability-focused"] .em {
  font-weight: normal;
  font-style: normal;
  color: inherit;
}

[data-theme="readability-focused"] h1,
[data-theme="readability-focused"] h2 {
  font-family: 'Lexend', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* ================================
   Base Styles (Mobile-First)
   ================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  background: var(--bg);
  color: var(--accent);
  font-family: 'Inter', sans-serif;
  transition: background-color 0.4s ease, color 0.4s ease;
}

.container {
  max-width: 1200px;
  margin: 2vh auto;
  padding: 28px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 20px;
}

.logo svg {
  width: 160px;
  height: auto;
  vertical-align: middle;
  display: inline-block;
}

.logo svg #path3 {
  color: var(--three);
}

[data-theme="readability-focused"] .logo svg [id^="path1-"] {
  fill: darkblue !important;
  stroke: darkblue !important;
}

[data-theme="dark"] .logo svg [id^="path1-"] {
  fill: #fff !important;
  stroke: #fff !important;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: center;
  margin-top: 36px;
  margin-bottom: 48px;
}

.card {
  background: var(--card);
  border-radius: 12px;
  padding: 26px;
  box-shadow: 0 8px 30px rgba(2, 6, 8, 0.35), 0 1.5px 8px rgba(0, 0, 0, 0.22);
  transition: background-color 0.4s ease;
}

[data-theme="dark"] .card {
  background: #18191b;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(139, 211, 199, 0.08);
  border: 1px solid #232427;
}

h1 {
  margin: 0 0 12px;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1.2;
}

h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 500;
  font-size: 2rem;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

p.lead {
  color: var(--muted);
  margin: 0 0 18px;
}

.meta-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  padding-left: 0;
}

.meta {
  background: none;
  color: var(--accent);
  padding: 0;
  border-radius: 0;
  font-size: 15px;
  font-weight: 400;
  box-shadow: none;
  border: none;
  transition: none;
  margin-left: 20px;
  position: relative;
}

.meta::before {
  content: "→";
  color: var(--three);
  font-weight: bold;
  margin-right: 8px;
  position: absolute;
  left: -20px;
}

.qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.qr-placeholder {
  width: 220px;
  height: 220px;
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.qr-code {
  max-width: 100%;
  height: auto;
  display: block;
  margin: auto;
}

.small {
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
  text-align: center;
}

section.explain {
  margin-top: 26px;
  display: grid;
  gap: 18px;
}

.sub {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.num-pill {
  background: none;
  color: var(--accent-2);
  padding: 0;
  border-radius: 0;
  font-weight: 700;
  min-width: 110px;
  text-align: left;
  display: inline-block;
  font-size: 13px;
  box-shadow: none;
  border: none;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

footer {
  margin-top: 40px;
  margin-bottom: 15px;
  font-size: 13px;
  text-align: center;
}

[data-theme="readability-focused"] footer {
  background: var(--card);
  color: var(--accent);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(2, 6, 8, 0.15), 0 1.5px 8px rgba(0, 0, 0, 0.10);
  padding: 26px;
  margin-top: 40px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.theme-switch {
  display: flex;
  gap: 10px;
}

.theme-btn {
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  border: none;
  font-size: 13px;
  background: var(--accent-2);
  color: #fff;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-btn:hover {
  opacity: 0.85;
}

.theme-btn.selected {
  outline: 2px solid var(--accent-2);
  box-shadow: 0 0 0 2px #ffd700;
  opacity: 1;
  font-weight: bold;
  border: 2px solid var(--accent-2);
}

#message {
  background: white;
  max-width: 360px;
  margin: 100px auto 16px;
  padding: 32px 24px 16px;
  border-radius: 3px;
}

#message h1 {
  font-size: 22px;
  font-weight: 300;
  color: rgba(0, 0, 0, 0.6);
  margin: 0 0 16px;
}

#message p {
  line-height: 140%;
  margin: 16px 0 24px;
  font-size: 14px;
}

.strong {
  font-weight: bold;
  color: inherit;
}

.em {
  font-style: italic;
  color: inherit;
}

#footer-tag {
  display: none;
}

.hero {
  grid-template-columns: 1fr;
}

.qr-box {
  grid-column: 1 / -1;
  margin-top: 32px;
}


/* ================================
   Breakpoints (Tablet and up)
   ================================ */

/* Tablet: 768px and up */
@media (min-width: 48em) {

  body {
    font-size: 18px;
  }

  footer,
  .small,
  .meta,
  .num-pill,
  .qr-placeholder {
    font-size: 14px;
  }

  .small {
    margin-top: 14px;
  }

  #footer-tag {
    display: inline;
  }

}

/* Desktop: 1024px and up */
@media (min-width: 64em) {

  body {
    font-size: 20px;
  }

  footer,
  .small,
  .meta,
  .num-pill,
  .qr-placeholder {
    font-size: 16px;
  }

  .small {
    margin-top: 14px;
  }

  .hero {
    grid-template-columns: 1fr 300px;
  }

  .qr-box {
    grid-column: 2;
    margin-top: 0;
  }

  .qr-placeholder {
    width: 240px;
    height: 240px;
  }
}

/* Large Desktop: 1200px and up */
@media (min-width: 75em) {

  body {
    font-size: 22px;
  }

  footer,
  .small,
  .meta,
  .num-pill,
  .qr-placeholder {
    font-size: 18px;
  }

  .small {
    margin-top: 14px;
  }

  .hero {
    grid-template-columns: 1fr 360px;
  }

  .qr-box {
    grid-column: 2;
    margin-top: 0;
  }

  .qr-placeholder {
    width: 320px;
    height: 320px;
  }

  footer {
    margin-bottom: 14px;
  }

}
