/* ==========================================================================
   Trailblazers — main styles
   ========================================================================== */
:root {
    --cream:    #f4efe3;
    --cream-2:  #ece4d2;
    --paper:    #faf7ef;
    --char:     #2e2c26;
    --char-2:   #54514a;
    --olive:    #6d7153;
    --olive-d:  #52573c;
    --rust:     #b14a32;
    --rust-d:   #8f3a27;
    --sand:     #ddd2ba;
    --serif:    'Playfair Display', Georgia, 'Times New Roman', serif;
    --sans:     'Inter', -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--cream);
    color: var(--char);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
}

/* Faint topographic overlay across the whole site */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: .5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420' viewBox='0 0 420 420'%3E%3Cg fill='none' stroke='%236d7153' stroke-opacity='0.12' stroke-width='1.2'%3E%3Cpath d='M-20 300 Q80 240 170 290 T360 270 T520 300'/%3E%3Cpath d='M-20 340 Q90 280 180 330 T370 310 T520 340'/%3E%3Cpath d='M-20 80 Q90 30 190 80 T380 60 T520 90'/%3E%3Cpath d='M-20 120 Q100 70 200 120 T390 100 T520 130'/%3E%3Cpath d='M-20 160 Q110 110 210 160 T400 140 T520 170'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

img { max-width: 100%; display: block; }
a { color: var(--rust); text-decoration: none; }
a:hover { color: var(--rust-d); }

h1, h2, h3, h4 {
    font-family: var(--serif);
    line-height: 1.15;
    margin: 0 0 .5em;
}

.tb-container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.tb-section { padding: 72px 0; position: relative; }
.tb-eyebrow {
    text-transform: uppercase;
    letter-spacing: .25em;
    font-size: 12px;
    color: var(--olive);
    font-weight: 600;
}

/* Torn paper edge divider (cream-colored jagged strip over photo sections) */
.torn {
    height: 26px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='26' preserveAspectRatio='none' viewBox='0 0 120 26'%3E%3Cpath d='M0 26 L0 14 L9 17 L17 8 L28 15 L38 6 L50 14 L61 9 L73 16 L83 7 L94 14 L104 9 L114 15 L120 11 L120 26 Z' fill='%23f4efe3'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-size: 120px 26px;
}
.torn.flip { transform: scaleY(-1); }
.torn.dark {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='26' preserveAspectRatio='none' viewBox='0 0 120 26'%3E%3Cpath d='M0 26 L0 14 L9 17 L17 8 L28 15 L38 6 L50 14 L61 9 L73 16 L83 7 L94 14 L104 9 L114 15 L120 11 L120 26 Z' fill='%232e2c26'/%3E%3C/svg%3E");
}

/* ---------- Buttons ---------- */
.tb-btn {
    display: inline-block;
    background: var(--rust);
    color: #fff;
    border: 2px solid var(--rust);
    padding: 12px 28px;
    font-family: var(--sans);
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: 13px;
    cursor: pointer;
    transition: background .2s, transform .2s;
}
.tb-btn:hover { background: var(--rust-d); border-color: var(--rust-d); color: #fff; transform: translateY(-2px); }
.tb-btn.ghost { background: transparent; color: var(--char); border-color: var(--char); }
.tb-btn.ghost:hover { background: var(--char); color: var(--cream); }

/* ---------- Header ---------- */
.tb-header {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 32px;
    background: rgba(244, 239, 227, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--sand);
}
.tb-logo {
    font-family: var(--serif);
    font-weight: 900;
    font-size: 20px;
    letter-spacing: .14em;
    color: var(--char);
}
.tb-logo-mark { color: var(--rust); }
.tb-nav ul { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.tb-nav a { color: var(--char-2); font-weight: 500; font-size: 14px; letter-spacing: .05em; text-transform: uppercase; }
.tb-nav a:hover { color: var(--rust); }
.tb-nav-toggle { display: none; background: none; border: 0; font-size: 22px; cursor: pointer; }

/* ---------- Hero ---------- */
.tb-hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: flex-end;
    color: #fff;
    overflow: hidden;
}
.tb-hero img, .tb-hero .tb-hero-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tb-hero-inner { position: relative; padding: 80px 0; }
.tb-hero h1 {
    font-size: clamp(48px, 9vw, 110px);
    font-weight: 900;
    letter-spacing: .04em;
    color: #fdf9ef;
    text-shadow: 0 2px 30px rgba(0,0,0,.35);
    margin: 0;
}
.tb-hero p { max-width: 560px; font-size: 17px; color: rgba(255,255,255,.9); }

/* ---------- Filter bar ---------- */
.tb-filterbar {
    background: var(--paper);
    border: 1px solid var(--sand);
    padding: 18px 22px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    box-shadow: 0 10px 30px rgba(46,44,38,.08);
}
.tb-filterbar select, .tb-filterbar input[type="search"], .tb-filterbar input[type="text"] {
    font-family: var(--sans);
    padding: 11px 14px;
    border: 1px solid var(--sand);
    background: var(--cream);
    color: var(--char);
    min-width: 160px;
}

/* ---------- Trail cards ---------- */
.tb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.tb-card {
    background: var(--paper);
    border: 1px solid var(--sand);
    overflow: hidden;
    transition: transform .25s, box-shadow .25s;
}
.tb-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(46,44,38,.12); }
.tb-card .tb-card-img { height: 200px; overflow: hidden; background: var(--olive); }
.tb-card .tb-card-img img { width: 100%; height: 100%; object-fit: cover; }
.tb-card-body { padding: 20px 22px 24px; }
.tb-card-body h3 { font-size: 22px; }
.tb-card-body h3 a { color: var(--char); border-bottom: 2px dotted transparent; }
.tb-card-body h3 a:hover { color: var(--rust); border-bottom-color: var(--rust); }
.tb-stats { display: flex; gap: 16px; font-size: 13px; color: var(--char-2); text-transform: uppercase; letter-spacing: .06em; }
.tb-stats strong { color: var(--olive-d); }

/* ---------- Dotted trail connector ---------- */
.tb-trail-map { position: relative; }
.tb-trail-map::before {
    content: "";
    position: absolute;
    left: 50%; top: 0; bottom: 0;
    border-left: 3px dotted var(--rust);
    opacity: .7;
}
.tb-trail-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    padding: 36px 0;
    position: relative;
}
.tb-trail-row:nth-child(even) .tb-trail-media { order: 2; }

/* ---------- Timeline (single trail, about) ---------- */
.tb-timeline { position: relative; margin: 0 auto; max-width: 900px; padding: 20px 0; }
.tb-timeline::before {
    content: "";
    position: absolute;
    left: 50%; top: 0; bottom: 0;
    border-left: 3px dotted var(--rust);
}
.tb-tl-item { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; padding: 28px 0; }
.tb-tl-item .tb-tl-body { background: var(--paper); border: 1px solid var(--sand); padding: 22px 26px; }
.tb-tl-item:nth-child(odd) .tb-tl-body { grid-column: 1; text-align: right; }
.tb-tl-item:nth-child(even) .tb-tl-body { grid-column: 2; }

/* ---------- Checklist ---------- */
.tb-checklist { list-style: none; margin: 0; padding: 0; max-width: 640px; }
.tb-checklist li {
    padding: 12px 4px;
    border-bottom: 1px dashed var(--sand);
    display: flex; align-items: center; gap: 12px;
}
.tb-checklist input[type="checkbox"] { accent-color: var(--rust); width: 18px; height: 18px; }

/* ---------- Split layout (directory) ---------- */
.tb-split { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: start; }
.tb-sidebar { position: sticky; top: 90px; background: var(--paper); border: 1px solid var(--sand); padding: 26px; }
.tb-sidebar label { display: block; margin-bottom: 14px; font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.tb-sidebar input[type="text"], .tb-sidebar input[type="search"], .tb-sidebar select, .tb-sidebar input[type="range"] {
    width: 100%; padding: 10px 12px; border: 1px solid var(--sand); background: var(--cream); font-family: var(--sans);
}

/* ---------- Gear ---------- */
.tb-proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.tb-proscons ul { list-style: none; padding: 0; margin: 0; }
.tb-proscons li { padding: 10px 0 10px 30px; position: relative; border-bottom: 1px dashed var(--sand); }
.tb-pros li::before { content: "✓"; position: absolute; left: 0; color: var(--olive); font-weight: 700; }
.tb-cons li::before { content: "✕"; position: absolute; left: 0; color: var(--rust); font-weight: 700; }
.tb-verdict {
    background: var(--olive); color: #fdf9ef; padding: 34px 40px; border-radius: 4px;
    display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
}
.tb-scroll-x { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 14px; scroll-snap-type: x mandatory; }
.tb-scroll-x figure { flex: 0 0 240px; scroll-snap-align: start; margin: 0; }
.tb-scroll-x img { width: 100%; height: 180px; object-fit: cover; background: var(--sand); }

/* ---------- Gallery mosaic ---------- */
.tb-mosaic { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 160px; gap: 6px; }
.tb-mosaic img { width: 100%; height: 100%; object-fit: cover; }
.tb-mosaic .tall { grid-row: span 2; }
.tb-mosaic .wide { grid-column: span 2; }

/* ---------- Blog ---------- */
.tb-post-excerpt { border-bottom: 1px dashed var(--sand); padding: 28px 0; }
.tb-post-excerpt h2 { font-size: 28px; }

/* ---------- About ---------- */
.tb-form { max-width: 560px; display: grid; gap: 16px; }
.tb-form input, .tb-form textarea, .tb-form select {
    width: 100%; padding: 13px 16px; border: 1px solid var(--sand); background: var(--paper);
    font-family: var(--sans); font-size: 15px; color: var(--char);
}
.tb-alert { background: rgba(109,113,83,.15); border-left: 4px solid var(--olive); padding: 14px 18px; margin-bottom: 20px; }

/* ---------- Footer ---------- */
.tb-footer { background: var(--char); color: #b9b4a6; padding: 56px 0 30px; margin-top: 40px; }
.tb-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.tb-footer h4 { color: #fdf9ef; letter-spacing: .1em; text-transform: uppercase; font-size: 14px; }
.tb-footer a { color: #b9b4a6; }
.tb-footer a:hover { color: #fff; }
.tb-footer ul { list-style: none; padding: 0; margin: 0; }
.tb-footer li { margin-bottom: 8px; }
.tb-copy { border-top: 1px solid #4a473f; margin-top: 40px; padding-top: 20px; text-align: center; font-size: 13px; }

/* ---------- Blog layout ---------- */
.tb-blog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; }
@media (max-width: 860px) { .tb-blog-layout { grid-template-columns: 1fr; } }
.tb-widget { border-bottom: 1px dashed var(--sand); padding: 14px 0; }
.tb-widget ul { list-style: none; padding: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .tb-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--sand); padding: 18px 32px; }
    .tb-nav.is-open { display: block; }
    .tb-nav ul { flex-direction: column; gap: 12px; }
    .tb-nav-toggle { display: block; }
    .tb-split, .tb-proscons, .tb-footer-grid { grid-template-columns: 1fr; }
    .tb-trail-row, .tb-tl-item { grid-template-columns: 1fr; gap: 20px; }
    .tb-trail-row:nth-child(even) .tb-trail-media { order: 0; }
    .tb-trail-map::before, .tb-timeline::before { left: 12px; }
    .tb-tl-item:nth-child(odd) .tb-tl-body { grid-column: 1; text-align: left; }
    .tb-tl-item:nth-child(even) .tb-tl-body { grid-column: 1; }
    .tb-mosaic { grid-template-columns: repeat(2, 1fr); }
}
