/* Steve's Aircraft /v2 — readable hangar shop theme
   Dark text on light surfaces; deep red accent only. No yellow-on-red. */

:root {
  --bg: #f3f1ec;
  --bg-elev: #fffcf7;
  --ink: #1c1a17;
  --ink-muted: #5a564e;
  --accent: #8b1515;
  --accent-dark: #6a1010;
  --accent-soft: #f5e8e6;
  --line: #d8d2c6;
  --ok: #1f6b3a;
  --warn: #8a5b00;
  --shadow: 0 10px 30px rgba(28, 26, 23, 0.08);
  --radius: 6px;
  --font-display: "Barlow", "Segoe UI", sans-serif;
  --font-body: "Libre Franklin", "Segoe UI", sans-serif;
  --max: 1120px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #ebe4d8 0%, transparent 55%),
    radial-gradient(900px 400px at 100% 0%, #e8ddd4 0%, transparent 50%),
    var(--bg);
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}
a:hover { color: var(--accent-dark); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  background: rgba(255, 252, 247, 0.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand-logo {
  width: auto;
  height: 52px;
  max-width: 140px;
  object-fit: contain;
  object-position: left center;
  border-radius: 0;
  border: none;
  background: transparent;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.01em;
}
.brand-tag {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius);
  font: inherit;
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.85rem;
  align-items: center;
}
.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.cart-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  vertical-align: middle;
}

/* Main */
.site-main { padding: 1.5rem 0 3rem; }

.page-title { margin-bottom: 1.5rem; }
.page-title h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  margin: 0 0 0.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.lede {
  margin: 0;
  color: var(--ink-muted);
  max-width: 40rem;
  font-size: 1.05rem;
}

.flash {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  border: 1px solid var(--line);
  background: var(--bg-elev);
}
.flash-ok { border-color: #b7d9c3; background: #eef7f1; color: var(--ok); }
.flash-error { border-color: #e2b4b4; background: var(--accent-soft); color: var(--accent-dark); }
.flash-info { border-color: var(--line); }

/* Hero */
.hero {
  position: relative;
  min-height: min(72vh, 560px);
  display: grid;
  align-items: end;
  overflow: hidden;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: heroFade 24s infinite;
}
.hero-slide:nth-child(1) { animation-delay: 0s; }
.hero-slide:nth-child(2) { animation-delay: 8s; }
.hero-slide:nth-child(3) { animation-delay: 16s; }
@keyframes heroFade {
  0% { opacity: 0; transform: scale(1.02); }
  5% { opacity: 1; }
  30% { opacity: 1; }
  38% { opacity: 0; transform: scale(1.06); }
  100% { opacity: 0; }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28,26,23,0.72) 0%, rgba(28,26,23,0.25) 45%, rgba(28,26,23,0.15) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  color: #f7f4ef;
  padding: 3rem 0 2.5rem;
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}
.hero-content .brand-hero {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 700;
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.hero-content p {
  margin: 0 0 1.25rem;
  max-width: 28rem;
  font-size: 1.1rem;
  color: #ebe4d8;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost {
  background: transparent;
  color: #f7f4ef;
  border-color: rgba(247,244,239,0.55);
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); color: #fff; }
.btn-secondary {
  background: var(--bg-elev);
  color: var(--ink);
  border-color: var(--line);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* Sections */
.section { margin: 2.5rem 0; }
.section h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  margin: 0 0 0.5rem;
}
.section-intro {
  color: var(--ink-muted);
  margin: 0 0 1.25rem;
  max-width: 38rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover {
  border-color: #c9b8b0;
  transform: translateY(-2px);
}
.card h3 {
  font-family: var(--font-display);
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
}
.card p { margin: 0 0 0.85rem; color: var(--ink-muted); font-size: 0.95rem; }
.card a.card-link {
  font-weight: 600;
  text-decoration: none;
  color: var(--accent);
}
.card a.card-link:hover { text-decoration: underline; }

.panel {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow);
}

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 800px) {
  .two-col { grid-template-columns: 1fr; }
}

.prose p { margin: 0 0 1rem; }
.prose ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.prose li { margin-bottom: 0.35rem; }

.caution {
  background: #fff8e8;
  border: 1px solid #e6d3a0;
  border-left: 4px solid var(--warn);
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  margin: 1.25rem 0;
  color: var(--ink);
}

.price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ink);
}

.thumb-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1rem 0;
}
.thumb-row a {
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  display: block;
}
.thumb-row img { width: 100px; height: 70px; object-fit: cover; }

/* Forms */
.form-grid {
  display: grid;
  gap: 0.85rem;
  max-width: 28rem;
}
.sa-honeypot {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}
input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  background: #fff;
  color: var(--ink);
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(139, 21, 21, 0.25);
  border-color: var(--accent);
}
.form-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.5rem; }

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
table.data th,
table.data td {
  padding: 0.55rem 0.7rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.data th {
  background: #ece7de;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
}
table.data tr:nth-child(even) td { background: #faf7f2; }
table.data tr:hover td { background: var(--accent-soft); }

/* Cart */
.cart-table .price-cell { white-space: nowrap; font-weight: 600; }
.cart-summary {
  margin-top: 1rem;
  max-width: 20rem;
  margin-left: auto;
}
.cart-summary dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1rem;
  margin: 0 0 1rem;
}
.cart-summary dt { color: var(--ink-muted); }
.cart-summary dd { margin: 0; font-weight: 600; text-align: right; }
.cart-summary .total dd { font-size: 1.2rem; color: var(--accent); }

/* Admin */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.25rem;
}
@media (max-width: 800px) {
  .admin-layout { grid-template-columns: 1fr; }
}
.admin-nav {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
}
.admin-nav a {
  display: block;
  padding: 0.4rem 0.5rem;
  text-decoration: none;
  color: var(--ink);
  border-radius: 4px;
}
.admin-nav a:hover,
.admin-nav a.is-active {
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.price-row-form {
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) 7rem 7rem auto auto;
  gap: 0.5rem;
  align-items: center;
  width: 100%;
}
.price-row-form .price-assembly {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.price-row-form .price-num {
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 700px) {
  .price-row-form {
    grid-template-columns: 1fr 1fr;
  }
  .price-row-form .price-assembly {
    grid-column: 1 / -1;
  }
}

.muted { color: var(--ink-muted); }
.small { font-size: 0.88rem; }

/* Footer */
.site-footer {
  background: #2a2622;
  color: #ddd6cb;
  padding: 2.5rem 0 1.5rem;
  margin-top: auto;
}
.site-footer a { color: #f0e8dc; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
  margin: 0 0 0.5rem;
}
.footer-heading {
  font-family: var(--font-display);
  font-weight: 600;
  color: #fff;
  margin: 0 0 0.5rem;
}
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-links li { margin-bottom: 0.3rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-note {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 1rem;
  font-size: 0.88rem;
  color: #b8aea0;
}

/* Mobile nav */
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    width: 100%;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 0.5rem 0 0.75rem;
  }
}
