/* ============================================
   TDLST Landing — minimal, light/dark
   Matches iOS/Web: Archivo, palette
   ============================================ */

@font-face {
  font-family: 'NdsoWriting1';
  src: url('assets/NdsoWriting1-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

:root {
  --font-body: 'Archivo', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Archivo Expanded', 'Archivo', sans-serif;

  /* Light (default) */
  --bg: #fafafa;
  --text: #1a1a1a;
  --text-muted: #5f5f5f;
  --accent: #1a73e8;
  --accent-hover: #1557b0;
  --border: rgba(0, 0, 0, 0.06);
  --radius: 10px;
}

[data-theme="dark"] {
  --bg: #121212;
  --text: #e8e8e8;
  --text-muted: #b0b0b0;
  --accent: #8ab4f8;
  --accent-hover: #a8c7fa;
  --border: rgba(255, 255, 255, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212;
    --text: #e8e8e8;
    --text-muted: #b0b0b0;
    --accent: #8ab4f8;
    --accent-hover: #a8c7fa;
    --border: rgba(255, 255, 255, 0.08);
  }
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  transition: background-color 0.25s ease, color 0.2s ease;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ----- Header (theme toggle) ----- */
.header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.back-link {
  font-size: 0.9375rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--accent);
}

.theme-toggle {
  margin-left: auto;
}

.theme-toggle {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle:hover {
  color: var(--text);
  background: var(--border);
}

.theme-icon {
  position: absolute;
  font-size: 1.25rem;
}

.theme-icon.moon {
  display: none;
}

.theme-icon.sun {
  display: inline;
}

[data-theme="dark"] .theme-icon.sun,
:root:not([data-theme="light"]) .theme-icon.sun {
  display: none;
}

[data-theme="dark"] .theme-icon.moon,
:root:not([data-theme="light"]) .theme-icon.moon {
  display: inline;
}

/* ----- Main splash ----- */
.main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
}

.splash {
  text-align: center;
  max-width: 360px;
}

.logo-wrap {
  margin-bottom: 16px;
}

.logo {
  max-width: 240px;
  height: auto;
  width: 100%;
  color: var(--text);
  display: block;
  margin: 0 auto;
}

.tagline {
  margin: 0 0 32px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.btn-app-store {
  display: inline-block;
  padding: 14px 24px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, #ff9a56 0%, #e85d04 100%);
  box-shadow: 0 2px 4px rgba(232, 93, 4, 0.35);
  border-radius: var(--radius);
  text-decoration: none;
  transition: filter 0.2s, transform 0.1s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.btn-app-store:hover {
  filter: brightness(1.08);
  box-shadow: 0 3px 8px rgba(232, 93, 4, 0.4);
}

.btn-app-store:active {
  transform: scale(0.98);
}

/* ----- Footer ----- */
.footer {
  padding: 20px;
  text-align: center;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
}

.footer-link {
  color: var(--text-muted);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s;
}

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

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ----- Privacy page ----- */
.privacy .main {
  align-items: flex-start;
  padding-top: 48px;
  padding-bottom: 48px;
}

.privacy-content {
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
}

.privacy-content h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.75rem;
  margin: 0 0 8px;
  color: var(--text);
}

.privacy-content .updated {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.privacy-content h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  margin: 28px 0 10px;
  color: var(--text);
}

.privacy-content p,
.privacy-content ul {
  margin: 0 0 14px;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.privacy-content ul {
  padding-left: 1.25rem;
}

.privacy-content a {
  color: var(--accent);
  text-decoration: none;
}

.privacy-content a:hover {
  text-decoration: underline;
}

.privacy-content .signature {
  margin-top: 32px;
  margin-bottom: 0;
  font-family: 'NdsoWriting1', cursive;
  font-size: 2.5rem;
  color: var(--text-muted);
}

.privacy .footer {
  margin-top: auto;
}

/* ----- 404 page ----- */
.page-404 .main {
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
}

.error-content {
  text-align: center;
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.error-code {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(10rem, 50vw, 28rem);
  line-height: 1;
  letter-spacing: -0.05em;
  margin: 0 0 24px;
  color: var(--text);
}

.error-message {
  margin: 0 0 32px;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.error-content .btn-app-store {
  text-decoration: none;
}
