/* ==========================================================================
   Nayi Raah — design tokens
   Palette drawn from the brand logo (sunrise + winding path):
     --cream         page background
     --gold          primary accent (sun)
     --olive         headings / strong text (matches original brand tone)
     --path-green    secondary accent (the path itself)
     --coral         warm highlight for calls-to-action
     --ink           body text
   Type: Fraunces (display, characterful) + Work Sans (body, clean & legible)
   ========================================================================== */

:root {
    --cream: #fff8e9;
    --cream-soft: #fffdf6;
    --gold: #d9a404;
    --gold-deep: #a67c02;
    --olive: #5c4a1e;
    --path-green: #4c7a3d;
    --coral: #e8734a;
    --ink: #2b2412;
    --white: #ffffff;
    --border: #ecdfb8;

    --font-display: "Fraunces", Georgia, serif;
    --font-body: "Work Sans", "Segoe UI", Arial, sans-serif;

    --radius: 18px;
    --radius-sm: 10px;
    --shadow: 0 20px 40px -20px rgba(92, 74, 30, 0.25);
    --container: 1080px;
}

/* --------------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------------- */

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold-deep); }

h1, h2, h3 {
    font-family: var(--font-display);
    color: var(--olive);
    line-height: 1.15;
    margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 600; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 600; margin-top: 2rem; }
h3 { font-size: 1.2rem; font-weight: 600; }

p { margin: 0 0 1rem; }

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: -999px; top: 0;
    background: var(--olive); color: var(--white);
    padding: 0.75rem 1.25rem; z-index: 100; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
    outline: 3px solid var(--coral);
    outline-offset: 2px;
}

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

.site-header {
    background: var(--cream-soft);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.site-header__inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0.9rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}
.brand__mark { font-size: 1.6rem; }
.brand__name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--olive);
    letter-spacing: 0.01em;
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}
.nav-toggle span {
    width: 24px; height: 2px; background: var(--olive); border-radius: 2px;
}
.nav-toggle { display: none; }

.primary-nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}
.primary-nav a {
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--olive);
}
.primary-nav a:hover { color: var(--gold-deep); }

.nav-cta {
    background: var(--gold);
    color: var(--white) !important;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
}
.nav-cta:hover { background: var(--gold-deep); }

@media (max-width: 780px) {
    .nav-toggle { display: flex; }
    .primary-nav {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        background: var(--cream-soft);
        border-bottom: 1px solid var(--border);
        padding: 0.5rem 1.25rem 1rem;
    }
    .primary-nav.is-open { display: flex; }
    .primary-nav a { padding: 0.6rem 0; width: 100%; }
    .nav-cta { width: fit-content; margin-top: 0.5rem; }
}

/* --------------------------------------------------------------------------
   Messages (Django messages framework)
   -------------------------------------------------------------------------- */

.site-messages {
    max-width: var(--container);
    margin: 1.5rem auto 0;
    padding: 0 1.25rem;
    list-style: none;
}
.site-messages__item {
    background: var(--white);
    border-left: 4px solid var(--path-green);
    border-radius: var(--radius-sm);
    padding: 0.9rem 1.2rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow);
}
.site-messages__item--error { border-left-color: var(--coral); }

/* --------------------------------------------------------------------------
   Hero (signature: winding path echoing the brand logo)
   -------------------------------------------------------------------------- */

.hero {
    position: relative;
    max-width: var(--container);
    margin: 0 auto;
    padding: 3.5rem 1.25rem 5rem;
    overflow: hidden;
}
.hero__inner { position: relative; z-index: 1; max-width: 640px; }
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--path-green);
    margin-bottom: 0.75rem;
}
.hero__title { margin-bottom: 1rem; }
.hero__subtitle { font-size: 1.1rem; max-width: 46ch; }

.hero__path {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    width: 100%; height: 90px;
    z-index: 0;
}
.hero__path path {
    fill: none;
    stroke: var(--path-green);
    stroke-width: 3;
    stroke-linecap: round;
    opacity: 0.35;
}

.button {
    display: inline-block;
    text-decoration: none;
    font-weight: 700;
    padding: 0.8rem 1.5rem;
    border-radius: 999px;
    margin: 1.75rem 0.6rem 0 0;
    font-size: 0.95rem;
}
.button--primary { background: var(--coral); color: var(--white); }
.button--primary:hover { background: #d5602f; }
.button--ghost { background: transparent; color: var(--olive); border: 2px solid var(--olive); }
.button--ghost:hover { background: var(--olive); color: var(--white); }

/* --------------------------------------------------------------------------
   Generic sections
   -------------------------------------------------------------------------- */

.section {
    max-width: var(--container);
    margin: 0 auto;
    padding: 2.5rem 1.25rem;
}
.section--narrow { max-width: 720px; }
.section--center { text-align: center; }
.section__lede { font-size: 1.1rem; max-width: 60ch; }

.resource-group + .resource-group { margin-top: 2.5rem; }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-top: 1.25rem;
}
.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 0.4rem; }
.card h3 a { color: var(--olive); text-decoration: none; }
.card h3 a:hover { color: var(--gold-deep); }
.card__date {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--path-green);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}

.link-arrow {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 700;
    text-decoration: none;
}
.link-arrow:hover { color: var(--coral); }

/* --------------------------------------------------------------------------
   Timeline (Work Done Till Date — the path metaphor made literal)
   -------------------------------------------------------------------------- */

.timeline {
    list-style: none;
    margin: 2rem 0 0;
    padding: 0 0 0 1.75rem;
    border-left: 3px solid var(--path-green);
    position: relative;
}
.timeline__item { position: relative; padding-bottom: 2.5rem; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__marker {
    position: absolute;
    left: -1.98rem;
    top: 0.35rem;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--gold);
    border: 3px solid var(--cream);
    box-shadow: 0 0 0 3px var(--path-green);
}
.timeline__date {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--path-green);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.2rem;
}
.timeline__content h2 { margin-top: 0; font-size: 1.4rem; }
.timeline__content h2 a { color: var(--olive); text-decoration: none; }
.timeline__content h2 a:hover { color: var(--gold-deep); }

/* --------------------------------------------------------------------------
   Sunshine page
   -------------------------------------------------------------------------- */

.sunshine-page-quote {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 700 !important;
    color: var(--ink);
    line-height: 1.5;
    margin-bottom: 2.25rem;
    display: block;
}

.sunshine-section {
    margin-bottom: 2rem;
}

.sunshine-section h2 {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    font-weight: 600;
    color: var(--olive);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sunshine-section p {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--ink);
    margin: 0;
}

.sunshine-quote {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    color: var(--olive);
    border-left: 4px solid var(--gold);
    padding-left: 1.25rem;
    margin: 1.5rem 0;
    font-style: italic;
}
.affirmation {
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--path-green);
}

/* --------------------------------------------------------------------------
   Article (work detail)
   -------------------------------------------------------------------------- */

.article-image {
    border-radius: var(--radius);
    margin: 1.5rem 0;
    width: 100%;
    object-fit: cover;
}
.article-body p { font-size: 1.05rem; }

/* --------------------------------------------------------------------------
   Contact form
   -------------------------------------------------------------------------- */

.contact-form { margin-top: 1.5rem; max-width: 560px; }
.form-field { margin-bottom: 1.25rem; }
.form-field--hidden { position: absolute; left: -9999px; }
.form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--olive);
}
.form-field input,
.form-field textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--white);
    color: var(--ink);
}
.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--gold);
}
.form-field__help { font-size: 0.85rem; color: #7a6a45; margin: 0.3rem 0 0; }
.form-field__error { font-size: 0.85rem; color: #b3401f; margin: 0.3rem 0 0; }

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

.site-footer {
    background: var(--olive);
    color: var(--cream);
    margin-top: 4rem;
}
.site-footer__inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 2rem 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}
.site-footer a { color: var(--cream); font-weight: 600; }

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
