/* ==========================
   0. Fonts
   ========================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:wght@500;600;700&family=Source+Serif+4:wght@500;600;700&family=Karla:wght@400;500;600&display=swap');

/* ==========================
   1. Design Tokens / Palette
   ========================== */

:root {
    /* Backgrounds: rice paper & soft sky */
    --color-bg: #fff4e5;
    /* main page background: warm rice paper */
    --color-bg-alt: #ffe9d2;
    /* hero / highlighted bands: soft peach */
    --color-surface: #fffaf2;
    /* cards / content blocks */
    --color-surface-alt: #e6f1ef;
    /* gentle teal-tinged surface (like water or leaves) */

    /* Brand / UI
       Primary = soft teal/blue
       Secondary = clay/blush accent */
    --color-primary: #5e8f8a;
    /* main CTA, links (teal) */
    --color-primary-soft: #dcebe8;
    /* backgrounds, hovers */
    --color-primary-strong: #466f6a;
    /* hover/active */

    --color-secondary: #c97b63;
    /* clay / roof tile accent */
    --color-secondary-soft: #f6ded4;
    /* soft clay wash */
    --color-secondary-strong: #a85c46;
    /* stronger clay */

    --color-accent: #f3c96b;
    /* soft sun / lantern light */
    --color-accent-soft: #fff4d8;
    /* very pale highlight */

    /* Neutrals: warm ink-like browns */
    --color-neutral-900: #2f2622;
    /* main text */
    --color-neutral-800: #463630;
    --color-neutral-700: #6f574d;
    --color-neutral-500: #a38778;
    --color-neutral-400: #c9b1a3;
    --color-neutral-200: #f0e1d8;

    /* Feedback (harmonised with teal / clay) */
    --color-success: #4f8b6e;
    --color-warning: #d29a3a;
    --color-error: #c25b5b;
    --color-info: #6b8d9f;

    /* Borders & outlines: soft, warm */
    --color-border-soft: rgba(115, 94, 82, 0.18);
    --color-border-strong: rgba(115, 94, 82, 0.32);

    /* Radii & shadow */
    --radius-card: 18px;
    --radius-card-lg: 24px;
    --radius-pill: 9999px;

    --shadow-soft: 0 12px 26px rgba(0, 0, 0, 0.06);
    --shadow-subtle: 0 4px 10px rgba(0, 0, 0, 0.03);

    /* Typography */
    --font-heading-display: "Fraunces", "Source Serif 4", "Georgia", serif;
    --font-heading: "Source Serif 4", "Georgia", "Times New Roman", serif;
    --font-body: "Karla", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-ui: "Karla", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    --text-base: 16px;
    --text-sm: 0.875rem;
    --text-md: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.4rem;
    --text-2xl: 1.8rem;
    --text-3xl: 2.2rem;

    /* Transitions */
    --transition-fast: 150ms ease-out;
    --transition-normal: 220ms ease-out;
}

/* ==========================
   2. Base
   ========================== */

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

html {
    font-size: var(--text-base);
}

body.site {
    margin: 0;
    min-height: 100vh;
    background-color: var(--color-bg);
    color: var(--color-neutral-900);
    font-family: var(--font-body);
    display: flex;
    flex-direction: column;
}

/* Headings & text */

h1,
h2,
h3,
h4 {
    letter-spacing: 0.01em;
}

.section-header .overline::before {
    content: "✦";
    margin-right: 0.4rem;
    font-size: 0.9em;
    color: var(--color-secondary);
}

h1 {
    font-size: 2.3rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

h3 {
    font-size: 1.45rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

p,
li {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-neutral-900);
}

/* Links */

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 3px;
}

/* Utilities */

.overline {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-neutral-700);
    margin-bottom: 0.75rem;
}

.list {
    padding-left: 1.2rem;
    margin: 0.5rem 0 0;
}

.list li {
    margin-bottom: 0.35rem;
}

/* ==========================
   3. Layout primitives
   ========================== */

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem;
}

.section {
    padding: 1.5rem 0;
}

.section--spacious {
    padding: 2.75rem 0;
}

.site-main {
    flex: 1;
}

/* ==========================
   4. Header & Navigation
   ========================== */

.site-header {
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border-soft);
    position: relative;
    z-index: 50;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

/* Brand */

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.brand-logo {
    height: 36px;
    width: auto;
    display: block;
}

@media (max-width: 600px) {
    .brand-logo {
        height: 30px;
    }
}

.brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%,
            #fff9f3,
            var(--color-primary));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #fffaf3;
}

.brand-text {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-neutral-900);
}

/* Nav */

.site-nav {
    position: relative;
}

.site-nav__list {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav__link {
    position: relative;
    font-size: 0.95rem;
    color: var(--color-neutral-900);
}

.site-nav__link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.2rem;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    border-radius: var(--radius-pill);
    transition: width var(--transition-fast);
}

.site-nav__link:hover::after {
    width: 100%;
}

.site-nav__link--active::after {
    width: 100%;
}

/* Mobile nav toggle */

.nav-toggle {
    display: none;
    border: none;
    background: transparent;
    padding: 0.3rem;
    cursor: pointer;
}

.nav-toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--color-neutral-900);
    border-radius: 999px;
    margin: 4px 0;
}

/* ==========================
   5. Hero section
   ========================== */

.hero {
    padding-top: 3rem;
    background: linear-gradient(180deg,
            var(--color-bg-alt) 0%,
            var(--color-bg) 65%);
}

.hero-logo {
    display: block;
    width: min(220px, 55vw);
    height: auto;
    margin: 0 auto 1.25rem;
    opacity: 0.95;
}

.hero__layout {
    display: grid;
    gap: 2rem;
}

.hero__content {
    max-width: 36rem;
}

.hero__lead {
    margin-bottom: 1.25rem;
    color: var(--color-neutral-700);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.hero__meta {
    font-size: 0.9rem;
    color: var(--color-neutral-700);
}


.hero__meta-highlight {
    background-color: var(--color-accent-soft);
    padding: 0.1rem 0.5rem;
    border-radius: var(--radius-pill);
    color: var(--color-neutral-800);
}

/* Hero side card */

.hero-card {
    background: linear-gradient(135deg,
            rgba(230, 241, 239, 0.96),
            /* soft teal water */
            rgba(255, 250, 242, 1)
            /* warm paper */
        );
    border-radius: var(--radius-card);
    padding: 1.75rem 1.5rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--color-border-soft);
}

.hero-card__title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.hero-card__text {
    font-size: 0.95rem;
    color: var(--color-neutral-700);
    margin-bottom: 0.75rem;
}

.hero-card__list {
    padding-left: 1.1rem;
    margin: 0.25rem 0 0;
}

.hero-card__list li {
    font-size: 0.9rem;
    color: var(--color-neutral-900);
    margin-bottom: 0.3rem;
}

/* ==========================
   6. Buttons
   ========================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-pill);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.6rem 1.35rem;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition:
        background-color 150ms ease-out,
        color 150ms ease-out,
        box-shadow 150ms ease-out,
        transform 100ms ease-out;
}

.btn--primary {
    background-color: var(--color-primary);
    color: #fffaf2;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-soft);
}

.btn--primary:hover {
    background-color: var(--color-primary-strong);
    border-color: var(--color-primary-strong);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.btn--secondary {
    background-color: var(--color-surface);
    color: var(--color-neutral-900);
    border-color: var(--color-secondary-soft);
}

.btn--secondary:hover {
    background-color: var(--color-secondary-soft);
    border-color: var(--color-secondary);
    text-decoration: none;
}

/* ==========================
   7. Cards & feature sections
   ========================== */

.section-header {
    max-width: 40rem;
    margin-bottom: 1.75rem;
}

.section-header__text {
    color: var(--color-neutral-700);
}

.section.section--split .container {
    padding-top: 2.25rem;
    padding-bottom: 2.25rem;
}

.section .card {
    margin-bottom: 0.75rem;
}

.card {
    background-color: var(--color-surface);
    border-radius: var(--radius-card);
    border: 1px solid var(--color-border-soft);
    padding: 1.5rem;
    box-shadow: var(--shadow-subtle);
}

.card-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-secondary-strong);
    background-color: var(--color-secondary-soft);
    display: inline-flex;
    padding: 0.1rem 0.55rem;
    border-radius: var(--radius-pill);
    margin-bottom: 0.5rem;
}

/* WIP card variant for sessions page */
.card--wip {
    border-style: dashed;
    background-color: var(--color-accent-soft);
}

/* Founder card etc */
.founder-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Header block: avatar + text */
.founder-card__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.25rem;
}

.founder-card__avatar {
    flex-shrink: 0;
    width: 128px;
    height: 128px;
    border-radius: 999px;
    overflow: hidden;
    border: 2px solid var(--color-border-soft);
    background-color: var(--color-surface-alt);
}

.founder-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.founder-card__meta p {
    margin: 0.1rem 0;
}

.founder-card__role {
    font-size: 0.85rem;
    color: var(--color-neutral-700);
}

.founder-card__link a {
    font-size: 0.9rem;
}

/* Body text inside founder card */
.founder-card__body p {
    font-size: 0.95rem;
    color: var(--color-neutral-700);
    margin-bottom: 0.6rem;
}

/* Details / summary for founder note */
.founder-note {
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

/* Remove default triangle styling across browsers while keeping accessibility */
.founder-note>summary {
    list-style: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-primary-strong);
    text-decoration: underline;
    text-underline-offset: 0.15em;
    padding: 0.25rem 0;
}

/* Some browsers still show a marker; hide it */
.founder-note>summary::-webkit-details-marker {
    display: none;
}

/* Subtle hover state */
.founder-note>summary:hover {
    color: var(--color-primary);
}

/* Expanded content */
.founder-note__content {
    margin-top: 0.4rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-border-soft);
}

.founder-note__content p:last-child {
    margin-bottom: 0;
}


/* Feature grid */

.feature-grid {
    display: grid;
    gap: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 0.35rem;
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--color-neutral-700);
}

/* New to RPGs */

.new-to-rpgs {
    display: grid;
    gap: 1.5rem;
}

.new-to-rpgs__content p {
    color: var(--color-neutral-700);
}

/* ==========================
   8. Footer
   ========================== */

.site-footer {
    border-top: 1px solid rgba(187, 168, 154, 0.6);
    background-color: var(--color-bg);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

.footer-text {
    font-size: 0.85rem;
    color: var(--color-neutral-700);
}

.footer-link {
    font-size: 0.9rem;
}

/* ==========================
   9. Responsive
   ========================== */

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

    .header-inner {
        align-items: center;
    }

    .site-nav__list {
        position: absolute;
        right: 0;
        top: 120%;
        background-color: var(--color-bg);
        border-radius: 12px;
        border: 1px solid rgba(187, 168, 154, 0.8);
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.5rem;
        box-shadow: var(--shadow-soft);
        min-width: 11rem;
        display: none;
    }

    .site-nav__list.is-open {
        display: flex;
    }

    .nav-toggle {
        /* display: inline-flex; */
        display: block;
    }

    .hero__layout {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 600px) {
    .founder-card__header {
        align-items: flex-start;
    }

    .founder-card__avatar {
        width: 52px;
        height: 52px;
    }
}

@media (min-width: 769px) {
    .hero__layout {
        grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.1fr);
        align-items: center;
    }

    .new-to-rpgs {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
        align-items: flex-start;
    }

    .feature-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ==========================
   Home layout refinements
   ========================== */

/* Centered hero */
.hero--centered .hero__content {
    max-width: 40rem;
    margin: 0 auto;
    text-align: center;
}

.hero--centered .hero__content h1 {
    font-family: var(--font-heading-display);
    font-weight: 600;
}

.hero--centered .hero__lead {
    color: var(--color-neutral-700);
    margin-bottom: 0.75rem;
}

.hero__actions {
    justify-content: center;
}

/* Hero badges (small pills) */
.hero__badges {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.7rem;
    border-radius: var(--radius-pill);
    background-color: var(--color-surface-alt);
    border: 1px solid var(--color-border-soft);
    font-size: 0.8rem;
    color: var(--color-neutral-700);
}

/* Text-style link button next to primary CTA */
.btn-link {
    font-size: 0.9rem;
    color: var(--color-primary-strong);
    text-decoration: underline;
    text-underline-offset: 0.15em;
    padding: 0.6rem 0.8rem;
}

/* Split section (two-column block) */
.section--split .split {
    display: grid;
    gap: 1.5rem;
}

.split__main p {
    color: var(--color-neutral-700);
}

.split__link a {
    font-size: 0.9rem;
}

.split__card {
    align-self: flex-start;
}

/* Safety + language strip */
.section--strip {
    background-color: var(--color-surface-alt);
    border-top: 1px solid var(--color-border-soft);
    border-bottom: 1px solid var(--color-border-soft);
}

.strip {
    display: grid;
    gap: 1.5rem;
    align-items: center;
}

.strip__text p {
    color: var(--color-neutral-700);
}

.strip__meta {
    font-size: 0.9rem;
}

.strip__link a {
    font-size: 0.9rem;
}

.strip__cta-text {
    font-size: 0.95rem;
    color: var(--color-neutral-700);
    margin-bottom: 0.75rem;
}

/* Responsive tweaks for new layouts */
@media (min-width: 769px) {
    .section--split .split {
        grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
        align-items: flex-start;
    }

    .strip {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1.1fr);
    }
}