/* =========================================================
   TourUg Operator Hub — Design tokens & public site styles
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700;800&family=Inter:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root {
    /* Color */
    --canopy-950: #12202e;
    --canopy-800: #1c2f42;
    --canopy-700: #2a4258;
    --canopy-600: #34506b;
    --sand-50: #faf7f1;
    --sand-100: #efe9df;
    --surface: #FFFFFF;
    --gold-400: #D9A848;
    --gold-500: #c6912e;
    --gold-600: #b8862b;
    --gold-700: #a9791f;
    --rust-600: #A1432A;
    --rust-100: #F3E1DB;
    --ink-900: #24303b;
    --ink-700: #3c4a57;
    --ink-500: #5d6b78;
    --ink-300: #9aa6b1;
    --line: #e7e1d6;
    --line-strong: #d8d0c2;
    --success: #2E7D53;
    --success-100: #E1EFE6;

    /* Type */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'IBM Plex Mono', 'SFMono-Regular', monospace;

    /* Shape / motion */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(18, 32, 46, 0.06), 0 1px 1px rgba(18, 32, 46, 0.04);
    --shadow-md: 0 8px 24px rgba(18, 32, 46, 0.10);
    --shadow-lg: 0 20px 48px rgba(18, 32, 46, 0.16);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink-900);
    background: var(--sand-50);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.12;
    margin: 0 0 0.5em;
    color: var(--canopy-950);
    letter-spacing: -0.01em;
}

p { margin: 0 0 1em; color: var(--ink-700); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 clamp(18px, 3vw, 42px);
}

/* ---- Buttons ------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 12px 22px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.15s var(--ease), border-color 0.15s var(--ease);
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--gold-500); color: var(--canopy-950); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--gold-400); box-shadow: var(--shadow-md); }
.btn-dark { background: var(--canopy-950); color: var(--sand-50); }
.btn-dark:hover { background: var(--canopy-800); }
.btn-outline { background: transparent; border-color: var(--line-strong); color: var(--canopy-950); }
.btn-outline:hover { border-color: var(--canopy-950); }
.btn-ghost { background: transparent; color: var(--ink-700); }
.btn-ghost:hover { color: var(--canopy-950); }
.btn-danger { background: var(--rust-100); color: var(--rust-600); }
.btn-danger:hover { background: var(--rust-600); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---- Top nav (public) ---------------------------------------- */
.pub-nav {
    position: sticky; top: 0; z-index: 40;
    background: rgba(243, 241, 230, 0.88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.pub-nav .container { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.pub-nav .container { min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--canopy-950); }
.brand .brand-mark { width: 34px; height: 34px; }
.pub-nav-links { display: flex; align-items: center; gap: 32px; }
.pub-nav-links a.navlink { font-weight: 500; color: var(--ink-700); font-size: 0.95rem; }
.pub-nav-links a.navlink:hover { color: var(--canopy-950); }
.pub-nav-cta { display: flex; align-items: center; gap: 12px; }

/* ---- Hero ------------------------------------------------------ */
.hero { padding: 76px 0 40px; }
.hero .container { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--gold-700); background: rgba(198, 145, 46, 0.12);
    padding: 6px 12px; border-radius: 999px; margin-bottom: 20px;
}
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-500); }
.hero h1 { font-size: clamp(2.4rem, 4vw, 3.4rem); max-width: 15ch; }
.hero .lede { font-size: 1.15rem; max-width: 46ch; color: var(--ink-700); }
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 28px; margin-top: 40px; flex-wrap: wrap; }
.hero-meta .stat-num { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 600; color: var(--canopy-950); }
.hero-meta .stat-label { font-size: 0.82rem; color: var(--ink-500); }

.route-card {
    background: var(--canopy-950);
    border-radius: var(--radius-lg);
    padding: 36px 30px 30px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}
.route-card::after {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(600px circle at 85% 0%, rgba(198,145,46,0.16), transparent 60%);
    pointer-events: none;
}
.route-card .route-label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-400); margin-bottom: 18px; }
.route-svg { width: 100%; height: auto; }
.route-path {
    fill: none; stroke: var(--gold-500); stroke-width: 2.5; stroke-linecap: round;
    stroke-dasharray: 7 8;
    stroke-dashoffset: 500;
    animation: draw-route 2.4s var(--ease) forwards 0.3s;
}
@keyframes draw-route { to { stroke-dashoffset: 0; } }
.route-pin { fill: var(--sand-50); }
.route-pin-ring { fill: none; stroke: var(--gold-500); stroke-width: 2; }
.route-label-text { font-family: 'IBM Plex Mono', monospace; font-size: 11px; fill: #c3cdd8; }
.route-label-day { font-family: 'IBM Plex Mono', monospace; font-size: 10px; fill: var(--gold-400); }

/* ---- Sections ---------------------------------------------------- */
.section { padding: clamp(56px, 7vw, 96px) 0; }
.section-head { max-width: 640px; margin: 0 auto 52px; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.section-head p { font-size: 1.05rem; }

.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.feature-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
    padding: 28px 24px; transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.feature-icon {
    width: 44px; height: 44px; border-radius: 10px; background: var(--canopy-950);
    color: var(--gold-400); display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.feature-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.feature-card p { font-size: 0.92rem; margin: 0; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: step; }
.step { position: relative; padding-left: 4px; }
.step-num { font-family: var(--font-mono); font-size: 0.85rem; color: var(--gold-700); margin-bottom: 12px; display: block; }
.step h3 { font-size: 1.15rem; }
.step p { font-size: 0.94rem; }

.cta-band {
    background: var(--canopy-950); border-radius: var(--radius-lg); padding: 60px 50px;
    display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
    color: var(--sand-50); position: relative; overflow: hidden;
}
.cta-band::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(500px circle at 90% 100%, rgba(198,145,46,0.18), transparent 60%);
}
.cta-band h2 { color: var(--sand-50); margin-bottom: 6px; font-size: 1.9rem; }
.cta-band p { color: #c3cdd8; margin: 0; }
.cta-band-inner { position: relative; z-index: 1; }

.pub-footer { border-top: 1px solid var(--line); padding: 44px 0; }
.pub-footer .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.pub-footer p { margin: 0; font-size: 0.85rem; color: var(--ink-500); }

/* ---- Auth pages --------------------------------------------------- */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side {
    background: var(--canopy-950); color: var(--sand-50); padding: 56px;
    display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.auth-side::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(600px circle at 20% 100%, rgba(198,145,46,0.16), transparent 60%);
}
.auth-side-content { position: relative; z-index: 1; }
.auth-quote { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.35; max-width: 30ch; margin-top: 40px; }
.auth-quote-by { font-family: var(--font-mono); font-size: 0.78rem; color: var(--gold-400); margin-top: 16px; letter-spacing: 0.04em; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 460px; }
.auth-card h1 { font-size: 1.9rem; margin-bottom: 6px; }
.auth-card .lede { margin-bottom: 30px; }

@media (max-width: 960px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-side { display: none; }
    .hero .container { grid-template-columns: 1fr; }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: 1fr; }
    .pub-nav-links { display: none; }
}

/* ---- Forms (shared) ------------------------------------------------ */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--ink-700); margin-bottom: 6px; }
.field .hint { font-size: 0.78rem; color: var(--ink-500); margin-top: 4px; }
.input, select.input, textarea.input {
    width: 100%; font-family: var(--font-body); font-size: 0.95rem; color: var(--ink-900);
    background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    padding: 11px 14px; transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.input:focus, select.input:focus, textarea.input:focus {
    outline: none; border-color: var(--canopy-700); box-shadow: 0 0 0 3px rgba(18, 32, 46, 0.14);
}
textarea.input { resize: vertical; min-height: 90px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--ink-700); }
.form-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--ink-300); font-size: 0.8rem; }
.form-divider::before, .form-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

@media (max-width: 600px) {
    body { font-size: 15px; }
    .container { padding-left: 16px; padding-right: 16px; }
    .pub-nav .container { min-height: 68px; height: auto; padding-top: 10px; padding-bottom: 10px; }
    .brand { font-size: 1.05rem; gap: 7px; }
    .brand .brand-mark { width: 30px; height: 30px; }
    .pub-nav-cta { gap: 6px; }
    .pub-nav-cta .btn { padding: 8px 10px; font-size: .76rem; }
    .hero { padding: 48px 0 28px; }
    .hero h1 { font-size: clamp(2rem, 10vw, 2.7rem); }
    .hero-actions .btn { width: 100%; }
    .field-row, .user-type-toggle { grid-template-columns: 1fr; gap: 10px; }
    .auth-main { padding: 28px 16px; }
    .auth-card h1 { font-size: 1.65rem; }
}

@media (min-width: 601px) and (max-width: 1024px) {
    .container { padding-left: 28px; padding-right: 28px; }
    .pub-nav .container { gap: 16px; }
    .pub-nav-cta { flex-wrap: wrap; justify-content: flex-end; }
    .hero { padding-top: 58px; }
    .hero .container { gap: 32px; }
    .feature-grid { gap: 16px; }
    .feature-card { padding: 22px 18px; }
    .section { padding-top: 64px; padding-bottom: 64px; }
}

.alert { padding: 13px 16px; border-radius: var(--radius-sm); font-size: 0.9rem; margin-bottom: 20px; border: 1px solid transparent; }
.alert-error { background: var(--rust-100); color: var(--rust-600); border-color: rgba(161,67,42,0.25); }
.alert-success { background: var(--success-100); color: var(--success); border-color: rgba(46,125,83,0.25); }

.user-type-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; }
.user-type-toggle input { position: absolute; opacity: 0; }
.user-type-toggle label {
    display: block; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); padding: 14px;
    cursor: pointer; font-size: 0.88rem; transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.user-type-toggle label strong { display: block; font-size: 0.95rem; margin-bottom: 2px; color: var(--canopy-950); }
.user-type-toggle input:checked + label { border-color: var(--gold-500); background: rgba(198,145,46,0.08); }

.step-indicator { display: flex; gap: 8px; margin-bottom: 28px; }
.step-indicator .dot { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.step-indicator .dot.active { background: var(--gold-500); }