/* ============================================================
   Texas Feed Fat Co. — public site
   Heritage Texas branded-iron aesthetic.
   Cream paper, saddle brown, single red spark.
   ============================================================ */

:root {
    /* ---- Brand palette (matches app.texasfeedfat.com tokens) ---- */
    --red:          #ce3e2e;
    --red-hover:    #b33526;
    --red-soft:     #fef4f3;
    --brand:        #846d57;   /* logo brown */
    --brand-dark:   #5f3100;
    --brand-deep:   #1e0e00;
    --cream:        #f5f0ea;
    --paper:        #fdf9f5;
    --paper-edge:   #e8ddd3;
    --ink:          #2d1800;
    --ink-muted:    #7a6550;
    --gold:         #c79117;   /* used very sparingly */

    /* Legacy variable names kept to avoid template churn ---- */
    --c-primary:        var(--brand-dark);
    --c-primary-dark:   var(--brand-deep);
    --c-primary-light:  var(--brand);
    --c-accent:         var(--red);
    --c-accent-soft:    var(--red-soft);
    --c-bg:             var(--cream);
    --c-surface:        #ffffff;
    --c-ink:            var(--ink);
    --c-muted:          var(--ink-muted);
    --c-rule:           var(--paper-edge);
    --c-error-bg:       #fef4f3;
    --c-error-text:     #7a1e12;
    --c-success-bg:     #f0faf5;
    --c-success-text:   #1a4a30;

    --shadow-card:  0 1px 3px rgba(45, 24, 0, 0.07), 0 12px 28px -16px rgba(45, 24, 0, 0.18);
    --shadow-elev:  0 6px 14px rgba(45, 24, 0, 0.10), 0 24px 52px -22px rgba(45, 24, 0, 0.32);
    --radius:       4px;

    --display:  'DM Serif Display', 'Lora', Georgia, serif;
    --serif:    'Lora', Georgia, 'Times New Roman', serif;
    --sans:     'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; }

main { flex: 1 0 auto; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--sans);
    font-weight: 400;
    line-height: 1.65;
    color: var(--ink);
    background: var(--cream);
    /* Subtle paper grain across the whole site */
    background-image:
        radial-gradient(rgba(95, 49, 0, 0.025) 1px, transparent 1px),
        radial-gradient(rgba(95, 49, 0, 0.018) 1px, transparent 1px);
    background-size: 24px 24px, 13px 13px;
    background-position: 0 0, 12px 7px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--red); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--red-hover); }

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--serif);
    color: var(--brand-dark);
    font-weight: 700;
    line-height: 1.18;
    margin: 0 0 .55em;
    letter-spacing: -0.005em;
}
h1 { font-size: clamp(2.2rem, 3.4vw, 3rem); }
h2 { font-size: clamp(1.7rem, 2.4vw, 2.25rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1.1em; }

::selection { background: var(--red); color: #fff; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.6rem;
}
.container--narrow { max-width: 780px; }

/* Eyebrow used in many places */
.eyebrow, .hero__eyebrow {
    display: inline-block;
    color: var(--red);
    font-family: var(--sans);
    font-weight: 700;
    letter-spacing: .28em;
    text-transform: uppercase;
    font-size: .72rem;
    margin-bottom: .9rem;
}

/* ─── Admin bar (shown to logged-in users on public pages) ─── */
.admin-bar {
    background: #1e0e00;
    color: #d4b896;
    font-family: var(--sans);
    font-size: .82rem;
    border-bottom: 2px solid var(--red);
}
.admin-bar__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: .35rem 1.6rem;
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-wrap: wrap;
}
.admin-bar a {
    color: #d4b896;
    padding: .35rem .7rem;
    border-radius: 3px;
    text-decoration: none;
    font-weight: 500;
    letter-spacing: .02em;
    transition: background .15s ease, color .15s ease;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}
.admin-bar a:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-bar__title { font-weight: 700; }
.admin-bar__title:hover { color: var(--red) !important; background: rgba(255,255,255,.06); }
.admin-bar__spacer { flex: 1; }
.admin-bar__profile {
    background: rgba(255,255,255,.05);
    border-radius: 999px;
    padding: .25rem .8rem .25rem .25rem !important;
}
.admin-bar__avatar {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-size: .68rem;
    font-weight: 700;
}
.admin-bar__signout:hover { background: var(--red) !important; color: #fff !important; }

/* ─── Locations bar (below the main nav) ────────────────────── */
.locations-bar {
    background: var(--brand-deep);
    color: #d9c3a8;
    font-size: .82rem;
    letter-spacing: .03em;
    border-bottom: 1px solid rgba(0, 0, 0, 0.4);
}
.locations-bar__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: .5rem 1.6rem;
    display: flex;
    align-items: center;
    gap: .65rem;
    flex-wrap: wrap;
}
.locations-bar__label {
    font-family: var(--sans);
    font-weight: 700;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: .24em;
    font-size: .68rem;
    margin-right: .4rem;
}
.locations-bar a { color: #d9c3a8; padding: .15rem .2rem; }
.locations-bar a:hover { color: #fff; }
.locations-bar .sep { color: #6b4e2c; margin: 0 .3rem; }

/* ─── Site header ─────────────────────────────────────────────── */
.site-header {
    background: var(--paper);
    border-bottom: 1px solid var(--paper-edge);
    position: sticky;
    top: 0;
    z-index: 30;
    box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.6rem;
    max-width: 1200px;
    margin: 0 auto;
}
.brand {
    display: flex;
    align-items: center;
    gap: .85rem;
    color: var(--brand-dark);
    font-family: var(--serif);
    font-weight: 700;
    letter-spacing: .005em;
    font-size: 1.4rem;
    line-height: 1;
}
.brand:hover { color: var(--brand-dark); }
.brand__mark {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.brand__mark img { width: 100%; height: 100%; object-fit: contain; }
.brand__name {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.brand__sub {
    color: var(--ink-muted);
    font-family: var(--sans);
    font-weight: 600;
    font-size: .62rem;
    letter-spacing: .28em;
    text-transform: uppercase;
}

.nav { display: flex; align-items: center; gap: .15rem; }
.nav a {
    padding: .6rem .95rem;
    font-family: var(--sans);
    font-weight: 600;
    color: var(--brand-deep);
    border-radius: var(--radius);
    font-size: .92rem;
    letter-spacing: .01em;
    position: relative;
}
.nav a:hover { color: var(--red); }
.nav a.active { color: var(--red); }
.nav a.active::after {
    content: "";
    position: absolute;
    left: 50%; transform: translateX(-50%);
    bottom: -2px;
    width: 18px; height: 2px;
    background: var(--red);
}
.nav__cta {
    margin-left: .75rem;
    background: var(--red);
    color: #fff !important;
    padding: .65rem 1.2rem !important;
    border-radius: 3px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    font-size: .8rem !important;
    box-shadow: 0 6px 14px -6px rgba(206, 62, 46, 0.5);
    transition: background .15s ease, transform .12s ease, box-shadow .15s ease;
}
.nav__cta:hover { background: var(--red-hover); color: #fff !important; transform: translateY(-1px); }
.nav__cta::after { display: none !important; }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--paper-edge);
    border-radius: var(--radius);
    padding: .45rem .75rem;
    cursor: pointer;
    color: var(--brand-deep);
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* ─── Hero ────────────────────────────────────────────────────── */
.hero {
    position: relative;
    background: var(--cream);
    padding: 6rem 0 5rem;
    overflow: hidden;
    isolation: isolate;
    border-bottom: 1px solid var(--paper-edge);
}
/* Giant brand-mark watermark in the corner */
.hero::before {
    content: "";
    position: absolute;
    top: -90px; right: -90px;
    width: 520px; height: 520px;
    background: url('../img/tff-logo.png') no-repeat center / contain;
    opacity: 0.06;
    z-index: -1;
    transform: rotate(-8deg);
    filter: sepia(1) saturate(0.6);
}
/* Crosshatch paper texture */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(45deg, transparent 0 36px, rgba(95,49,0,0.018) 36px 37px);
    pointer-events: none;
    z-index: -1;
}
.hero__inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 4rem;
    align-items: center;
}
@media (max-width: 900px) {
    .hero__inner { grid-template-columns: 1fr; gap: 2.5rem; }
}
.hero h1 {
    font-family: var(--display);
    color: var(--brand-deep);
    font-size: clamp(2.6rem, 5.2vw, 4.2rem);
    line-height: 1.05;
    margin: 0 0 1.2rem;
    max-width: 18ch;
    letter-spacing: -0.015em;
    font-weight: 400;
}
.hero h1 em {
    font-style: italic;
    color: var(--red);
}
.hero p.lead {
    color: var(--ink);
    font-size: 1.15rem;
    max-width: 56ch;
    margin-bottom: 2rem;
    line-height: 1.65;
}
.hero__actions { display: flex; gap: .9rem; flex-wrap: wrap; align-items: center; }

/* Hero visual: stamped notecard / certificate feel */
.hero__visual {
    position: relative;
    aspect-ratio: 4/5;
    background: var(--paper);
    border: 1px solid var(--paper-edge);
    border-radius: 2px;
    box-shadow:
        0 1px 0 #fff inset,
        0 6px 16px -8px rgba(45,24,0,.18),
        0 28px 50px -22px rgba(45,24,0,.3);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: hidden;
    transform: rotate(1.5deg);
}
.hero__visual::before {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(132, 109, 87, 0.4);
    pointer-events: none;
}
.hero__visual::after {
    content: "";
    position: absolute;
    inset: 22px;
    border: 1px dashed rgba(132, 109, 87, 0.25);
    pointer-events: none;
}
.hero__visual-inner {
    text-align: center;
    z-index: 1;
}
.hero__visual-inner img {
    width: 60%;
    margin: 0 auto 1.2rem;
    filter: sepia(0.2);
}
.hero__visual-title {
    font-family: var(--display);
    font-size: 1.8rem;
    color: var(--brand-dark);
    line-height: 1.1;
    margin-bottom: .35rem;
}
.hero__visual-sub {
    font-family: var(--sans);
    color: var(--ink-muted);
    font-size: .75rem;
    letter-spacing: .26em;
    text-transform: uppercase;
}
.hero__visual-stamp {
    position: absolute;
    bottom: 1.4rem;
    right: 1.4rem;
    width: 76px; height: 76px;
    border: 3px solid var(--red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transform: rotate(-15deg);
    color: var(--red);
    font-family: var(--sans);
    font-weight: 800;
    font-size: .58rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    line-height: 1.15;
    opacity: 0.85;
}

/* ─── Buttons ─────────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: .85rem 1.6rem;
    border-radius: 3px;
    font-family: var(--sans);
    font-weight: 700;
    font-size: .82rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
    text-align: center;
    line-height: 1.2;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
    box-shadow: 0 6px 14px -6px rgba(206, 62, 46, 0.45);
}
.btn--primary:hover { background: var(--red-hover); border-color: var(--red-hover); color: #fff; transform: translateY(-1px); box-shadow: 0 10px 20px -8px rgba(206, 62, 46, 0.55); }
.btn--ghost {
    background: transparent;
    border-color: var(--brand-dark);
    color: var(--brand-dark);
}
.btn--ghost:hover { background: var(--brand-dark); color: #fff; border-color: var(--brand-dark); }
.btn--ink {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
    color: #fff;
}
.btn--ink:hover { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }
.btn--outline {
    background: transparent;
    border-color: var(--brand-dark);
    color: var(--brand-dark);
}
.btn--outline:hover { background: var(--brand-dark); color: #fff; }
.btn--link {
    background: transparent;
    border-color: transparent;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: .14em;
    padding: .65rem .25rem;
}
.btn--link:hover { color: var(--red-hover); text-decoration: underline; text-underline-offset: 4px; }

/* ─── Sections ────────────────────────────────────────────────── */
.section { padding: 5.5rem 0; position: relative; }
.section--alt {
    background: var(--paper);
    border-top: 1px solid var(--paper-edge);
    border-bottom: 1px solid var(--paper-edge);
}
.section--ink {
    background: var(--brand-deep);
    color: #d4b896;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.section--ink::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(45deg, transparent 0 28px, rgba(255,255,255,0.03) 28px 29px);
    pointer-events: none;
    z-index: -1;
}
.section--ink::after {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 520px; height: 520px;
    background: url('../img/tff-logo.png') no-repeat center / contain;
    opacity: 0.05;
    z-index: -1;
    filter: invert(0.4) sepia(1) saturate(0.4);
}
.section--ink h2 { color: #fff; font-family: var(--display); font-weight: 400; }
.section--ink p { color: #d4b896; }

.section-head {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 3.2rem;
}
.section-head h2 {
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(2rem, 3.4vw, 2.8rem);
    color: var(--brand-deep);
}
.section-head h2 em { font-style: italic; color: var(--red); }
.section-head p { color: var(--ink-muted); font-size: 1.05rem; margin: 0; }
.section-head .divider {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    margin: 1rem 0 .6rem;
    color: var(--brand);
}
.section-head .divider::before,
.section-head .divider::after {
    content: "";
    width: 30px; height: 1px;
    background: var(--brand);
}

/* ─── Card grid ───────────────────────────────────────────────── */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) {
    .grid--3, .grid--2 { grid-template-columns: 1fr; }
}

.card {
    background: var(--paper);
    border-radius: var(--radius);
    padding: 2rem 1.8rem;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--paper-edge);
    position: relative;
    transition: transform .15s ease, box-shadow .15s ease;
}
.card::before {
    content: "";
    position: absolute;
    top: -1px; left: -1px; right: -1px;
    height: 3px;
    background: var(--red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-elev); }
.card:hover::before { transform: scaleX(1); }
.card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--cream);
    color: var(--red);
    margin-bottom: 1.2rem;
    border: 1.5px solid var(--paper-edge);
}
.card__icon svg { width: 26px; height: 26px; }
.card__numeral {
    display: inline-block;
    font-family: var(--display);
    font-size: 2.4rem;
    line-height: 1;
    color: var(--red);
    margin-bottom: .6rem;
}
.card h3 {
    font-family: var(--serif);
    font-size: 1.25rem;
    margin-bottom: .55rem;
    color: var(--brand-deep);
}
.card p { color: var(--ink-muted); margin-bottom: 0; line-height: 1.6; }

/* ─── Stat strip (Texas almanac style) ───────────────────────── */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    padding: 0;
    border-radius: var(--radius);
    background: var(--brand-deep);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border-top: 3px solid var(--red);
}
.stats__item {
    text-align: center;
    padding: 2rem 1.4rem;
    color: #d4b896;
    border-right: 1px solid rgba(255,255,255,0.07);
}
.stats__item:last-child { border-right: none; }
.stats__num {
    display: block;
    font-family: var(--display);
    font-size: 2.8rem;
    color: #fff;
    font-weight: 400;
    line-height: 1;
    margin-bottom: .35rem;
    letter-spacing: -0.02em;
}
.stats__label {
    color: #a8927a;
    font-family: var(--sans);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .22em;
    font-weight: 600;
}
@media (max-width: 720px) {
    .stats { grid-template-columns: repeat(2, 1fr); }
    .stats__item:nth-child(odd) { border-right: 1px solid rgba(255,255,255,0.07); }
    .stats__item:nth-child(2) { border-right: none; }
    .stats__item:nth-child(1), .stats__item:nth-child(2) {
        border-bottom: 1px solid rgba(255,255,255,0.07);
    }
}

/* ─── Split (two-column feature) ─────────────────────────────── */
.split {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 4rem;
    align-items: center;
}
.split--reverse > :first-child { order: 2; }
@media (max-width: 900px) {
    .split { grid-template-columns: 1fr; gap: 2.5rem; }
    .split--reverse > :first-child { order: 0; }
}
.split h2 {
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(1.9rem, 3vw, 2.6rem);
    color: var(--brand-deep);
}
.split h2 em { font-style: italic; color: var(--red); }
.split__visual {
    position: relative;
    aspect-ratio: 4/5;
    background: var(--paper);
    border: 1px solid var(--paper-edge);
    border-radius: 2px;
    box-shadow:
        0 1px 0 #fff inset,
        0 6px 16px -8px rgba(45,24,0,.15),
        0 24px 46px -22px rgba(45,24,0,.28);
    overflow: hidden;
    transform: rotate(-1.2deg);
    isolation: isolate;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.split__visual::before {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(132, 109, 87, 0.35);
    pointer-events: none;
}
.split__visual img {
    width: 65%;
    margin: auto;
    filter: sepia(0.2);
    z-index: 1;
}
/* Photo variant: image fills the framed card, badge + meta sit on top */
.split__visual--photo {
    padding: 0;
    background: var(--brand-deep);
}
.split__visual--photo::before { inset: 10px; border-color: rgba(255,255,255,0.45); }
.split__visual--photo .split__visual-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
    filter: none;
    z-index: 0;
}
.split__visual--photo .badge {
    position: absolute;
    top: 1.2rem;
    left: 1.2rem;
    z-index: 2;
}
.split__visual--photo .meta {
    position: absolute;
    bottom: 1rem;
    left: 0;
    right: 0;
    color: #f5f0e6;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    z-index: 2;
    padding: .35rem .75rem;
    background: linear-gradient(0deg, rgba(30,14,0,0.75) 0%, rgba(30,14,0,0) 100%);
    padding-top: 2.5rem;
    margin: 0;
}
/* Landscape variant — use natural ratio for wide photos */
.split__visual--landscape { aspect-ratio: 3/2; }

/* "Giving back" art — FFA/4-H logo + certified facility badge */
.giving-back-art {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--paper);
    border: 1px solid var(--paper-edge);
    border-radius: 3px;
    aspect-ratio: 4/3;
    padding: 2rem;
    box-shadow:
        0 1px 0 #fff inset,
        0 6px 16px -8px rgba(45,24,0,.15),
        0 24px 46px -22px rgba(45,24,0,.28);
    transform: rotate(1deg);
    overflow: hidden;
}
.giving-back-art::before {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(132, 109, 87, 0.4);
    pointer-events: none;
}
.giving-back-art::after {
    content: "";
    position: absolute;
    inset: 22px;
    border: 1px dashed rgba(132, 109, 87, 0.25);
    pointer-events: none;
}
.giving-back-art__logo {
    max-width: 72%;
    height: auto;
    z-index: 1;
}
.giving-back-art__badge {
    position: absolute;
    bottom: 1.4rem;
    right: 1.4rem;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    z-index: 2;
}
.split__visual .badge {
    align-self: flex-start;
    background: var(--red);
    color: #fff;
    padding: .35rem 1rem;
    border-radius: 2px;
    font-family: var(--sans);
    font-weight: 700;
    font-size: .68rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    z-index: 1;
}
.split__visual .meta {
    color: var(--ink-muted);
    font-family: var(--sans);
    font-size: .7rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    text-align: center;
    z-index: 1;
}
.split ul.checks { list-style: none; padding: 0; margin: 1.2rem 0 1.8rem; }
.split ul.checks li {
    padding: .55rem 0 .55rem 2rem;
    position: relative;
    color: var(--ink);
    border-bottom: 1px solid var(--paper-edge);
    font-size: 1rem;
}
.split ul.checks li:last-child { border-bottom: none; }
.split ul.checks li::before {
    content: "";
    position: absolute;
    left: 6px; top: 50%; transform: translateY(-50%);
    background: var(--red);
    width: 8px; height: 8px;
    border-radius: 50%;
}

/* ─── News cards ─────────────────────────────────────────────── */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.8rem;
}
.news-card { max-width: 420px; }
.news-grid { justify-content: center; }
.news-card {
    background: var(--paper);
    border-radius: 3px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--paper-edge);
    display: flex;
    flex-direction: column;
    transition: transform .15s ease, box-shadow .15s ease;
    position: relative;
}
.news-card::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-elev); }
.news-card:hover::after { transform: scaleX(1); }

.news-card__media {
    aspect-ratio: 16/10;
    background: var(--brand-deep);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.news-card__media::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        url('../img/tff-logo.png') no-repeat center / 50%,
        repeating-linear-gradient(45deg, transparent 0 18px, rgba(255,255,255,0.04) 18px 19px);
    opacity: 0.85;
    filter: brightness(0.6) sepia(1);
}
.news-card__media::after {
    content: "";
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(212, 184, 150, 0.25);
    pointer-events: none;
}
.news-card__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}
.news-card__media:has(img)::before,
.news-card__media:has(img)::after { display: none; }
.article__hero {
    margin: 0 0 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--paper-edge);
    background: var(--brand-deep);
    aspect-ratio: 16 / 9;
}
.article__hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-card__media .label {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: var(--red);
    color: #fff;
    padding: .25rem .8rem;
    font-family: var(--sans);
    font-weight: 700;
    font-size: .65rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    z-index: 2;
}
.news-card__body { padding: 1.7rem 1.6rem 1.5rem; flex: 1; display: flex; flex-direction: column; }
.news-card__date {
    color: var(--ink-muted);
    font-family: var(--sans);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .2em;
    margin-bottom: .65rem;
    font-weight: 600;
}
.news-card h3 {
    font-family: var(--serif);
    font-size: 1.35rem;
    line-height: 1.25;
    margin-bottom: .6rem;
}
.news-card h3 a { color: var(--brand-deep); }
.news-card h3 a:hover { color: var(--red); }
.news-card p { color: var(--ink-muted); margin-bottom: 1.2rem; flex: 1; line-height: 1.6; font-size: .96rem; }
.news-card__more {
    font-family: var(--sans);
    font-weight: 700;
    color: var(--red);
    letter-spacing: .14em;
    text-transform: uppercase;
    font-size: .76rem;
}
.news-card__more::after { content: " →"; }

/* ─── Article detail ─────────────────────────────────────────── */
.article {
    background: var(--paper);
    border-radius: 3px;
    padding: 3.5rem 3.2rem;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--paper-edge);
    position: relative;
}
.article::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--red) 0%, var(--brand-dark) 100%);
}
.article__meta {
    color: var(--ink-muted);
    font-family: var(--sans);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .2em;
    margin-bottom: .8rem;
    font-weight: 600;
}
.article h1 {
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(2rem, 3.6vw, 2.8rem);
    line-height: 1.15;
    margin-bottom: 1rem;
    color: var(--brand-deep);
}
.article__excerpt {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.25rem;
    color: var(--brand-dark);
    border-left: 3px solid var(--red);
    padding-left: 1.4rem;
    margin: 1.8rem 0 2.5rem;
    line-height: 1.55;
}
.article__body { font-size: 1.05rem; line-height: 1.75; color: var(--ink); }
.article__body p { margin-bottom: 1.3em; }
.article__body h2, .article__body h3 {
    margin-top: 2em;
    font-family: var(--serif);
    color: var(--brand-deep);
}
.article__body h2 { font-size: 1.6rem; }
.article__body h3 { font-size: 1.3rem; }
.article__body img { border-radius: 2px; margin: 1.8em 0; }
.article__body ul, .article__body ol { padding-left: 1.4rem; margin-bottom: 1.3em; }
.article__body li { margin-bottom: .5em; }
.article__body a { color: var(--red); border-bottom: 1px solid currentColor; }
.article__body a:hover { color: var(--red-hover); }
.article__back {
    display: inline-block;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--paper-edge);
    font-family: var(--sans);
    font-weight: 700;
    color: var(--red);
    letter-spacing: .14em;
    text-transform: uppercase;
    font-size: .76rem;
}
.article__back::before { content: "← "; }
@media (max-width: 640px) {
    .article { padding: 2rem 1.5rem; }
}

/* ─── Forms ──────────────────────────────────────────────────── */
.form {
    background: var(--paper);
    border-radius: 3px;
    padding: 2.5rem;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--paper-edge);
    position: relative;
}
.form::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 4px;
    height: 60px;
    background: var(--red);
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 640px) { .form__row { grid-template-columns: 1fr; } }
.form .input { margin-bottom: 1.4rem; }
.form label {
    display: block;
    font-family: var(--sans);
    font-weight: 600;
    color: var(--brand-dark);
    margin-bottom: .4rem;
    font-size: .78rem;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form input[type="number"],
.form input[type="password"],
.form input[type="datetime-local"],
.form select,
.form textarea {
    width: 100%;
    padding: .8rem .95rem;
    border: 1.5px solid var(--paper-edge);
    border-radius: 3px;
    font-family: var(--sans);
    font-size: .98rem;
    background: #fff;
    color: var(--ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form textarea { min-height: 180px; resize: none; line-height: 1.55; }
.form input:focus, .form select:focus, .form textarea:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(206, 62, 46, 0.12);
}
.form input[type="checkbox"] { margin-right: .4rem; }
.error-message {
    color: var(--c-error-text);
    font-family: var(--sans);
    font-size: .82rem;
    margin-top: .35rem;
    font-weight: 500;
}
.input.error input,
.input.error select,
.input.error textarea { border-color: var(--c-error-text); }

/* ─── Flash messages ─────────────────────────────────────────── */
.message {
    padding: 1rem 1.2rem;
    border-radius: 3px;
    border-left: 4px solid;
    margin-bottom: 1.2rem;
    cursor: pointer;
    font-family: var(--sans);
}
.message.hidden { display: none; }
.message.success { background: var(--c-success-bg); color: var(--c-success-text); border-color: #2d7a4f; }
.message.error   { background: var(--c-error-bg);   color: var(--c-error-text);   border-color: var(--red); }
.message.warning { background: #fffbf0; color: #7a4a00; border-color: #d97706; }
.message.info, .message.default { background: #f0f6ff; color: #1e3a5f; border-color: #3b82f6; }

/* ─── Contact layout ─────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 2rem; } }

.location-card {
    background: var(--paper);
    border-radius: 3px;
    padding: 1.6rem 1.5rem;
    border: 1px solid var(--paper-edge);
    box-shadow: var(--shadow-card);
    margin-bottom: 1.2rem;
    position: relative;
}
.location-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: var(--red);
}
.location-card h4 {
    color: var(--red);
    font-family: var(--sans);
    font-size: .68rem;
    letter-spacing: .26em;
    text-transform: uppercase;
    margin: 0 0 .5rem;
    font-weight: 700;
}
.location-card .place {
    font-family: var(--serif);
    font-size: 1.3rem;
    color: var(--brand-deep);
    font-weight: 700;
    margin-bottom: .35rem;
}
.location-card p { margin: 0; color: var(--ink-muted); font-size: .95rem; }
.location-card a { color: var(--red); font-weight: 600; }
.location-card__office { margin: .55rem 0 0; font-size: .95rem; color: var(--ink); }
.location-card__office strong { color: var(--brand-deep); }
.location-card__contacts {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    font-size: .9rem;
}
.location-card__contacts li {
    padding: .55rem 0;
    border-top: 1px solid var(--paper-edge);
}
.location-card__contacts .role {
    display: block;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .2em;
    color: var(--ink-muted);
    font-weight: 700;
    margin-bottom: 2px;
}
.location-card__contacts .name {
    display: block;
    font-weight: 600;
    color: var(--brand-deep);
}
.location-card__contacts .line {
    display: block;
    color: var(--red);
    font-size: .9rem;
    word-break: break-word;
}
.location-card__contacts .line-label {
    color: var(--ink-muted);
    font-weight: 600;
    font-size: .78rem;
    margin-right: 2px;
}

/* ─── Page header (sub-page hero) ────────────────────────────── */
.page-head {
    background: var(--brand-deep);
    color: #d4b896;
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-bottom: 4px solid var(--red);
}
.page-head::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(45deg, transparent 0 28px, rgba(255,255,255,0.025) 28px 29px);
    pointer-events: none;
    z-index: -1;
}
.page-head::after {
    content: "";
    position: absolute;
    top: -120px; right: -120px;
    width: 460px; height: 460px;
    background: url('../img/tff-logo.png') no-repeat center / contain;
    opacity: 0.08;
    z-index: -1;
    filter: invert(0.4) sepia(1) saturate(0.4);
}
.page-head .eyebrow { color: var(--red); margin-bottom: .8rem; }
.page-head h1 {
    color: #fff;
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(2.2rem, 4.4vw, 3.4rem);
    margin: 0 0 .6rem;
    line-height: 1.1;
    max-width: 22ch;
}
.page-head h1 em { font-style: italic; color: var(--red); }
.page-head p { color: #d4b896; max-width: 62ch; margin: 0; font-size: 1.1rem; line-height: 1.6; }

/* ─── Site footer ────────────────────────────────────────────── */
.site-footer {
    background: #000000;
    color: #c8b49a;
    padding: 4.5rem 0 0;
    border-top: 4px solid var(--red);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.site-footer__band {
    background: var(--brand-deep);
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 1.5rem;
}
.site-footer h4 {
    color: #fff;
    font-family: var(--sans);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .26em;
    margin-bottom: 1.1rem;
    font-weight: 700;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 2.5rem;
    margin-bottom: 2rem;
    align-items: start;
}
.footer-cert-col { justify-self: end; text-align: right; }
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-cert-col { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid a { color: #c8b49a; display: block; padding: .2rem 0; font-size: .95rem; }
.footer-grid a:hover { color: var(--red); }
.footer-grid p { color: #a8927a; margin: 0 0 .8em; font-size: .92rem; line-height: 1.6; }
.footer-brand {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin-bottom: 1rem;
}
.footer-brand .brand__mark { width: 52px; height: 52px; }
.footer-brand .brand__mark img { filter: brightness(1.15) sepia(0.4); }
.footer-brand strong { color: #fff; font-family: var(--serif); font-size: 1.2rem; font-weight: 700; }
.footer-bottom {
    padding: 1.25rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: .82rem;
    color: #a8927a;
    letter-spacing: .04em;
}
.footer-cert-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}
.footer-cert {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 143px;
    height: 143px;
    background: #000;
    border-radius: 6px;
    padding: 10px;
    flex-shrink: 0;
    transition: transform .15s ease;
}
.footer-cert:hover { transform: translateY(-2px); }
.footer-cert img { width: 100%; height: 100%; object-fit: contain; display: block; }
@media (max-width: 720px) {
    .footer-bottom { justify-content: center; text-align: center; }
    .footer-bottom__copy { align-items: center; }
}

/* ─── Responsive nav ─────────────────────────────────────────── */
@media (max-width: 860px) {
    .nav-toggle { display: inline-flex; align-items: center; gap: .35rem; }
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--paper);
        border-bottom: 1px solid var(--paper-edge);
        padding: .5rem 1.5rem 1.2rem;
        box-shadow: 0 14px 22px -16px rgba(45,24,0,0.25);
    }
    .nav.open { display: flex; }
    .nav a { padding: .85rem .25rem; border-radius: 0; border-bottom: 1px solid var(--paper-edge); }
    .nav a:last-child { border-bottom: none; }
    .nav a.active::after { display: none; }
    .nav__cta {
        margin-top: .9rem;
        margin-left: 0;
        text-align: center;
    }
    .site-header__inner { position: relative; }
}

/* ─── Utilities ──────────────────────────────────────────────── */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: .8rem; }
.mt-2 { margin-top: 1.6rem; }
.mt-3 { margin-top: 2.4rem; }
.muted { color: var(--ink-muted); }

/* ─── Pagination on listing ──────────────────────────────────── */
.paginator { margin-top: 2.5rem; }
.pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: .4rem;
    flex-wrap: wrap;
}
.pagination li { display: inline-block; }
.pagination a, .pagination span {
    display: inline-block;
    padding: .5rem .9rem;
    color: var(--brand-dark);
    border: 1.5px solid var(--paper-edge);
    border-radius: 3px;
    font-family: var(--sans);
    font-size: .85rem;
    font-weight: 600;
    background: var(--paper);
    transition: all .15s ease;
}
.pagination a:hover { border-color: var(--red); color: var(--red); }
.pagination .active a, .pagination .active span { background: var(--red); color: #fff; border-color: var(--red); }
.pagination .disabled span { color: #b6a896; }

/* ─── Quote/testimonial ──────────────────────────────────────── */
.testimonial {
    text-align: center;
    max-width: 780px;
    margin: 0 auto;
}
.testimonial__quote {
    font-family: var(--display);
    font-size: clamp(1.6rem, 2.6vw, 2.1rem);
    line-height: 1.35;
    color: var(--brand-deep);
    font-style: italic;
    position: relative;
    margin-bottom: 1.5rem;
}
.testimonial__quote::before {
    content: "“";
    display: block;
    font-size: 5rem;
    line-height: 0;
    color: var(--red);
    margin-bottom: 1.5rem;
    font-style: normal;
}
.testimonial__attr {
    font-family: var(--sans);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .22em;
    color: var(--ink-muted);
    font-weight: 600;
}

/* Contact form thank-you page */
.thanks-card {
    background: var(--paper);
    border-radius: 3px;
    padding: 3rem 2.5rem;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--paper-edge);
    position: relative;
    text-align: center;
}
.thanks-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 4px;
    height: 60px;
    background: var(--red);
}
.thanks-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 78px; height: 78px;
    border-radius: 50%;
    background: rgba(206, 62, 46, 0.08);
    color: var(--red);
    margin-bottom: 1.4rem;
}
.thanks-card h2 {
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    margin-bottom: 1rem;
    color: var(--brand-deep);
}
.thanks-card h2 em { color: var(--red); font-style: italic; }
.thanks-card p { color: var(--ink-muted); max-width: 56ch; margin: 0 auto 1.8rem; font-size: 1.05rem; }
.thanks-card__actions {
    display: flex;
    gap: .8rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Crossfading rotator. Slides stack absolute; .is-active fades in. */
.testimonial-rotator {
    position: relative;
    max-width: 780px;
    margin: 0 auto;
    min-height: 220px;
}
.testimonial-rotator__slide {
    position: absolute;
    inset: 0;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .8s ease, visibility 0s linear .8s;
}
.testimonial-rotator__slide.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity .8s ease, visibility 0s;
}
.section--ink .testimonial-rotator .testimonial__attr { color: #a8927a; }

/* Social links — Facebook chip in footer + on Contact page */
.footer-social, .contact-social {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
  font-weight: 600;
}
.footer-social { color: #fff; }
.footer-social:hover { color: var(--red); }
.contact-social { color: var(--red); }
.contact-social:hover { color: var(--red-hover); text-decoration: underline; }

/* ─── Location card contact blocks (used on /locations + /about) ── */
.location-grid-card { scroll-margin-top: 100px; }
.location-grid-card h3 a { color: inherit; }
.location-address { color: var(--ink); margin-bottom: .8rem; }
.location-office-phone { margin-bottom: .6rem; }
.location-contact-list {
    list-style: none;
    padding: 0;
    margin: .8rem 0 0;
    font-size: .92rem;
}
.location-contact-list > li {
    padding: .45rem 0;
    border-top: 1px solid var(--paper-edge);
}
.location-contact-role {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .18em;
    color: var(--ink-muted);
    font-weight: 700;
}
.location-contact-name { font-weight: 600; color: var(--brand-deep); }
.location-contact-link { display: block; color: var(--red); font-size: .9rem; }
.location-contact-link--email { word-break: break-all; }
.location-contact-phone-label {
    color: var(--ink-muted);
    font-weight: 600;
    font-size: .78rem;
}

/* ─── Location detail page (per-office) ────────────────────────── */
.location-tagline { color: var(--ink-muted); font-size: 1.05rem; }
.location-contact-row { margin: .5rem 0 0; }
.location-contact-row--cell { margin: .25rem 0 0; }

/* ─── Sitemap page ─────────────────────────────────────────────── */
.sitemap-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.sitemap-list li { padding: .4rem 0; border-bottom: 1px solid var(--paper-edge); }
.sitemap-list li:last-child { border-bottom: none; }
.sitemap-list .muted { font-size: .85rem; margin-left: .5rem; }

/* ─── Layout & page utilities (one-offs replacing inline styles) ── */
.flash-wrap { padding-top: 1.5rem; }
.footer-email { color: #fff; font-weight: 600; }
.footer-email-row { margin-top: 1rem; }
.footer-chip-row { margin-top: .6rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.contact-chip-row { margin-top: .6rem; }
.error-actions { margin-top: 2rem; }
.home-intro { padding-top: 4rem; }
.home-cta-lead { max-width: 56ch; margin: 0 auto 2rem; }
.about-pullquote {
    font-size: 1.18rem;
    color: var(--ink);
    line-height: 1.7;
    font-family: var(--serif);
    font-style: italic;
}
.news-page-head-lead { max-width: none; white-space: nowrap; }
.news-empty-card { max-width: 600px; margin: 0 auto; padding: 3rem 2rem; }
