@font-face { font-family: "Advercase"; src: url("fonts/AdvercaseFont-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Advercase"; src: url("fonts/AdvercaseFont-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

/* Second Rodeo palette: saddle, desert, denim, dust */
:root {
  --saddle: #231105;
  --desert: #ffc305;
  --desert-deep: #e3a600;
  --denim: #284547;
  --denim-deep: #1c3335;
  --dust: #eae5d6;
  --dust-deep: #e2dccb;

  --bg: var(--dust);
  --surface: #f2eee3;
  --surface-2: var(--dust-deep);
  --ink: var(--saddle);
  --ink-2: #4a3526;
  --ink-3: #6f5e50;
  --line: rgba(35, 17, 5, .16);
  --accent: var(--desert);        /* fills only: gold text on dust is unreadable */
  --accent-ink: var(--saddle);
  --accent-text: var(--denim);    /* accent colour for text and rules */
  --shadow: 0 1px 2px rgba(35, 17, 5, .10), 0 6px 20px rgba(35, 17, 5, .14);
  --radius: 5px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --serif: "Advercase", "Times New Roman", Georgia, serif;
  --sans: "Hanken Grotesk", "Neue Haas Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); }
button, input, select { font: inherit; color: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
kbd { font: 500 11px var(--sans); padding: 1px 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink-3); background: var(--surface); }
[hidden] { display: none !important; }

/* Header */
.top { background: var(--bg); }
.filters { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); padding-top: 4px; }
.top-row { display: flex; align-items: center; gap: 16px; padding: 14px 24px 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; flex-shrink: 0; }
.brand-mark { width: 34px; height: 34px; background: url("brand/stamp-saddle-dog.png") center / contain no-repeat; }
.brand-name { font: 26px/1 var(--serif); letter-spacing: .02em; }
.brand-name em { font-style: normal; color: var(--accent-text); }
.search { flex: 1; max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 12px 0 14px; height: 42px; transition: border-color .15s, box-shadow .15s; }
.search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent); }
.search svg { color: var(--ink-3); flex-shrink: 0; }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; height: 100%; }
.top-actions { display: flex; gap: 8px; flex-shrink: 0; }
select { height: 38px; padding: 0 30px 0 12px; border-radius: 3px; border: 1px solid var(--line); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f5e50' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 14px; appearance: none; cursor: pointer; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 3px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .12s var(--ease), border-color .12s var(--ease); }
.btn:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.accent:hover { background: var(--desert-deep); border-color: var(--desert-deep); }

/* Intro */
.intro { position: relative; text-align: center; padding: 34px 24px 40px; overflow: hidden; }
.intro > * { position: relative; }
.intro-fan { display: flex; justify-content: center; height: 148px; margin: 4px auto 18px; }
.intro-fan img { width: 92px; height: 128px; object-fit: cover; border-radius: 3px; border: 4px solid var(--surface); box-shadow: var(--shadow); margin: 0 -14px; transform: rotate(var(--r)) translateY(var(--y)); transition: transform .3s cubic-bezier(.2, .7, .2, 1); cursor: pointer; animation: deal .6s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d); }
.intro-fan img:hover { transform: rotate(0deg) translateY(-10px) scale(1.06); z-index: 2; }
@keyframes deal { from { opacity: 0; transform: rotate(0deg) translateY(30px); } }
.intro-eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 0; font: 13px/1 var(--serif); letter-spacing: .15em; text-transform: uppercase; color: var(--accent-text); }
.intro-eyebrow .dot { width: 28px; height: 2px; background: var(--accent-text); }
.intro-eyebrow::after { content: ""; width: 28px; height: 2px; background: var(--accent-text); }
.intro h1 { margin: 0 auto 30px; font: 84px/1 var(--serif); letter-spacing: .01em; font-weight: 400; }
.intro h1 em { position: relative; z-index: 0; font-style: normal; color: var(--ink); white-space: nowrap; }
.intro h1 em::before { content: ""; position: absolute; z-index: -1; left: -.08em; right: -.08em; bottom: .06em; height: .38em; background: var(--accent); }
.squiggle { display: none; }
.intro-lede { margin: 0 auto 24px; max-width: 560px; font-size: 16.5px; color: var(--ink-2); }
.intro-steps { list-style: none; margin: 0 auto; padding: 0; display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.intro-steps li { display: flex; gap: 9px; align-items: center; padding: 10px 20px 10px 12px; font-size: 14px; font-weight: 500; color: var(--ink); }
.intro-steps li + li { border-left: 1px solid var(--line); }
.intro-steps li span { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 13px/1 var(--serif); display: grid; place-items: center; }
.intro-steps p { margin: 0; }
.intro-stuck { margin: 16px 0 0; font-size: 13.5px; color: var(--ink-3); }
.link-btn { border: 0; background: none; padding: 0; color: var(--accent-text); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.formats { display: flex; gap: 4px; padding: 0 24px; }
.formats button { position: relative; display: flex; align-items: center; gap: 7px; border: 0; background: none; padding: 10px 14px 12px; cursor: pointer; color: var(--ink-2); font-weight: 500; border-radius: 10px 10px 0 0; }
.formats button:hover { color: var(--ink); }
.formats button[aria-pressed="true"] { color: var(--ink); }
.formats button[aria-pressed="true"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 3px; background: var(--accent); border-radius: 0; }
.formats .count { font-size: 12px; color: var(--ink-3); font-weight: 400; }

.chips { display: flex; gap: 8px; padding: 10px 24px 14px; overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--line); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 13.5px; color: var(--ink-2); transition: background .15s, color .15s, border-color .15s; }
.chip:hover { color: var(--ink); border-color: var(--ink-3); }
.chip[aria-pressed="true"] { background: var(--denim); color: var(--dust); border-color: var(--denim); }
.chip .n { margin-left: 5px; opacity: .55; font-size: 12px; }
.chip:disabled { opacity: .4; cursor: default; }

/* Grid */
main { padding: 18px 24px 64px; }
.status { margin: 0 0 14px; color: var(--ink-3); font-size: 13px; }
.grid { columns: 5 230px; column-gap: 18px; }
.card { break-inside: avoid; margin-bottom: 22px; cursor: pointer; animation: rise .22s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.card-media { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.card-media img, .card-media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-media video { position: absolute; inset: 0; }
.card:hover .card-media { box-shadow: var(--shadow); }
.card:focus-visible { outline: none; }
.card:focus-visible .card-media { outline: 3px solid var(--denim); outline-offset: 3px; }
.badge { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 2px; background: var(--saddle); color: var(--dust); font-size: 12px; font-weight: 500; }
.badge svg { width: 13px; height: 13px; }
.badge.new { left: auto; right: 10px; background: var(--accent); color: var(--accent-ink); font: 11px/1 var(--serif); letter-spacing: .12em; text-transform: uppercase; }
.card-dl { position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--dust); color: var(--saddle); border: 0; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; cursor: pointer; }
.card:hover .card-dl, .card:focus-within .card-dl { opacity: 1; transform: none; }
.card-body { padding: 9px 4px 0; }
.card-title { margin: 0; font-size: 14.5px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-cats { margin: 3px 0 0; font-size: 12.5px; color: var(--ink-3); }
.empty { text-align: center; padding: 80px 0; color: var(--ink-2); }

/* Footer and terms */
.site-footer { position: relative; padding: 64px 24px 52px; text-align: center; background: var(--saddle); color: var(--dust); }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.footer-stamp { width: 132px; height: 132px; margin-bottom: 10px; }
.footer-brand { margin-bottom: 4px; color: var(--dust); }
.footer-brand .brand-mark { display: none; }
.footer-brand .brand-name { font-size: 22px; letter-spacing: .15em; text-transform: uppercase; }
.footer-brand .brand-name em { color: var(--desert); }
.footer-tagline { margin: 0; font: 40px/1.05 var(--serif); color: var(--dust); }
.footer-note { margin: 0; max-width: 460px; font-size: 13.5px; color: rgba(234, 229, 214, .7); }
.footer-links { display: flex; gap: 10px; align-items: center; margin-top: 16px; font-size: 13.5px; color: rgba(234, 229, 214, .5); }
.footer-links a { color: var(--saddle); background: var(--desert); font-weight: 600; text-decoration: none; padding: 8px 16px; border-radius: 2px; transition: background .12s var(--ease); }
.footer-links a:hover { background: var(--desert-deep); }
.terms { margin: 36px auto 0; max-width: 960px; text-align: left; color: var(--ink); background: var(--dust); border-radius: var(--radius); padding: 28px 32px 32px; scroll-margin-top: 130px; }
.terms:not([open]) { display: none; }
.terms summary { list-style: none; cursor: pointer; font: 36px/1 var(--serif); color: var(--ink); display: flex; justify-content: space-between; align-items: center; }
.terms summary::-webkit-details-marker { display: none; }
.terms summary::after { content: "Close"; font: 500 13px var(--sans); color: var(--ink-2); padding: 6px 12px; border: 1px solid var(--line); border-radius: 2px; }
.terms-body { margin-top: 6px; color: var(--ink-2); font-size: 14px; }
.terms-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 36px; margin-top: 20px; }
.terms-grid h3 { margin: 0 0 5px; font: 17px/1.2 var(--serif); letter-spacing: .02em; color: var(--ink); }
.terms-grid p { margin: 0; }
.terms-body a { color: var(--denim); }
.terms-date { margin: 0; color: var(--ink-3); font-size: 12.5px; }

/* Viewer */
.viewer { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 28px 84px; }
.viewer-backdrop { position: absolute; inset: 0; background: rgba(234, 229, 214, .96); animation: fade .2s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.viewer-panel { position: relative; display: grid; grid-template-columns: minmax(0, auto) 360px; max-width: 1200px; width: 100%; height: min(860px, 100%); background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); animation: pop .22s var(--ease); }
@keyframes pop { from { opacity: 0; transform: scale(.97); } }
.v-media { position: relative; background: var(--surface-2); display: grid; place-items: center; min-width: 0; overflow: hidden; }
.v-media > img, .v-media > video { max-width: 100%; max-height: 100%; width: auto; height: auto; display: block; }
.v-info { position: relative; padding: 28px 26px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; border-left: 1px solid var(--line); }
.v-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-2); display: grid; place-items: center; cursor: pointer; }
.v-format { font: 12px/1.2 var(--serif); text-transform: uppercase; letter-spacing: .15em; color: var(--accent-text); }
.v-info h2 { font: 36px/1.02 var(--serif); margin: 8px 40px 10px 0; letter-spacing: .01em; font-weight: 400; }
.v-desc { margin: 0 0 14px; color: var(--ink-2); }
.v-desc:empty { display: none; }
.v-group { margin: 6px 0 10px; }
.v-group h3 { margin: 0 0 7px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; }
.v-cats, .v-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.v-cats button, .v-tags button { border: 1px solid var(--line); background: var(--bg); border-radius: 2px; padding: 4px 11px; font-size: 13px; cursor: pointer; }
.v-cats button:hover, .v-tags button:hover { border-color: var(--ink-3); }
.v-tags button::before { content: "#"; color: var(--ink-3); }
.v-meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 8px 0 18px; font-size: 13px; padding-top: 14px; border-top: 1px solid var(--line); }
.v-meta dt { color: var(--ink-3); }
.v-meta dd { margin: 0; overflow-wrap: anywhere; }
.v-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.v-actions .btn { flex: 1 1 auto; }
.v-hint { margin: 14px 0 0; font-size: 12px; color: var(--ink-3); }
.v-nav { position: absolute; top: 50%; z-index: 2; width: 48px; height: 48px; margin-top: -24px; border-radius: 50%; border: 0; background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; place-items: center; cursor: pointer; }
.v-nav:hover { border-color: var(--ink-3); }
.v-nav:disabled { opacity: .35; cursor: default; }
.v-nav svg { width: 22px; height: 22px; }
.v-prev { left: 18px; }
.v-next { right: 18px; }

/* Linked (Instagram) ideas inside viewer */
.ig-cover { position: relative; display: grid; place-items: center; width: 100%; height: 100%; text-decoration: none; }
.ig-cover img { max-width: 100%; max-height: 100%; display: block; }
.ig-play { position: absolute; width: 72px; height: 72px; border-radius: 50%; background: var(--desert); color: var(--saddle); display: grid; place-items: center; box-shadow: var(--shadow); transition: transform .15s var(--ease); }
.ig-play svg { width: 28px; height: 28px; }
.ig-cover:hover .ig-play { transform: scale(1.08); }
.ig-note { position: absolute; bottom: 16px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--saddle); color: var(--dust); font-size: 12.5px; }
.ig-note svg { width: 14px; height: 14px; }

/* Carousel inside viewer */
.slides { position: absolute; inset: 0; overflow: hidden; touch-action: pan-y; }
.track { display: flex; height: 100%; transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.slide { flex: 0 0 100%; height: 100%; display: grid; place-items: center; }
.slide img, .slide video { max-width: 100%; max-height: 100%; display: block; }
.s-arrow { position: absolute; top: 50%; margin-top: -20px; width: 40px; height: 40px; border-radius: 50%; border: 0; box-shadow: var(--shadow); background: var(--dust); color: var(--saddle); display: grid; place-items: center; cursor: pointer; z-index: 2; }
.s-arrow:disabled { opacity: 0; pointer-events: none; }
.s-prev { left: 14px; }
.s-next { right: 14px; }
.s-count { position: absolute; top: 14px; right: 14px; z-index: 2; background: var(--saddle); color: var(--dust); font-size: 12px; padding: 3px 10px; border-radius: 999px; }
.dots { position: absolute; bottom: 16px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; z-index: 2; }
.dots button { width: 7px; height: 7px; padding: 0; border-radius: 50%; border: 0; background: rgba(35, 17, 5, .25); cursor: pointer; }
.dots button[aria-current="true"] { background: var(--ink); transform: scale(1.25); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--saddle); color: var(--dust); padding: 10px 18px; border-radius: 2px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Small screens */
@media (max-width: 900px) {
  .viewer { padding: 0; }
  .viewer-panel { grid-template-columns: 1fr; grid-template-rows: minmax(0, 62vh) auto; height: 100%; border-radius: 0; overflow-y: auto; }
  .v-info { border-left: 0; overflow: visible; }
  .v-nav { display: none; }
  .v-hint { display: none; }
}
@media (max-width: 700px) {
  .intro { padding: 22px 16px 30px; }
  .intro-fan { height: 112px; }
  .intro-fan img { width: 66px; height: 92px; margin: 0 -12px; border-width: 3px; }
  .intro h1 { font-size: 52px; }
  .footer-tagline { font-size: 30px; }
  .intro-lede { font-size: 15px; }
  .intro-steps { flex-direction: column; align-items: stretch; }
  .intro-steps li + li { border-left: 0; border-top: 1px solid var(--line); }
  .site-footer { padding: 40px 16px 32px; }
  .terms { padding: 20px 18px 24px; }
  .terms-grid { grid-template-columns: 1fr; gap: 16px; }
  .top-row { flex-wrap: wrap; padding: 12px 16px 8px; gap: 10px; }
  .search { order: 3; flex-basis: 100%; height: 40px; }
  .search kbd { display: none; }
  .top-actions { margin-left: auto; }
  #shuffle span { display: none; }
  #shuffle { width: 38px; padding: 0; }
  .formats { padding: 0 8px; overflow-x: auto; scrollbar-width: none; }
  .formats button { padding: 10px 10px 12px; flex-shrink: 0; }
  .chips { padding: 10px 16px 12px; }
  main { padding: 14px 16px 48px; }
  .grid { columns: 2; column-gap: 12px; }
  .card { margin-bottom: 16px; }
  .card-title { font-size: 13.5px; }
  .card-dl { opacity: 1; transform: none; width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
