/* ==========================================================================
   Pennant Chase — Educator Resources
   Visual identity: a scorekeeper's book. Ledger-green paper, ink navy,
   scorer's red for the one accent, monospaced figures for anything numeric.
   © Bacci Media LLC
   ========================================================================== */

:root {
    --bg:          #e9efe6;
    --bg-deep:     #dde6da;
    --surface:     #fcfcf8;
    --text:        #12253c;
    --text-2:      #5f6b78;
    --rule:        #c8d6c6;
    --rule-strong: #a9bda7;
    --accent:      #b8382c;
    --accent-soft: #f3ded9;
    --shadow:      0 1px 0 rgba(18, 37, 60, .07), 0 8px 24px -18px rgba(18, 37, 60, .5);

    --font-display: "Big Shoulders Display", "Haettenschweiler", "Arial Narrow", sans-serif;
    --font-body:    "Source Serif 4", Georgia, "Times New Roman", serif;
    --font-mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

    --measure: 68ch;
    --gutter: clamp(1.15rem, 4vw, 3rem);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg:          #16211d;
        --bg-deep:     #101a17;
        --surface:     #1d2a25;
        --text:        #e7ece7;
        --text-2:      #a5b3a9;
        --rule:        #33453d;
        --rule-strong: #486055;
        --accent:      #e8705f;
        --accent-soft: #35211d;
        --shadow:      0 1px 0 rgba(0, 0, 0, .3), 0 10px 26px -18px #000;
    }
}

/* --------------------------------------------------------------- reset -- */

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

body {
    margin: 0;
    background-color: var(--bg);
    /* faint ledger ruling, the way a scorebook page is printed */
    background-image: linear-gradient(var(--rule) 1px, transparent 1px);
    background-size: 100% 2.25rem;
    color: var(--text);
    font-family: var(--font-body);
    font-size: clamp(1rem, .96rem + .2vw, 1.09rem);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a {
    color: var(--text);
    text-decoration-color: var(--accent);
    text-underline-offset: .18em;
    text-decoration-thickness: from-font;
}

a:hover { color: var(--accent); }

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

/* ---------------------------------------------------------------- type -- */

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 800;
    line-height: .95;
    letter-spacing: -.005em;
    margin: 0 0 .4em;
    text-wrap: balance;
}

h1 { font-size: clamp(2.9rem, 1.6rem + 6.4vw, 6.1rem); }
h2 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); }
h3 { font-size: clamp(1.35rem, 1.15rem + .9vw, 1.7rem); letter-spacing: .01em; }
h4 { font-size: 1.08rem; font-family: var(--font-body); font-weight: 700; letter-spacing: 0; line-height: 1.35; }

p, ul, ol { max-width: var(--measure); }
p { margin: 0 0 1.05em; }
li { margin-bottom: .45em; }

strong { font-weight: 700; }

.eyebrow {
    font-family: var(--font-mono);
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .19em;
    text-transform: uppercase;
    color: var(--text-2);
    margin: 0 0 1.1rem;
    display: flex;
    align-items: center;
    gap: .7rem;
}

.eyebrow::before {
    content: "";
    width: 1.9rem;
    height: 2px;
    background: var(--accent);
    flex: none;
}

.deck {
    font-size: clamp(1.12rem, 1rem + .55vw, 1.4rem);
    line-height: 1.5;
    color: var(--text-2);
    max-width: 46ch;
}

.lede { font-size: 1.1em; }

/* ------------------------------------------------------------- layout --- */

.wrap {
    max-width: 76rem;
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.band { padding-block: clamp(3.2rem, 7vw, 5.6rem); }
.band + .band { border-top: 1px solid var(--rule); }
.band--sunk { background: var(--bg-deep); }

.band-head { margin-bottom: clamp(1.8rem, 4vw, 2.8rem); }

.skip {
    position: absolute;
    left: -9999px;
    background: var(--accent);
    color: #fff;
    padding: .6rem 1rem;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 99; }

/* --------------------------------------------------------------- hero --- */

.masthead {
    border-bottom: 1px solid var(--rule);
    padding: 1.1rem 0;
    font-family: var(--font-mono);
    font-size: .74rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-2);
}

.masthead .wrap {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem 1.4rem;
    align-items: baseline;
    justify-content: space-between;
}

.masthead a { text-decoration: none; }
.masthead strong { color: var(--text); letter-spacing: .1em; }

.hero { padding-block: clamp(3rem, 8vw, 5.5rem) clamp(2rem, 4vw, 3rem); }
.hero h1 { margin-bottom: .5rem; }
.hero h1 em { font-style: normal; color: var(--accent); }

.hero-grid {
    display: grid;
    gap: clamp(1.5rem, 4vw, 3.5rem);
    grid-template-columns: 1fr;
    align-items: end;
}

@media (min-width: 62rem) {
    .hero-grid { grid-template-columns: 1.35fr 1fr; }
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
    margin-top: 1.6rem;
}

.btn {
    font-family: var(--font-mono);
    font-size: .78rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: .78rem 1.25rem;
    border: 1px solid var(--rule-strong);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    display: inline-block;
    transition: background-color .15s, color .15s, border-color .15s;
}

.btn:hover { border-color: var(--accent); color: var(--accent); }

.btn--solid {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.btn--solid:hover { background: var(--text); border-color: var(--text); color: #fff; }

/* ---------------------------------------------------- start a league --- */

.startbox {
    margin-top: 1.7rem;
    background: var(--surface);
    border: 1px solid var(--rule-strong);
    border-top: 4px solid var(--accent);
    padding: 1.1rem 1.2rem 1.15rem;
    box-shadow: var(--shadow);
    max-width: 34rem;
}

.start-label {
    font-family: var(--font-mono);
    font-size: .73rem;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: var(--text-2);
    margin: 0 0 .85rem;
    max-width: none;
    line-height: 1.4;
}

.sportpick {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--rule-strong);
    border: 1px solid var(--rule-strong);
}

.sportpick a {
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    text-align: center;
    padding: .85rem .4rem;
    font-family: var(--font-display);
    font-size: 1.22rem;
    font-weight: 800;
    letter-spacing: .01em;
    line-height: 1;
    transition: background-color .15s, color .15s;
}

.sportpick--one { grid-template-columns: 1fr; }

.sportpick a:hover,
.sportpick a:focus-visible {
    background: var(--accent);
    color: #fff;
}

.start-note {
    margin: .9rem 0 0;
    font-size: .88rem;
    color: var(--text-2);
    line-height: 1.45;
    max-width: none;
}

/* ------------------------------------------------------- draft board --- */
/* The signature: three picks on the board. Each slip is the entry point
   to one sport's activity, so the device carries the navigation. */

.board {
    display: grid;
    gap: .9rem;
    grid-template-columns: 1fr;
    margin-top: clamp(2.4rem, 5vw, 3.6rem);
}

@media (min-width: 44rem) {
    .board { grid-template-columns: repeat(3, 1fr); }
}

.slip {
    position: relative;
    display: block;
    background: var(--surface);
    border: 1px solid var(--rule-strong);
    border-top: 4px solid var(--accent);
    padding: 1.15rem 1.15rem 1.3rem;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    transition: transform .18s ease, box-shadow .18s ease;
    animation: pick .5s cubic-bezier(.2, .8, .3, 1) backwards;
}

.slip:nth-child(1) { animation-delay: .05s; }
.slip:nth-child(2) { animation-delay: .18s; }
.slip:nth-child(3) { animation-delay: .31s; }

@keyframes pick {
    from { opacity: 0; transform: translateY(10px) rotate(-.6deg); }
    to   { opacity: 1; transform: none; }
}

.slip:hover {
    transform: translateY(-3px);
    box-shadow: 0 1px 0 rgba(18, 37, 60, .07), 0 16px 30px -20px rgba(18, 37, 60, .65);
    color: inherit;
}

.slip-no {
    font-family: var(--font-mono);
    font-size: .7rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--text-2);
    display: block;
    margin-bottom: .55rem;
}

.slip h3 { margin-bottom: .35rem; }
.slip h3 span { display: block; color: var(--accent); }

.slip p {
    margin: 0;
    font-size: .93rem;
    color: var(--text-2);
    line-height: 1.45;
}

.slip-go {
    font-family: var(--font-mono);
    font-size: .72rem;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--accent);
    margin-top: .95rem;
    display: block;
}

/* -------------------------------------------------------------- steps --- */

.steps {
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: none;
    display: grid;
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
}

@media (min-width: 52rem) {
    .steps { grid-template-columns: repeat(4, 1fr); }
}

.steps li {
    background: var(--surface);
    padding: 1.4rem 1.3rem 1.5rem;
    margin: 0;
}

.steps b {
    font-family: var(--font-mono);
    font-size: .74rem;
    letter-spacing: .14em;
    color: var(--accent);
    display: block;
    margin-bottom: .7rem;
}

.steps h4 { margin-bottom: .35rem; }
.steps p { margin: 0; font-size: .95rem; color: var(--text-2); }

/* ----------------------------------------------------------- activity --- */

.activity { border-top: 1px solid var(--rule); padding-block: clamp(2.6rem, 5vw, 4rem); }
.activity:first-of-type { border-top: 0; padding-top: 0; }

.activity-grid {
    display: grid;
    gap: clamp(1.4rem, 3.5vw, 3rem);
    grid-template-columns: 1fr;
}

@media (min-width: 58rem) {
    .activity-grid { grid-template-columns: 1fr 1.55fr; align-items: start; }
    .activity-side { position: sticky; top: 1.5rem; }
}

.sport-tag {
    font-family: var(--font-mono);
    font-size: .72rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent);
    display: block;
    margin-bottom: .5rem;
}

.facts {
    margin: 1.4rem 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--rule);
    max-width: 32rem;
}

.facts div {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: .55rem 0;
    border-bottom: 1px solid var(--rule);
    font-size: .9rem;
}

.facts dt {
    font-family: var(--font-mono);
    font-size: .71rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-2);
    padding-top: .18em;
}

.facts dd { margin: 0; text-align: right; }

.qbox {
    background: var(--surface);
    border: 1px solid var(--rule-strong);
    border-left: 4px solid var(--accent);
    padding: 1.2rem 1.35rem .4rem;
    margin: 1.5rem 0;
}

.qbox h4 {
    font-family: var(--font-mono);
    font-size: .73rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-2);
    margin-bottom: .8rem;
}

.qbox ul, .qbox ol { max-width: none; padding-left: 1.15rem; }
.qbox li { font-size: .97rem; }

.mono { font-family: var(--font-mono); font-size: .92em; }

.formula {
    font-family: var(--font-mono);
    font-size: .88rem;
    background: var(--surface);
    border: 1px solid var(--rule);
    padding: .85rem 1rem;
    overflow-x: auto;
    line-height: 1.5;
}

/* --------------------------------------------------------------- misc --- */

.cols {
    display: grid;
    gap: clamp(1.4rem, 3.5vw, 2.6rem);
    grid-template-columns: 1fr;
}

@media (min-width: 50rem) {
    .cols--2 { grid-template-columns: repeat(2, 1fr); }
    .cols--3 { grid-template-columns: repeat(3, 1fr); }
}

.note {
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    padding: 1.15rem 1.3rem;
    margin: 1.6rem 0;
}
.note p:last-child { margin-bottom: 0; }
.note strong { color: var(--accent); }

.card {
    background: var(--surface);
    border: 1px solid var(--rule-strong);
    padding: 1.3rem 1.4rem 1.4rem;
    box-shadow: var(--shadow);
}
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card h3 { margin-bottom: .55rem; }

.mail {
    font-family: var(--font-mono);
    font-size: .95em;
    color: var(--accent);
    word-break: break-word;
}

.faq { max-width: var(--measure); }
.faq h4 { margin-top: 1.8rem; margin-bottom: .3rem; }
.faq h4:first-child { margin-top: 0; }
.faq p { color: var(--text-2); }

.pagefoot {
    border-top: 1px solid var(--rule);
    padding-block: 2.4rem 3rem;
    font-family: var(--font-mono);
    font-size: .74rem;
    letter-spacing: .08em;
    color: var(--text-2);
    text-transform: uppercase;
}

.pagefoot .wrap { display: flex; flex-wrap: wrap; gap: .7rem 1.6rem; justify-content: space-between; }
.pagefoot a { text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

@media print {
    body { background: #fff; color: #000; font-size: 10.5pt; }
    .masthead, .cta-row, .slip-go, .pagefoot { display: none; }
    .band { padding-block: .6rem; }
    .slip, .card, .qbox, .note { box-shadow: none; break-inside: avoid; }
    a { text-decoration: none; color: #000; }
}
