/* ╔══════════════════════════════════════════════════════════════════════════╗
   ║   Eidolon — landing-page base styles                                     ║
   ║   shared/frontend/landing/css/base.css                                   ║
   ║                                                                          ║
   ║   Reset, typography, layout primitives, buttons, form inputs.            ║
   ║   Imported AFTER tokens.css. Components on top of this in components.css.║
   ║                                                                          ║
   ║   No theme-specific colour values here — only --theme-* references.      ║
   ║   That way per-product CSS files just set --theme-* tokens and every     ║
   ║   element re-tints automatically.                                        ║
   ╚══════════════════════════════════════════════════════════════════════════╝ */

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

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

body {
    font-family: var(--font-body);
    color: var(--neutral-text-body);
    background: var(--neutral-cream);
    font-size: var(--fs-base);
    line-height: var(--lh-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ── Typography ─────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--neutral-text-dark);
    line-height: var(--lh-tight);
    font-weight: var(--fw-bold);
    letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 5vw, var(--fs-4xl)); }
h2 { font-size: clamp(1.6rem, 4vw, var(--fs-3xl)); }
h3 { font-size: clamp(1.3rem, 3vw, var(--fs-xl)); }
h4 { font-size: var(--fs-lg); font-weight: var(--fw-semibold); }

p { line-height: var(--lh-normal); }
strong { font-weight: var(--fw-semibold); color: var(--neutral-text-dark); }
em { font-style: italic; color: var(--theme-primary-dark); }

a {
    color: var(--theme-primary);
    text-decoration: none;
    transition: color var(--motion-fast) var(--motion-easing);
}
a:hover {
    color: var(--theme-primary-dark);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}
a:focus-visible {
    outline: 2px solid var(--theme-primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

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

/* ── Layout primitives ───────────────────────────────────────────────────── */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}
.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: var(--space-3xl) 0;
}
.section-tight {
    padding: var(--space-2xl) 0;
}

.section-label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--theme-primary);
    margin-bottom: var(--space-sm);
}
.section-title {
    font-size: clamp(1.75rem, 4vw, var(--fs-3xl));
    margin-bottom: var(--space-md);
}
.section-subtitle {
    font-size: var(--fs-md);
    color: var(--neutral-text-muted);
    max-width: 620px;
    line-height: var(--lh-relaxed);
}

.text-center { text-align: center; }
.text-muted { color: var(--neutral-text-muted); }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.85rem 1.75rem;
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    border-radius: var(--radius-md);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all var(--motion-base) var(--motion-easing);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
    min-height: 44px;          /* WCAG tap target */
}
.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: var(--theme-primary);
    color: var(--neutral-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.btn-primary:hover {
    background: var(--theme-primary-dark);
    color: var(--neutral-white);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    background: var(--neutral-white);
    color: var(--theme-primary-dark);
    border-color: var(--neutral-border);
}
.btn-secondary:hover {
    border-color: var(--theme-primary);
    background: var(--theme-primary-light);
    color: var(--theme-primary-dark);
    text-decoration: none;
}

.btn-accent {
    background: var(--theme-accent);
    color: var(--neutral-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.btn-accent:hover {
    background: var(--theme-accent-dark, #d95550);
    color: var(--neutral-white);
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--theme-primary);
    border-color: transparent;
}
.btn-ghost:hover {
    background: var(--theme-primary-light);
    color: var(--theme-primary-dark);
    text-decoration: none;
}

.btn-lg {
    padding: 1.05rem 2.25rem;
    font-size: var(--fs-base);
    border-radius: var(--radius-lg);
    min-height: 52px;
}
.btn-sm {
    padding: 0.55rem 1.1rem;
    font-size: 0.85rem;
    min-height: 38px;
}

/* ── Form inputs ─────────────────────────────────────────────────────────── */
input[type="text"], input[type="email"], input[type="password"],
input[type="tel"], input[type="number"], input[type="date"],
input[type="time"], input[type="search"],
textarea, select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: var(--fs-base);          /* 16px — prevents iOS auto-zoom on focus */
    color: var(--neutral-text-dark);
    background: var(--neutral-white);
    border: 1.5px solid var(--neutral-border);
    border-radius: var(--radius-md);
    transition: border-color var(--motion-fast) var(--motion-easing),
                box-shadow var(--motion-fast) var(--motion-easing);
    min-height: 44px;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 3px var(--theme-primary-tint);
}
textarea { min-height: 120px; resize: vertical; }
label { display: block; font-weight: var(--fw-medium); color: var(--neutral-text-dark); margin-bottom: var(--space-xs); font-size: var(--fs-sm); }

/* ── Utility helpers ─────────────────────────────────────────────────────── */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity var(--motion-slow) var(--motion-easing),
                transform var(--motion-slow) var(--motion-easing);
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
    .fade-in { opacity: 1; transform: none; }
}
