/* staygold — Landing page styles
   Palette from src/theme/palette.ts */

:root {
  --bg: #F8F2ED;
  --surface: #FFFDFC;
  --surface-muted: #F1E6DE;
  --border: #E2D1C4;
  --text-primary: #241F1A;
  --text-secondary: #5F5348;
  --text-muted: #8C7D70;
  --accent: #241F1A;
  --danger: #D1453B;
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- Layout ---- */

.page {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Header ---- */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}

.wordmark {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.wordmark-logo {
  height: 20px;
  width: auto;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.header-cta:hover {
  opacity: 0.8;
}

.header-cta svg {
  width: 14px;
  height: 14px;
}

/* ---- Hero ---- */

.hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px 60px;
}

.hero-inner {
  max-width: 520px;
}

h1 {
  font-size: 2.75rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0;
  color: var(--text-secondary);
}

.tagline {
  font-size: 1.125rem;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.6;
  margin: 0;
}

/* ---- Reserve space for typing ---- */

.text-reserve {
  position: relative;
  margin-bottom: 10px;
}

.text-reserve .reserve {
  visibility: hidden;
}

.text-reserve .typed-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

/* ---- CTA below text ---- */

.cta-wrapper {
  margin-top: 32px;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: #FFF8F3;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 999px;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.cta-button:hover {
  opacity: 0.85;
}

.cta-button svg {
  width: 20px;
  height: 20px;
}

/* ---- Typewriter ---- */

.typed-text {
  white-space: pre-wrap;
}

.cursor {
  color: var(--text-muted);
  font-weight: 300;
  animation: blink 0.8s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ---- Footer ---- */

footer {
  padding: 24px;
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

footer a {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

footer a:hover {
  color: var(--text-secondary);
}

/* ---- Legal / Support pages ---- */

.legal-page {
  padding: 60px 24px 80px;
}

.legal-page h1 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.legal-page .updated {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.legal-page h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.legal-page h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.legal-page p,
.legal-page ul {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.legal-page ul {
  padding-left: 20px;
}

.legal-page li {
  margin-bottom: 6px;
}

.legal-page a {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
}

.legal-page a:hover {
  text-decoration-color: var(--text-primary);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 32px;
}

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

/* ---- Support page specifics ---- */

.support-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
}

.support-card h2 {
  margin-top: 0;
  font-size: 1rem;
}

.support-card p {
  margin-bottom: 0;
}

.support-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #FFF8F3;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 999px;
  text-decoration: none;
  margin-top: 12px;
  transition: opacity 0.15s ease;
}

.support-email:hover {
  opacity: 0.85;
}

/* ---- Responsive ---- */

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }

  .hero {
    padding: 0 20px 48px;
  }

  header {
    padding: 14px 20px;
  }
}
