/* =========================
   Athel Anderson — Crimson Dark Theme
   PMS 201 / HEX #9E1B32
   ========================= */

/* ---- Design tokens ---- */
:root {
  /* Color scale */
  --crimson-950: #2A0C12;  /* darkest page background */
  --crimson-900: #5B0F1D;  /* deep crimson */
  --crimson-800: #7F1628;  /* header/footer, cards */
  --crimson-700: #9E1B32;  /* base crimson */
  --crimson-600: #B2223D;  /* lighter crimson accents */

  /* Text */
  --ink: #FFFFFF;
  --ink-2: rgba(255,255,255,.85);
  --ink-3: rgba(255,255,255,.65);

  /* Lines */
  --line: rgba(255,255,255,.10);
  --line-2: rgba(255,255,255,.20);

  /* Layout */
  --radius-lg: 16px;
  --radius-md: 10px;
  --maxw: 1200px;

  /* Page bg token */
  --page-bg: var(--crimson-950);
}

/* ---- Base ---- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--page-bg);
  color: var(--ink);
  line-height: 1.6;
}

a { color: #FFD3DB; text-decoration: none; }
a:hover { color: #FFF0F3; text-decoration: underline; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1rem; }

/* ---- Header / Nav ---- */
header.site-header {
  background: #2A0C12; /* var(--crimson-800) */
  color: var(--ink);
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--line-2);
}
.navbar { display: flex; align-items: center; justify-content: space-between; padding: .8rem 0; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.25rem; }
.brand .logo-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 3px rgba(255,255,255,.35); }
.brand-logo { height: 36px; width: auto; display: inline-block; }

.navlinks { display: flex; gap: 1rem; }
.navlinks a { color: var(--ink); padding: .5rem .75rem; border-radius: 10px; }
.navlinks a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.mobile-toggle { display: none; background: transparent; border: 0; font-size: 1.5rem; color: var(--ink); }

/* Mobile nav */
@media (max-width: 780px) {
  .navlinks { display: none; flex-direction: column; padding: .75rem 0; }
  .navlinks.open { display: flex; }
  .mobile-toggle { display: block; }
}

/* ---- Hero ---- */
.hero { padding: 3.5rem 0 2.5rem; }
.hero .title { font-size: clamp(2rem, 3vw + 1rem, 3rem); line-height: 1.1; margin: 0 0 .75rem 0; }
.hero .subtitle { color: var(--ink-2); max-width: 52ch; }

.hero.hero-crimson {
  position: relative;
  color: #fff;
  padding: 3.5rem 0 2.5rem;
  overflow: hidden;
  background: linear-gradient(180deg, #9E1B32 0%, #87162C 55%, #2A0C12 100%);
}
.hero.hero-crimson::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url('/assets/img/hero-overlay.png') center/cover no-repeat;
  opacity: 0.15;               /* adjust 0.1–0.3 for subtlety */
  mix-blend-mode: soft-light;  /* lets crimson gradient show through */
  pointer-events: none;
}

/* Hero layout: text | image */
.hero-grid{
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;      /* mobile: single column */
  align-items: center;
}
@media (min-width: 900px){
  .hero-grid{ grid-template-columns: 1fr auto; }
  .hero-art{ width: clamp(260px, 28vw, 360px); } /* min, preferred, max */
}


/* Hero image presentation */
.hero-art picture,
.hero-art img{
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

/* Mobile: cap hero image size and center it */
@media (max-width: 900px){
  .hero{ padding: 2.5rem 0 1.75rem; }   /* optional: reduce hero padding */
  .hero-art{
    width: clamp(220px, 70vw, 340px);   /* min, preferred, max */
    margin: 1rem auto 0;                /* center below text */
  }
  .hero-art img{ width: 100%; height: auto; display:block; }
}


/* ---- Right column “gear” card (books) ---- */
.gear-card {
  background: var(--crimson-800);
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.gear-card h3 { margin: 0 0 .5rem; }
.gear-card .disclosure { font-size: .8rem; color: var(--ink-3); margin-bottom: 1rem; }

.gear-list { list-style: none; margin: 0; padding: 0; }
.gear-item + .gear-item { margin-top: 1rem; }
.gear-link { display: flex; gap: .75rem; text-decoration: none; color: inherit; }
.gear-thumb {
  flex: 0 0 60px;
  height: 80px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  background-color: var(--crimson-700);
}
.gear-meta h4 { margin: 0 0 .25rem; font-size: 1rem; }
.gear-meta p { margin: 0; font-size: .85rem; color: var(--ink-2); }
.gear-footer { margin-top: 1rem; text-align: center; }
.gear-footer .button.block { width: 100%; }

/* ---- Buttons ---- */
.button {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .65rem 1rem; border-radius: 999px; font-weight: 700;
  border: 1px solid transparent; cursor: pointer;
}
.button.primary { background: var(--crimson-700); color: var(--ink); border-color: var(--crimson-800); }
.button.primary:hover { background: var(--crimson-800); }
.button.ghost { background: transparent; color: #FFD3DB; border-color: var(--line-2); }
.button.ghost:hover { background: rgba(255,255,255,.06); }

/* ---- Sections ---- */
.section { padding: 3rem 0; }                          /* no borders here to avoid seams */
.hero.hero-crimson + .section { padding-top: 2rem; }

/* ---- Grid & Cards ---- */
.grid { display: grid; gap: 1rem; }

/* Auto-fit responsive cards */
.grid.cards{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card{
  background: var(--crimson-800);
  padding: 1.25rem;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover{ transform: translateY(-3px); box-shadow: 0 4px 12px rgba(0,0,0,0.25); }

/* Optional span utilities */
@media (min-width: 720px){
  .span-3  { grid-column: span 3; }
  .span-4  { grid-column: span 4; }
  .span-6  { grid-column: span 6; }
  .span-8  { grid-column: span 8; }
  .span-12 { grid-column: span 12; }
}
@media (max-width: 719px){
  .span-3, .span-4, .span-6, .span-8, .span-12 { grid-column: 1 / -1; }
}

/* Tags/badges */
.tag{
  display:inline-block; padding:.25rem .5rem; border-radius:999px;
  font-size:.8rem; background: rgba(255,255,255,.10); color:#FFE7EB;
}

/* ---- Code, tables, forms ---- */
pre, code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
pre { background: #3C0D15; color: #FFECEF; padding: 1rem; border-radius: var(--radius-md); border: 1px solid var(--line); overflow: auto; }
code.inline { background: #3C0D15; padding: .1rem .35rem; border-radius: .4rem; }

table { width: 100%; border-collapse: collapse; color: var(--ink); }
th, td { padding: .6rem .5rem; border-bottom: 1px solid var(--line); }
th { text-align: left; background: var(--crimson-600); color: var(--ink-2); }

input, select, textarea {
  width: 100%; padding: .7rem .8rem;
  border: 1px solid var(--line); border-radius: .6rem; background: var(--crimson-600); color: var(--ink);
}
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(255,255,255,.15); border-color: var(--ink-2); }

/* Right column heading (if used with a gear panel) */
.hero-gear .gear-heading{ margin:0 0 .75rem 0; font-size:1.15rem; }

/* ---- Books carousel ---- */
.book-carousel{ position:relative; }
.bc-viewport{
  overflow:hidden;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.15);
}
.bc-track{
  display:flex;
  margin:0; padding:0; list-style:none;
  transition: transform .45s ease;
  will-change: transform;
}
.bc-slide{ flex:0 0 100%; }
.bc-card{
  display:block;
  width:100%;
  aspect-ratio: 2 / 3;            /* keeps one, tall cover visible */
  background-size: cover;
  background-position: center;
  border-radius: 12px;
}
@media (min-width: 901px){
  .bc-card{ height: 360px; aspect-ratio: auto; }
}
.bc-arrow{
  position:absolute; top:50%; transform:translateY(-50%);
  width:38px; height:38px; border-radius:50%;
  border:1px solid rgba(255,255,255,.35);
  background: rgba(0,0,0,.25);
  color:#fff; font-size:22px; line-height: 36px;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer; user-select:none;
  backdrop-filter: blur(6px);
}
.bc-prev{ left:8px; }
.bc-next{ right:8px; }
.bc-arrow:hover{ background: rgba(255,255,255,.15); }
.bc-dots{
  display:flex; gap:6px; justify-content:center; margin-top:.6rem;
}
.bc-dots button{
  width:8px; height:8px; border-radius:50%;
  border:0; background: rgba(255,255,255,.35); cursor:pointer;
}
.bc-dots button[aria-current="true"]{ background:#fff; }

/* ---- Footer ---- */
footer.site-footer{
  margin-top: 3rem;
  background: var(--crimson-800);
  color: var(--ink);
  padding: 2rem 0;
  border-top: 1px solid var(--line-2);
}
footer a { color:#FFE7EB; text-decoration: underline; }
footer a:hover { color:#FFFFFF; }

.footer-grid{
  display:grid; gap:1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: start;
}
footer.site-footer h3 { margin:0 0 .5rem 0; }
footer.site-footer p, footer.site-footer li { line-height:1.6; color:var(--ink-2); }
footer.site-footer ul { list-style:none; padding:0; margin:0; }
footer.site-footer li + li { margin-top:.4rem; }

footer .social-links a { display:block; margin:.45rem 0; color:#FFE7EB; opacity:.9; }
footer .social-links a:hover { opacity:1; }
