/* ============================================
   base.css — Reset, Typography, Global Styles
   ============================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  transition: background-color var(--transition), color var(--transition);
  overflow-x: hidden;
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }

p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.75;
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

ul { list-style: none; }

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-body);
}

input, textarea, select {
  font-family: var(--font-body);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border: 2px solid transparent;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232,255,71,0.25);
}

[data-theme="light"] .btn-primary:hover {
  box-shadow: 0 8px 24px rgba(26,43,255,0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--btn-ghost-text);
  border: 1.5px solid var(--btn-ghost-border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ===== Section helpers ===== */
.section-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tag-text);
  background: var(--tag-bg);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.section-header {
  text-align: center;
  max-width: 560px;
  margin: 0 auto var(--space-xl);
}

.section-header h2 {
  margin-bottom: 0.75rem;
}

.section-header p {
  font-size: 1.05rem;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--bg-3);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
  z-index: 9999;
  pointer-events: none;
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ===== Form inputs ===== */
.input {
  width: 100%;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  color: var(--text);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.input:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(232,255,71,0.1);
}

[data-theme="light"] .input:focus {
  box-shadow: 0 0 0 3px rgba(26,43,255,0.1);
}

textarea.input {
  resize: vertical;
  min-height: 140px;
}

/* ===== Scroll reveal animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for sibling reveals */
.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.14s; }
.reveal:nth-child(4) { transition-delay: 0.20s; }
.reveal:nth-child(5) { transition-delay: 0.26s; }
.reveal:nth-child(6) { transition-delay: 0.32s; }
.reveal:nth-child(7) { transition-delay: 0.36s; }
.reveal:nth-child(8) { transition-delay: 0.40s; }
.reveal:nth-child(9) { transition-delay: 0.44s; }

/* ===== Utility ===== */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.logo-icon {
  font-size: 1.2rem;
}
