/* Rexburg Paintball — static pages, no framework */

:root {
    --accent: #ff6a1a;
    --accent-ink: #16120e;
    --link: #c94a06;
    --ink: #1b1d22;
    --ink-soft: #4b4f58;
    --paper: #ffffff;
    --paper-alt: #f4f3f0;
    --line: #dddcd8;
    --hero-bg: #17191e;
    --hero-ink: #f4f3f0;
    --warn: #8f4a00;
    --warn-bg: #fff1e2;
    --radius: 10px;
    --wrap: 1080px;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --accent: #ff7f3a;
        --link: #ff9a5c;
        --ink: #ecebe8;
        --ink-soft: #b3b5bb;
        --paper: #121317;
        --paper-alt: #1a1c21;
        --line: #2e3138;
        --hero-bg: #0c0d10;
        --hero-ink: #ecebe8;
        --warn: #ffbf7a;
        --warn-bg: #2a1d10;
    }
}

:root[data-theme="dark"] {
    --accent: #ff7f3a;
    --link: #ff9a5c;
    --ink: #ecebe8;
    --ink-soft: #b3b5bb;
    --paper: #121317;
    --paper-alt: #1a1c21;
    --line: #2e3138;
    --hero-bg: #0c0d10;
    --hero-ink: #ecebe8;
    --warn: #ffbf7a;
    --warn-bg: #2a1d10;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif;
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
}

h1,
h2,
h3 {
    margin: 0 0 0.5em;
    font-family: "Oswald", "Arial Narrow", sans-serif;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.01em;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.4rem;
}

p {
    margin: 0 0 1em;
}

a {
    color: var(--link);
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

.wrap {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 24px;
}

/* Icons */

.icon-sprite {
    display: none;
}

.icon {
    flex-shrink: 0;
    width: 1.1em;
    height: 1.1em;
    vertical-align: -0.18em;
    color: inherit;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--hero-bg);
    color: var(--hero-ink);
    border-bottom: 3px solid var(--accent);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: "Oswald", "Arial Narrow", sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--hero-ink);
    text-decoration: none;
    white-space: nowrap;
}

.brand-icon {
    width: 1.4em;
    height: 1.4em;
    color: var(--accent);
}

.header-nav {
    display: flex;
    gap: 20px;
}

.header-nav a {
    font-weight: 700;
    white-space: nowrap;
    color: var(--hero-ink);
    text-decoration: none;
}

.header-nav a:hover {
    color: var(--accent);
}

/* Buttons */

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--radius);
    transition: transform 0.15s ease, filter 0.15s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    color: var(--accent-ink);
    background: var(--accent);
}

.button-primary:hover {
    filter: brightness(1.08);
}

.button-ghost {
    color: var(--hero-ink);
    border-color: var(--hero-ink);
}

.button-ghost-dark {
    color: var(--ink);
    border-color: var(--ink);
}

.button-outline {
    color: var(--ink);
    border-color: var(--line);
}

.button-outline:hover {
    border-color: var(--accent);
}

/* Hero */

.hero {
    padding: 72px 0 64px;
    color: var(--hero-ink);
    background:
        radial-gradient(circle at 85% 20%, rgba(255, 106, 26, 0.2), transparent 45%),
        var(--hero-bg);
}

/* Photo heroes darken the image enough to keep white text readable on any photo */
.hero-photo {
    background:
        linear-gradient(90deg, rgba(12, 13, 16, 0.92) 0%, rgba(12, 13, 16, 0.72) 55%, rgba(12, 13, 16, 0.45) 100%),
        var(--hero-image) center / cover no-repeat,
        var(--hero-bg);
}

.eyebrow {
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
}

.hero h1 {
    max-width: 14ch;
    font-size: 4rem;
    text-transform: uppercase;
}

.lede {
    max-width: 62ch;
    font-size: 1.2rem;
    color: var(--hero-ink);
    opacity: 0.94;
    text-wrap: pretty;
}

.hero-jump {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    /* Narrow enough to wrap 4 + 3 instead of leaving Ashton Hill alone on row two */
    max-width: 640px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.hero-jump a {
    display: inline-block;
    padding: 6px 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--hero-ink);
    text-decoration: none;
    background: rgba(12, 13, 16, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
}

.hero-jump a:hover {
    border-color: var(--accent);
}

.hero-jump span {
    color: var(--accent);
}

.breadcrumb {
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: var(--hero-ink);
    opacity: 0.85;
}

.breadcrumb a {
    color: var(--hero-ink);
}

.hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin: 8px 0 0;
    padding: 0;
    font-weight: 600;
    list-style: none;
}

.hero-facts li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero-facts .icon {
    color: var(--accent);
}

/* Fields list on the hub */

.fields {
    padding: 72px 0;
}

.section-intro {
    max-width: 70ch;
    color: var(--ink-soft);
}

.field-list {
    display: grid;
    gap: 20px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: field;
}

.field {
    position: relative;
    display: grid;
    overflow: hidden;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    counter-increment: field;
    scroll-margin-top: 80px;
}

.field.has-photo {
    grid-template-columns: 320px 1fr;
}

.field::before {
    content: counter(field);
    position: absolute;
    z-index: 1;
    top: 26px;
    left: 24px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    font-family: "Oswald", "Arial Narrow", sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-ink);
    background: var(--accent);
    border-radius: 50%;
}

.field.has-photo::before {
    top: 16px;
    left: 16px;
}

.field-media {
    display: block;
    min-height: 220px;
    background: var(--paper-alt);
}

.field-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.field-body {
    min-width: 0;
    padding: 28px 28px 24px 84px;
}

.field.has-photo .field-body {
    padding-left: 28px;
}

.field-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 16px;
    margin-bottom: 8px;
}

.field-head h3 {
    margin: 0;
}

.field-head h3 a {
    color: var(--ink);
    text-decoration: none;
}

.field-head h3 a:hover {
    color: var(--link);
    text-decoration: underline;
}

.field-distance {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-weight: 700;
    color: var(--link);
}

.field-warning,
.field-closed {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    color: var(--warn);
    background: var(--warn-bg);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
}

.field-warning .icon,
.field-closed .icon {
    margin-top: 0.3em;
}

.field-closed {
    margin-top: 24px;
}

.field-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin: 0 0 16px;
    padding: 0;
    font-size: 0.98rem;
    list-style: none;
    color: var(--ink-soft);
}

.field-facts li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.field-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 24px;
    margin: 0;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.field-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.field-links .field-guide {
    color: var(--ink);
    text-decoration: none;
    border-bottom: 2px solid var(--accent);
}

/* Rental link stays secondary to the field itself */
.field-links .field-rent {
    margin-left: auto;
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--ink-soft);
}

/* Seasons */

.seasons {
    padding: 64px 0;
    background: var(--paper-alt);
}

.season-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 24px;
}

.season {
    padding: 24px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.season p {
    margin: 0;
    color: var(--ink-soft);
}

/* Field care */

.care {
    padding: 64px 0;
    border-bottom: 1px solid var(--line);
}

.care-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 32px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.care-list li {
    position: relative;
    padding-left: 22px;
    color: var(--ink-soft);
}

/* Small accent square as the bullet */
.care-list li::before {
    content: "";
    position: absolute;
    top: 0.6em;
    left: 0;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 2px;
}

/* Local businesses */

.commercial {
    padding: 64px 0;
}

.business-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 24px;
}

.business {
    padding: 24px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.business h3 {
    margin-bottom: 2px;
}

.business h3 a {
    color: var(--ink);
}

.business-tag {
    margin-bottom: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--link);
}

.business p:last-child {
    margin: 0;
    color: var(--ink-soft);
}

.business-button {
    padding: 10px 18px;
    font-size: 0.95rem;
}

.business-feature {
    border-top: 6px solid var(--accent);
}

/* Group math */

.math {
    padding: 64px 0;
    background: var(--paper-alt);
}

.math-inner {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 48px;
    align-items: center;
}

.math-card {
    padding: 28px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-top: 6px solid var(--accent);
    border-radius: var(--radius);
}

.math-label {
    margin-bottom: 4px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-soft);
}

.math-figure {
    margin-bottom: 12px;
    font-family: "Oswald", "Arial Narrow", sans-serif;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.math-figure span {
    font-family: "Source Sans 3", Arial, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: var(--ink-soft);
}

.math-list {
    margin: 0 0 16px;
    padding-left: 1.1em;
    color: var(--ink-soft);
}

.math-total {
    padding-top: 12px;
    font-size: 1.2rem;
    border-top: 1px solid var(--line);
}

.math-total strong {
    color: var(--link);
}

.math-note {
    margin: 0;
    font-size: 0.95rem;
    color: var(--ink-soft);
}

/* Ask */

.ask {
    padding: 72px 0;
    color: var(--hero-ink);
    background: var(--hero-bg);
    border-top: 6px solid var(--accent);
}

.ask-inner p {
    max-width: 64ch;
}

.ask .button-ghost-dark {
    color: var(--hero-ink);
    border-color: var(--hero-ink);
}

/* Field pages */

.field-hero {
    padding: 56px 0 56px;
}

.field-hero.hero-photo {
    padding: 64px 0 96px;
}

.field-hero h1 {
    max-width: 20ch;
    font-size: 3.4rem;
}

.field-page {
    max-width: 820px;
    padding-top: 48px;
    padding-bottom: 64px;
}

.field-section {
    margin-bottom: 44px;
}

.field-section h2 {
    padding-bottom: 8px;
    font-size: 1.7rem;
    border-bottom: 3px solid var(--accent);
    display: inline-block;
}

.field-intro p:first-child {
    font-size: 1.25rem;
}

.field-section .field-warning {
    margin-bottom: 12px;
}

.lead-photo {
    margin: 28px 0 0;
}

.lead-photo img {
    width: 100%;
    border-radius: var(--radius);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.gallery figure {
    margin: 0;
}

.gallery-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
}

.gallery figcaption {
    margin-top: 6px;
    font-size: 0.92rem;
    line-height: 1.4;
    color: var(--ink-soft);
}

.photo-credit {
    margin-top: 12px;
    font-size: 0.9rem;
    color: var(--ink-soft);
}

.gps {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.field-section .field-links {
    padding-top: 0;
    border-top: 0;
}

.field-section .field-links .button {
    font-size: 1rem;
}

.rent-block {
    margin-bottom: 44px;
    padding: 24px 28px;
    background: var(--paper-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.rent-block h2 {
    font-size: 1.35rem;
}

.rent-block p {
    color: var(--ink-soft);
}

.rent-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    margin: 0;
}

.rent-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.nearby-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.nearby-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    color: var(--ink);
    text-decoration: none;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.nearby-card:hover {
    border-color: var(--accent);
}

.nearby-thumb {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.nearby-blank {
    display: grid;
    place-items: center;
    color: var(--ink-soft);
    background: var(--paper-alt);
}

.nearby-blank .icon {
    width: 2.4em;
    height: 2.4em;
}

.nearby-name {
    padding: 12px 14px 2px;
    font-family: "Oswald", "Arial Narrow", sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
}

.nearby-meta {
    padding: 0 14px 14px;
    font-size: 0.92rem;
    color: var(--ink-soft);
}

.back-link {
    font-weight: 700;
}

/* Footer */

.site-footer {
    padding: 32px 0;
    font-size: 0.95rem;
    color: var(--hero-ink);
    background: var(--hero-bg);
}

.site-footer p {
    margin: 0 0 8px;
    opacity: 0.85;
}

.site-footer a {
    color: var(--accent);
}

/* Captions: no single word left alone on the last line */
figcaption {
    text-wrap: pretty;
}

/* Gallery lightbox */
.lightbox-link {
    display: block;
    cursor: zoom-in;
}

.lightbox {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(8, 9, 12, 0.94);
    color: #f4f3f0;
}

.lightbox::backdrop {
    background: rgba(8, 9, 12, 0.6);
}

.lightbox[open] {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: calc(100vw - 140px);
    margin: 0;
}

.lightbox-img {
    max-width: 100%;
    max-height: calc(100vh - 120px);
    object-fit: contain;
    border-radius: 6px;
}

.lightbox-caption {
    max-width: 60ch;
    margin-top: 12px;
    font-size: 0.95rem;
    line-height: 1.4;
    text-align: center;
    color: #d6d5d1;
}

.lightbox-btn {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #f4f3f0;
    cursor: pointer;
}

.lightbox-btn:hover,
.lightbox-btn:focus-visible {
    background: var(--accent);
    color: var(--accent-ink);
}

.lightbox-btn .icon {
    width: 22px;
    height: 22px;
}

.lightbox-close {
    top: 16px;
    right: 16px;
}

.lightbox-prev {
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
}

.lightbox-next {
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
}

/* Media queries */

@media (max-width: 860px) {
    .math-inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .season-grid,
    .business-grid,
    .care-list {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .field.has-photo {
        grid-template-columns: 1fr;
    }

    .field-media {
        min-height: 0;
        aspect-ratio: 16 / 9;
    }

    .nearby-list {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .lightbox-figure {
        max-width: calc(100vw - 32px);
    }

    .lightbox-img {
        max-height: calc(100vh - 160px);
    }

    .lightbox-prev,
    .lightbox-next {
        top: auto;
        bottom: 16px;
        transform: none;
    }

    .lightbox-prev {
        left: calc(50% - 56px);
    }

    .lightbox-next {
        right: calc(50% - 56px);
    }
    body {
        font-size: 1.05rem;
    }

    .wrap {
        padding: 0 16px;
    }

    .hero {
        padding: 48px 0 44px;
    }

    .hero h1,
    .field-hero h1 {
        font-size: 2.4rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    .header-nav {
        gap: 14px;
        font-size: 0.95rem;
    }

    .brand {
        font-size: 1.1rem;
    }

    /* Only the first nav link fits beside the brand on a phone */
    .header-nav a + a {
        display: none;
    }

    .field-links .field-rent {
        margin-left: 0;
    }

    .button {
        justify-content: center;
        width: 100%;
    }

    .field-body {
        padding: 72px 18px 20px;
    }

    .field.has-photo .field-body {
        padding: 20px 18px;
    }

    .field::before {
        top: 20px;
        left: 18px;
    }

    .field.has-photo::before {
        top: 12px;
        left: 12px;
    }

    .gallery,
    .nearby-list {
        grid-template-columns: 1fr;
    }

    .rent-block {
        padding: 20px 18px;
    }
}
