/* Orange Cat Books - public site styles */

:root {
  --bg: #FBF6EE;
  --surface: #F3EADB;
  --surface-2: #EADBC4;
  --ink: #1E1A16;
  --muted: #6B5E50;
  --orange: #C8632B;
  --orange-ink: #FFFFFF;
  --teal: #2F5D62;
  --line: #E2D3BC;
  --logo-plate: transparent;
  --shadow: 0 2px 14px rgba(60, 40, 20, .08);
  --radius: 16px;
}

[data-theme="dark"] {
  --bg: #1A1612;
  --surface: #25201A;
  --surface-2: #302820;
  --ink: #F2E9DB;
  --muted: #B9A992;
  --orange: #E07B3E;
  --orange-ink: #1A1612;
  --teal: #7FB3B0;
  --line: #3A3027;
  --logo-plate: #F6EEDF;
  --shadow: 0 2px 14px rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Nunito Sans", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  transition: background .3s, color .3s;
  /* Keep the footer at the bottom of short pages */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
h1, h2, h3, h4 { font-family: Fraunces, Georgia, serif; line-height: 1.15; }
a { color: var(--orange); }
img { max-width: 100%; display: block; }
p + p { margin-top: .75em; }
/* Side padding only - shorthand here would wipe the vertical padding of <section class="wrap"> */
.wrap { max-width: 1150px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--bg); padding: 8px 12px; }

/* ─── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  background: var(--orange);
  color: var(--orange-ink);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  padding: 11px 22px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn.on-photo { background: rgba(255, 255, 255, .12); color: #fff; border: 1.5px solid rgba(255, 255, 255, .6); }
.btn.small { padding: 7px 14px; font-size: 15px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ─── Header ───────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.bar { display: flex; align-items: center; gap: 24px; height: 84px; }
.logo { display: flex; align-items: center; background: var(--logo-plate); border-radius: 12px; padding: 4px 10px; flex-shrink: 0; }
.logo img { height: 64px; width: auto; }
.logo .logo-dark { display: none; }
[data-theme="dark"] .logo.has-dark { background: transparent; }
[data-theme="dark"] .logo.has-dark .logo-light { display: none; }
[data-theme="dark"] .logo.has-dark .logo-dark { display: block; }

.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a {
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px;
  padding: 8px 12px; border-radius: 999px; white-space: nowrap;
}
.site-nav a:hover, .site-nav a.on { background: var(--surface); color: var(--orange); }
.bar-tools { display: flex; gap: 10px; align-items: center; }
.cart-link {
  color: var(--ink); font-size: 14px; font-weight: 700; text-decoration: none;
  border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 12px;
}
.theme-toggle {
  width: 52px; height: 28px; border-radius: 999px; position: relative; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface);
}
.theme-toggle span {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--orange); transition: left .25s;
}
.theme-toggle span::after { content: "\2600"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; color: #fff; }
[data-theme="dark"] .theme-toggle span { left: 27px; }
[data-theme="dark"] .theme-toggle span::after { content: "\263E"; color: var(--bg); }
.nav-toggle { display: none; background: none; border: 1.5px solid var(--line); color: var(--ink); border-radius: 10px; font-size: 20px; padding: 2px 10px; cursor: pointer; }

/* ─── Hero slideshow ───────────────────────────────────────────────────── */
.hero { position: relative; height: 560px; overflow: hidden; color: #fff; background: #2a2018; }
.hero .slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s ease; }
.hero .slide img { width: 100%; height: 100%; object-fit: cover; transform-origin: 60% 40%; }
.hero .slide.on { opacity: 1; }
.hero .slide.on img { animation: drift 9s ease-out forwards; }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.09) translate(-1.5%, -1%); } }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 14, 8, .25), rgba(20, 14, 8, .68)); }
.hero-copy { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 16px; }
.kicker { font-family: "Permanent Marker", cursive; color: #FFB27A; font-size: 22px; letter-spacing: .5px; }
.hero h1 { font-size: clamp(36px, 6vw, 62px); max-width: 740px; }
.hero p { font-size: 19px; max-width: 580px; opacity: .95; }
.btns { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-arrows { position: absolute; z-index: 3; bottom: 22px; right: 22px; display: flex; gap: 8px; }
.hero-arrows button { width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .85); color: #1E1A16; cursor: pointer; font-size: 20px; }
.hero-dots { position: absolute; z-index: 3; bottom: 36px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.hero-dots button { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .5); cursor: pointer; }
.hero-dots button.on { background: #fff; }

/* Short photo banner on inner pages */
.page-hero { position: relative; height: 230px; overflow: hidden; color: #fff; display: flex; align-items: flex-end; }
.page-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 14, 8, .15), rgba(20, 14, 8, .7)); }
.page-hero .wrap { position: relative; z-index: 2; width: 100%; padding-bottom: 28px; }
.page-hero h1 { font-size: clamp(32px, 5vw, 48px); }
.page-hero p { opacity: .92; }

.strip { background: var(--orange); color: var(--orange-ink); text-align: center; padding: 14px; font-family: Fraunces, serif; font-size: 22px; font-weight: 700; }

/* ─── Cards & sections ─────────────────────────────────────────────────── */
section { padding-top: 64px; padding-bottom: 64px; }
section.tight { padding-top: 40px; padding-bottom: 40px; }
/* Content directly after the overlapping info cards needs its own breathing room */
.info + section { padding-top: 72px; }
.section-head { margin-bottom: 26px; }
.section-head h2 { font-size: 34px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { font-size: 21px; margin-bottom: 6px; color: var(--orange); }
.tag { display: inline-block; font-size: 12px; font-weight: 700; background: var(--teal); color: var(--bg); border-radius: 999px; padding: 2px 10px; }
.info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: -50px; position: relative; z-index: 5; }
.info .tag { margin-top: 10px; }
.split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 44px; align-items: center; }
.split h2 { font-size: 38px; margin-bottom: 14px; }
.split p { color: var(--muted); }
.split .btn { margin-top: 18px; }
.photo { border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.photo img { width: 100%; height: 340px; object-fit: cover; }
.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.center { text-align: center; }
.prose { max-width: 760px; }
.prose h2 { font-size: 30px; margin: 1.4em 0 .5em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { margin: .6em 0 0 1.2em; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ─── Forms ────────────────────────────────────────────────────────────── */
.form { display: grid; gap: 14px; max-width: 560px; }
.form label { font-weight: 700; font-size: 15px; display: grid; gap: 5px; }
.form input, .form textarea, .form select, .inline-form input {
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 14px;
}
.form input:focus, .form textarea:focus, .inline-form input:focus { outline: 2px solid var(--orange); outline-offset: 1px; }
.inline-form { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.inline-form input { border-radius: 999px; min-width: 270px; }
.hp { position: absolute; left: -9999px; }
.flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-weight: 600; }
.flash-ok { background: #E3F0E6; color: #24502F; }
.flash-err { background: #F7E0D8; color: #7A2E1A; }
[data-theme="dark"] .flash-ok { background: #1F3326; color: #BFE3C8; }
[data-theme="dark"] .flash-err { background: #3A2119; color: #F3C2B0; }

/* ─── Events ───────────────────────────────────────────────────────────── */
.events { display: grid; gap: 20px; }
.event { display: grid; grid-template-columns: 110px 1fr 240px; gap: 22px; align-items: start; }
.event-date { background: var(--orange); color: var(--orange-ink); border-radius: 14px; text-align: center; padding: 12px 6px; }
.event-date .m { display: block; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: 14px; }
.event-date .d { display: block; font-family: Fraunces, serif; font-size: 40px; line-height: 1; font-weight: 700; }
.event h3 { color: var(--ink); font-size: 24px; }
.event .when { color: var(--orange); font-weight: 700; font-size: 15px; margin: 4px 0 8px; }
.event img { border-radius: 12px; width: 100%; height: 160px; object-fit: cover; }
.event.past { opacity: .75; }
.empty { text-align: center; padding: 40px 20px; }
.empty .kicker { color: var(--orange); }

/* ─── Merch ────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.tabs a { text-decoration: none; color: var(--ink); font-weight: 700; padding: 7px 16px; border-radius: 999px; border: 1.5px solid var(--line); }
.tabs a.on { background: var(--orange); border-color: var(--orange); color: var(--orange-ink); }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.product { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.product .ph { aspect-ratio: 1 / 1; background: var(--surface-2); }
.product .ph img { width: 100%; height: 100%; object-fit: cover; }
.product .body { padding: 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product h3 { color: var(--ink); font-size: 19px; margin: 0; }
.product .price { font-weight: 700; color: var(--orange); }
.product .desc { color: var(--muted); font-size: 15px; flex: 1; }
.product .avail { font-size: 14px; font-weight: 700; color: var(--teal); }
.product form { margin-top: 6px; }

/* ─── Cart ─────────────────────────────────────────────────────────────── */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-table input[type=number] { width: 70px; font: inherit; padding: 6px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); }
.cart-total { text-align: right; font-size: 22px; font-family: Fraunces, serif; margin: 20px 0; }

/* ─── Footer ───────────────────────────────────────────────────────────── */
.site-footer { background: #1E1A16; color: #E9DECD; padding: 44px 0 22px; margin-top: 0; }
[data-theme="dark"] .site-footer { background: #120F0C; }
.site-footer a { color: #F3C7A6; }
.fgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.site-footer h4 { color: #F08A4B; font-size: 18px; margin-bottom: 6px; }
.social { display: flex; gap: 10px; margin-top: 12px; }
.social a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(243, 199, 166, .35); color: #F3C7A6; transition: background .15s, color .15s, border-color .15s; }
.social a:hover, .social a:focus-visible { background: #F08A4B; border-color: #F08A4B; color: #1E1A16; }
.social svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fbottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 32px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 14px; opacity: .75; }

/* ─── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; top: 84px; left: 0; right: 0;
    flex-direction: column; background: var(--bg); padding: 10px 16px 16px;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }
  .bar-tools { margin-left: auto; }
  .event { grid-template-columns: 90px 1fr; }
  .event img { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  section { padding-top: 44px; padding-bottom: 44px; }
  .info + section { padding-top: 48px; }
  .bar { height: 72px; gap: 12px; }
  .site-nav { top: 72px; }
  .logo img { height: 50px; }
  .hero { height: 520px; }
  .info, .split, .fgrid, .grid-3 { grid-template-columns: 1fr; }
  .info { margin-top: 20px; }
  .inline-form input { min-width: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .hero .slide.on img { animation: none; }
  .hero .slide { transition: none; }
}

/* ─── Utilities ────────────────────────────────────────────────────────── */
.mt { margin-top: 22px; }
.flash.narrow { max-width: 520px; margin: 18px auto 0; }

/* ─── 404 ──────────────────────────────────────────────────────────────── */
.lost-stage { position: relative; display: flex; justify-content: center; align-items: flex-end; min-height: 700px; }
.lost-art { position: absolute; top: 0; left: 50%; transform: translateX(-50%); height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.lost-copy {
  position: relative; z-index: 1; text-align: center; max-width: 500px; margin-bottom: 10px;
  padding: 22px 30px; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
}
.lost-copy .kicker { color: var(--orange); font-size: 20px; }
.lost-copy h1 { font-size: clamp(28px, 4vw, 38px); margin: 6px 0; }
.lost-copy .btn { margin-top: 14px; }
@media (max-width: 760px) {
  .lost-stage { min-height: 0; flex-direction: column; align-items: center; }
  .lost-art { position: static; transform: none; width: 100%; height: auto; max-width: 440px; }
  .lost-copy { margin-top: -70px; }
}
