/* Trout Creek Farm — warm paper, forest green, barn red. */
:root {
  --paper: #f7f1e3;
  --paper-2: #efe5cf;
  --card: #fffaf0;
  --line: #e2d5bb;
  --ink: #2b2622;
  --ink-2: #5b5044;
  --muted: #857560;
  --green: #2f4a3a;
  --green-2: #3f6450;
  --green-soft: #dfe8d6;
  --rust: #b5562f;
  --rust-soft: #f6dfd0;
  --gold: #c9973b;
  --radius: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 1px 2px rgb(60 40 10 / 6%), 0 8px 24px rgb(60 40 10 / 7%);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--rust); text-underline-offset: 2px; }
a:hover { color: #8f3f1f; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; color: var(--green); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }
h1 em, h2 em, .brand em { font-style: italic; color: var(--rust); font-weight: 500; }
p { margin: 0 0 1em; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(720px, 100% - 40px); }
.center { text-align: center; }
.right { text-align: right; }
.pad-lg { padding-block: 48px 64px; }
.pad-xl { padding-block: 96px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lead { font-size: 1.15rem; color: var(--ink-2); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--card); padding: 8px 12px; z-index: 10; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Header & footer */
.site-header, .admin-header { position: sticky; top: 0; z-index: 5; background: rgb(247 241 227 / 92%); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--green); font-family: var(--serif); font-size: 1.3rem; font-weight: 600; }
.site-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--rust); }
.site-footer { margin-top: 40px; background: var(--green); color: #e9e1cd; padding: 56px 0 24px; }
.site-footer .brand { color: #fffaf0; }
.site-footer h4 { color: #fffaf0; font-family: var(--sans); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.site-footer a { color: #f1c9a8; }
.site-footer .muted { color: #c4bca6; margin-top: 12px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.fineprint { margin-top: 40px; padding-top: 18px; border-top: 1px solid rgb(255 255 255 / 15%); font-size: .8rem; color: #b5ad97; }

/* Buttons, pills, flashes */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--green); background: var(--green); color: #fffaf0; padding: 11px 22px; border-radius: 999px; font: 600 .95rem/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: background .15s, transform .1s; }
.button:hover { background: var(--green-2); color: #fffaf0; }
.button:active { transform: translateY(1px); }
.button-ghost { background: transparent; color: var(--green); }
.button-ghost:hover { background: var(--green-soft); color: var(--green); }
.button-danger { background: transparent; color: var(--rust); border-color: var(--rust); }
.button-danger:hover { background: var(--rust-soft); color: #8f3f1f; }
.button-green { background: var(--green-soft); color: var(--green); border-color: var(--green-soft); }
.button-block { width: 100%; }
.button-sm { padding: 6px 13px; font-size: .82rem; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; letter-spacing: .01em; vertical-align: middle; }
.pill-green { background: var(--green-soft); color: var(--green); }
.pill-rust { background: var(--rust-soft); color: #8f3f1f; }
.pill-muted { background: var(--paper-2); color: var(--muted); }
.flash { border-radius: 10px; padding: 12px 16px; margin: 0 0 18px; font-size: .95rem; border: 1px solid; }
.flash-info { background: var(--green-soft); border-color: #c4d4b8; color: var(--green); }
.flash-error { background: var(--rust-soft); border-color: #ecc3a9; color: #7d3519; }
.flash-warn { background: #f8ecc9; border-color: #ead69b; color: #6b5114; }
.eyebrow, .kicker { font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.eyebrow.supper, .kicker.supper { color: var(--rust); }
.eyebrow.csa, .kicker.csa { color: var(--green-2); }

/* Hero */
.hero { padding: 56px 0 24px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.hero-art img { width: 100%; border-radius: 22px; box-shadow: var(--shadow); }
.strip { margin: 40px 0 8px; }
.strip-inner { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); }
.strip-inner div { padding: 22px 12px; text-align: center; }
.strip-inner div + div { border-left: 1px solid var(--line); }
.strip strong { display: block; font: 600 2rem/1 var(--serif); color: var(--rust); }
.strip span { font-size: .85rem; color: var(--muted); }

/* Sections */
.section { padding: 72px 0; }
.section-tint { background: var(--paper-2); }
.section-head { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: end; margin-bottom: 32px; }
.section-lead { color: var(--ink-2); margin: 0; }
.subhead { margin-top: 40px; }
.empty { border: 1px dashed var(--line); border-radius: var(--radius); padding: 28px; text-align: center; color: var(--muted); background: rgb(255 250 240 / 50%); }
.shares { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.share { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.share-price { font: 600 1.8rem/1 var(--serif); color: var(--rust); }
.share-price span { font: 400 .9rem var(--sans); color: var(--muted); }
.story, .visit { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.story-art img { border-radius: 22px; box-shadow: var(--shadow); }
.visit-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.visit-card dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0 0 20px; }
.visit-card dt { font-weight: 600; }
.visit-card dd { margin: 0; color: var(--ink-2); }
details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; margin-bottom: 10px; }
details summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; }
details summary::after { content: "+"; float: right; color: var(--rust); font-size: 1.2rem; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { color: var(--ink-2); }

/* Event cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.event-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.event-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgb(60 40 10 / 8%), 0 16px 36px rgb(60 40 10 / 12%); color: inherit; }
.event-card-cover { aspect-ratio: 16 / 9; background: var(--paper-2) center / cover no-repeat; position: relative; }
.event-card-cover .date-badge { position: absolute; left: 14px; top: 14px; }
.event-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.event-card h3 { margin-bottom: 4px; }
.event-card .meta { color: var(--ink-2); font-size: .92rem; margin-bottom: 8px; }
.event-card .summary { color: var(--muted); font-size: .92rem; }
.card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); }
.price { font-weight: 700; color: var(--green); }
.date-badge { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 54px; height: 58px; background: var(--card); border-radius: 10px; box-shadow: 0 2px 8px rgb(60 40 10 / 15%); flex: none; overflow: hidden; }
.date-badge .m { font-size: .66rem; font-weight: 700; letter-spacing: .1em; color: #fffaf0; background: var(--rust); width: 100%; text-align: center; padding: 2px 0; }
.date-badge .d { font: 600 1.5rem/1.2 var(--serif); color: var(--ink); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.tab { padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); background: var(--card); font-weight: 500; font-size: .92rem; }
.tab[aria-current] { background: var(--green); border-color: var(--green); color: #fffaf0; }

/* Event page */
.event-page { padding: 28px 0 64px; }
.event-cover { aspect-ratio: 21 / 8; border-radius: 22px; background: var(--paper-2) center / cover no-repeat; box-shadow: var(--shadow); margin-bottom: 36px; }
.event-layout { display: grid; grid-template-columns: 1fr 380px; gap: 48px; align-items: start; }
.facts { list-style: none; padding: 0; margin: 24px 0 32px; display: grid; gap: 16px; }
.facts li { display: flex; gap: 16px; align-items: center; }
.icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 10px; background: var(--card); border: 1px solid var(--line); color: var(--green); flex: none; }
.prose { max-width: 68ch; }
.prose h2 { font-size: 1.5rem; margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 4px; }
.event-side { position: sticky; top: 92px; }
.register-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }
.register-head { display: flex; align-items: baseline; gap: 6px; margin-bottom: 8px; }
.price-big { font: 600 2rem/1 var(--serif); color: var(--green); }
.register-card > .pill { margin-bottom: 18px; }
.stack { display: grid; gap: 14px; }
label { display: grid; gap: 5px; font-size: .9rem; font-weight: 600; color: var(--ink-2); }
input[type=text], input[type=email], input[type=url], input[type=number], input[type=datetime-local], select, textarea {
  font: 400 1rem/1.4 var(--sans); color: var(--ink); background: #fff; border: 1px solid #d7c8aa; border-radius: 10px; padding: 10px 12px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green-2); box-shadow: 0 0 0 3px rgb(63 100 80 / 18%); }
textarea { resize: vertical; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Ticket (manage registration) */
.ticket { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 36px; box-shadow: var(--shadow); position: relative; margin-bottom: 18px; }
.ticket-status { position: absolute; top: 24px; right: 24px; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; }
.ticket-confirmed .ticket-status { background: var(--green-soft); color: var(--green); }
.ticket-waitlisted .ticket-status { background: #f8ecc9; color: #6b5114; }
.ticket-cancelled .ticket-status { background: var(--paper-2); color: var(--muted); }
.ticket-event { display: flex; gap: 16px; align-items: center; padding: 18px; background: var(--paper); border-radius: 12px; margin: 22px 0; }
.ticket-event a { color: var(--green); text-decoration: none; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0 0 24px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; }
.ticket-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.ticket-actions form { margin: 0; }

/* Admin */
body.admin { background: #f4efe4; }
.admin-header { background: rgb(255 250 240 / 94%); }
.who { display: flex; gap: 14px; align-items: center; font-size: .9rem; }
.admin-main { padding: 32px 0 80px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { font-size: 2.1rem; margin-bottom: 4px; }
.page-head p { margin: 0 0 4px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 32px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.stat-n { display: block; font: 600 1.9rem/1.1 var(--serif); color: var(--green); }
.stat-of { font-size: 1.1rem; color: var(--muted); }
.stat-l { font-size: .85rem; color: var(--muted); }
.admin-grid { display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: start; }
.admin-grid.two { grid-template-columns: 1fr 1fr; margin: 36px 0 24px; }
.admin h2 { font-size: 1.4rem; margin-top: 8px; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 24px; font-size: .93rem; }
.table th { text-align: left; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--paper); padding: 10px 14px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 14px; border-bottom: 1px solid #efe6d3; vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table a { color: var(--green); text-decoration: none; }
.table .eyebrow { font-size: .66rem; }
.table td.actions { white-space: nowrap; }
.reg-cancelled td { color: var(--muted); }
.inline { display: inline; margin: 0 0 0 4px; }
.seats { min-width: 150px; }
.meter { display: inline-block; width: 80px; height: 7px; background: var(--paper-2); border-radius: 99px; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.meter-bar { height: 100%; background: var(--green-2); }
.warn { color: var(--rust); font-weight: 600; }
.feed { list-style: none; padding: 0; margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.feed li { padding: 12px 16px; border-bottom: 1px solid #efe6d3; font-size: .92rem; }
.feed li:last-child { border-bottom: 0; }
.feed a { color: var(--green); }
.past { margin-top: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.event-form { max-width: 820px; }
fieldset { border: 1px solid var(--line); background: var(--card); border-radius: 14px; padding: 22px 24px 8px; margin: 0 0 22px; display: grid; gap: 14px; }
legend { font: 600 1.05rem var(--serif); color: var(--green); padding: 0 8px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.row label.narrow { max-width: 110px; }
.form-actions { display: flex; gap: 12px; }
fieldset p.small { margin: -6px 0 6px; }

@media (max-width: 900px) {
  .hero-inner, .section-head, .story, .visit, .event-layout, .admin-grid, .admin-grid.two, .footer-inner { grid-template-columns: 1fr; }
  .shares { grid-template-columns: 1fr; }
  .strip-inner { grid-template-columns: repeat(2, 1fr); }
  .strip-inner div:nth-child(3) { border-left: 0; }
  .event-side { position: static; }
  .event-cover { aspect-ratio: 16 / 9; }
  .site-nav { gap: 14px; font-size: .92rem; }
  .table { display: block; overflow-x: auto; }
}
@media (max-width: 640px) {
  .header-inner { flex-direction: column; align-items: flex-start; padding: 12px 0; gap: 8px; min-height: 0; }
  .ticket { padding: 24px; }
  .ticket-status { position: static; display: inline-block; margin-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
