/* ==========================================================================
   Luftwaffe.nl — vintage aviation theme
   Period references: Fliegerblau uniform cloth, yellow Fliegertruppe
   Waffenfarbe, aged Flugbuch / Soldbuch paper, typewritten index cards,
   violet rubber stamps, RLM 70/71/65 splinter camouflage.
   ========================================================================== */

/* Fonts are self-hosted (public/fonts, SIL Open Font License) so no visitor
   data is sent to Google — see public/fonts/README.md. */
/* Source Serif 4 — latin-ext */
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/source-serif-4-italic-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Source Serif 4 — latin */
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/source-serif-4-italic-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Source Serif 4 — latin-ext */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/source-serif-4-normal-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Source Serif 4 — latin */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/source-serif-4-normal-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Source Serif 4 — latin-ext */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/source-serif-4-normal-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Source Serif 4 — latin */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/source-serif-4-normal-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Special Elite — latin-ext */
@font-face {
  font-family: 'Special Elite';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/special-elite-normal-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Special Elite — latin */
@font-face {
  font-family: 'Special Elite';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/special-elite-normal-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* UnifrakturCook — latin */
@font-face {
  font-family: 'UnifrakturCook';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/unifrakturcook-normal-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Period colours */
  --fliegerblau:      #4c5a69;   /* uniform blue-grey */
  --fliegerblau-dark: #313b46;
  --gelb:             #d8a41f;   /* Waffenfarbe, flying troops */
  --stempel:          #5a3f7c;   /* violet stamp ink */
  --rlm65: #9fb4c0;
  --rlm70: #333b2e;
  --rlm71: #4a533f;

  /* Roles */
  --paper:   #e3dbc4;   /* aged document paper */
  --card:    #eee7d4;   /* index card */
  --ink:     #241f19;
  --muted:   #6a604f;
  --line:    #b8ab8d;
  --on-dark: #ece5d2;
  --accent:  var(--gelb);
  --accent-ink: #231a05;

  --font-fraktur: "UnifrakturCook", "Old English Text MT", "Times New Roman", serif;
  --font-type:    "Special Elite", "Courier New", Courier, monospace;
  --font-body:    "Source Serif 4", Georgia, "Times New Roman", serif;

  --wrap: 74rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);

  /* Paper grain and cloth twill, generated — no image files needed */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .25 0 0 0 0 .15 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --twill: repeating-linear-gradient(45deg, rgba(255,255,255,.035) 0 2px, rgba(0,0,0,.05) 2px 4px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1e2329; --card: #282e35; --ink: #e8e0cb; --muted: #a79d88; --line: #454c55; --stempel: #a48acb;
  }
}
:root[data-theme="dark"] {
  --paper: #1e2329; --card: #282e35; --ink: #e8e0cb; --muted: #a79d88; --line: #454c55; --stempel: #a48acb;
}

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

body.lw {
  margin: 0;
  background: var(--grain), var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
.lw img { max-width: 100%; display: block; }
.lw a { color: inherit; }
.lw :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.lw h1, .lw h2 {
  font-family: var(--font-fraktur);
  font-weight: 700;
  line-height: 1.05;
  margin: 0;
}

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: .5rem 1rem; z-index: 10; }
.skip-link:focus { left: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons: typewritten labels ---------- */
.btn {
  display: inline-flex; align-items: center;
  font-family: var(--font-type);
  font-size: 1.0625rem;
  line-height: 1;
  padding: .85rem 1.35rem;
  border: 2px solid transparent;
  border-radius: 1px;
  text-decoration: none;
  cursor: pointer;
}
.btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
.btn--primary:hover { background: #e6b43a; }
.btn--ghost { border-color: currentColor; color: var(--on-dark); background: transparent; }
.btn--ghost:hover { background: rgba(236,229,210,.1); }

/* ---------- Header: uniform cloth ---------- */
.site-header { background: var(--twill), var(--fliegerblau); color: var(--on-dark); }
.site-header__bar { display: flex; align-items: center; gap: 1.5rem; padding-block: .85rem; }

.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand__tab { width: 26px; height: 34px; flex: none; }  /* collar tab with gulls */
.brand__name { font-family: var(--font-fraktur); font-size: 2rem; line-height: 1; }

.search { flex: 1; max-width: 25rem; margin-left: auto; }
.search input {
  width: 100%;
  font-family: var(--font-type); font-size: .9375rem;
  color: var(--on-dark);
  background: rgba(0,0,0,.2);
  border: 1px solid rgba(236,229,210,.3);
  border-radius: 1px;
  padding: .55rem .8rem;
}
.search input::placeholder { color: #aeb4ba; }
.search input:focus { outline: 3px solid var(--accent); outline-offset: 0; border-color: transparent; }

.account { display: flex; align-items: center; gap: 1.25rem; font-family: var(--font-type); font-size: 1rem; }
.account a { text-decoration: none; }
.account a:hover, .account button:hover { color: var(--accent); }
.account form { margin: 0; }
.account button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.cart-count {
  display: inline-grid; place-items: center;
  min-width: 1.45rem; height: 1.45rem; padding-inline: .3rem; margin-left: .35rem;
  background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: .875rem;
}

.site-nav { border-top: 1px solid rgba(236,229,210,.18); }
.site-nav ul { display: flex; gap: 2rem; list-style: none; margin: 0 auto; padding-block: 0; overflow-x: auto; }
.site-nav a {
  display: block; padding-block: .65rem;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  text-decoration: none; color: #cfd3d6;
  border-bottom: 3px solid transparent;
}
.site-nav a:hover { color: var(--on-dark); }
.site-nav a[aria-current="page"] { color: var(--on-dark); border-bottom-color: var(--accent); }

@media (max-width: 40rem) {
  .site-header__bar { flex-wrap: wrap; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
}

/* ---------- Hero: weathered splinter camouflage ---------- */
.hero { position: relative; isolation: isolate; color: var(--on-dark); background: var(--rlm71); overflow: hidden; }
.hero__camo { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero::after {             /* worn paint */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--grain); opacity: .9; mix-blend-mode: multiply; pointer-events: none;
}
.hero__inner {
  min-height: clamp(26rem, 62vh, 36rem);
  display: flex; flex-direction: column; justify-content: center;
  padding-block: 4rem 7.5rem;
}
.hero h1 {
  font-size: clamp(3rem, 8vw, 6.5rem);
  max-width: 12ch;
  text-wrap: balance;
  text-shadow: 0 2px 0 rgba(0,0,0,.25);
}
.hero p { max-width: 34rem; margin: 1.25rem 0 2rem; font-size: 1.1875rem; color: #dcd7c6; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Sections: document headings ---------- */
.section { padding-block: clamp(3rem, 7vw, 5rem); }
.section__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding-bottom: .6rem; margin-bottom: 2rem;
  border-bottom: 4px double var(--ink);
}
.section__head h2 { font-size: clamp(2.25rem, 4.5vw, 3rem); }
.section__head a { font-family: var(--font-type); font-size: 1rem; white-space: nowrap; }

/* ---------- Product cards: typewritten index cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.75rem; }

.product-card {
  display: flex; flex-direction: column;
  background: var(--grain), var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 var(--line), 3px 3px 0 rgba(60,45,20,.12);
  text-decoration: none; color: inherit;
}
.product-card:hover { border-color: var(--ink); }
.product-card__no {
  display: flex; justify-content: space-between;
  font-family: var(--font-type); font-size: .875rem; color: var(--muted);
  padding: .5rem .9rem; border-bottom: 1px solid var(--line);
}
.product-card__media { position: relative; aspect-ratio: 4 / 5; background: #cfc6ad; overflow: hidden; margin: .6rem .6rem 0; }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; }
.product-card__placeholder {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-type); color: #6a604f; font-size: .9375rem;
}
.product-card__flag {
  position: absolute; top: .7rem; left: 0;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--font-type); font-size: .875rem; padding: .2rem .6rem;
}
.product-card__stamp {    /* rubber stamp */
  position: absolute; top: 42%; left: 50%;
  transform: translate(-50%, -50%) rotate(-14deg);
  font-family: var(--font-type); font-size: 1.6rem; letter-spacing: .08em;
  color: var(--stempel);
  border: 3px double var(--stempel); border-radius: 4px;
  padding: .15rem .75rem;
  background: rgba(238,231,212,.55);
  opacity: .88; mix-blend-mode: multiply;
}
.product-card__body { padding: .9rem .95rem 1.1rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.product-card__title { font-family: var(--font-body); font-weight: 600; font-size: 1.0625rem; line-height: 1.35; margin: 0; }
.product-card__meta { color: var(--muted); font-style: italic; font-size: .9375rem; margin: 0; }
.product-card__price {
  margin-top: auto; padding-top: .5rem; border-top: 1px dotted var(--line);
  font-family: var(--font-type); font-size: 1.25rem;
}

.empty-state {
  background: var(--grain), var(--card);
  border: 1px dashed var(--line);
  padding: 3rem var(--gutter);
  text-align: center; color: var(--muted);
}
.empty-state strong { display: block; font-family: var(--font-type); font-weight: 400; font-size: 1.375rem; color: var(--ink); margin-bottom: .35rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--twill), var(--fliegerblau-dark); color: #c9cdd0; padding-block: 3rem 2rem; }
.site-footer__grid { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 2rem; }
.site-footer .brand { color: var(--on-dark); }
.site-footer p { margin: .75rem 0 0; }
.site-footer a:hover { color: var(--accent); }
.site-footer__contact { font-family: var(--font-type); }
.site-footer__legal { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid rgba(236,229,210,.15); font-size: .9375rem; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* ==========================================================================
   Shop pages — maps the shared component styles in shop.css (forms, tables,
   cart, checkout, account) onto the theme palette. Load after shop.css.
   ========================================================================== */

body.lw {
  --bg: var(--paper);
  --surface: var(--card);
  --text: var(--ink);
  --border: var(--line);
  --field: #f5f0e2;
  --link: var(--fliegerblau-dark);
  --primary: var(--fliegerblau);
  --primary-dark: var(--fliegerblau-dark);
  --danger: #9b2a1c;
  --radius: 1px;
  --shadow: 3px 3px 0 rgba(60,45,20,.12);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.lw { --field: #1a1f24; --link: #c3cfdb; --danger: #e0826f; }
}
:root[data-theme="dark"] body.lw { --field: #1a1f24; --link: #c3cfdb; --danger: #e0826f; }

.lw .main { padding-block: clamp(1.5rem, 4vw, 2.5rem) clamp(3rem, 7vw, 5rem); min-height: 50vh; }
.lw .main a:not(.btn):not(.product-card) { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.lw .main a:not(.btn):not(.product-card):hover { color: var(--ink); }
.lw .main h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); margin: .1em 0 .45em; }
.lw .main h2 { font-size: clamp(1.6rem, 3vw, 2rem); margin: 1.4em 0 .5em; }
.lw .main .section__head h2,
.lw .panel h2:first-of-type,
.lw .checkout-summary h2 { margin-top: 0; }
.lw .main .section { padding-block: 0 clamp(2.5rem, 5vw, 3.5rem); }
.lw .main .section:last-child { padding-bottom: 0; }
.lw .muted { color: var(--muted); }

/* Buttons */
.lw .btn { background: var(--accent); color: var(--accent-ink); font-weight: 400; border-radius: 1px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); justify-content: center; }
.lw .btn:hover { background: #e6b43a; }
.lw .btn--ghost { background: transparent; color: var(--on-dark); box-shadow: none; }
.lw .btn--ghost:hover { background: rgba(236,229,210,.1); }
.lw .btn-small { padding: .55rem .9rem; font-size: .9375rem; }
.lw .btn-block { display: flex; width: 100%; }
.lw .btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); box-shadow: none; }
.lw .link-button { color: var(--link); font-family: var(--font-type); font-size: .9375rem; }

/* Forms */
.lw input[type=text], .lw input[type=email], .lw input[type=password], .lw input[type=number],
.lw input[type=search], .lw input[type=tel], .lw select, .lw textarea {
  background: var(--field); border-color: var(--line); border-radius: 1px; font-family: var(--font-body);
}
.lw .search input { background: rgba(0,0,0,.2); font-family: var(--font-type); color: var(--on-dark); }
.lw input:focus, .lw select:focus, .lw textarea:focus { outline: 3px solid var(--accent); outline-offset: 0; border-color: var(--ink); }
.lw fieldset { background: var(--grain), var(--card); border-color: var(--line); }
.lw legend { font-family: var(--font-type); font-weight: 400; font-size: 1.0625rem; background: var(--card); padding-inline: .5rem; }
.lw label { font-weight: 600; }
.lw label.checkbox, .lw label.radio { font-weight: 400; }
.lw input[type=radio], .lw input[type=checkbox] { accent-color: var(--fliegerblau); }

/* Panels, tables, totals */
.lw .panel, .lw .checkout-summary { background: var(--grain), var(--card); border-color: var(--line); box-shadow: var(--shadow); }
.lw .table { background: var(--grain), var(--card); border-color: var(--line); }
.lw .table th { font-family: var(--font-type); font-weight: 400; text-transform: none; letter-spacing: 0; font-size: .9375rem; background: transparent; border-bottom: 2px solid var(--ink); }
.lw .table td { border-bottom-color: var(--line); }
.lw .totals dd, .lw .price, .lw .summary-lines li span:last-child { font-family: var(--font-type); font-weight: 400; }
.lw .totals .grand { border-top: 4px double var(--ink); }
.lw .price del, .lw .product-card__price del { color: var(--muted); margin-right: .4rem; }
.lw .price-large { font-size: 1.75rem; }

/* Alerts & status stamps */
.lw .alert { border: 1px solid currentColor; border-radius: 1px; }
.lw .status { border-radius: 1px; font-family: var(--font-type); font-weight: 400; border: 1px solid currentColor; }

/* Listing page */
.lw .page-head { border-bottom: 4px double var(--ink); padding-bottom: .6rem; margin-bottom: 2rem; }
.lw .page-head h1 { margin: 0; }
.lw .sort-form label { font-family: var(--font-type); font-weight: 400; }
.lw .chip { border-radius: 1px; font-family: var(--font-type); background: var(--card); border-color: var(--line); text-decoration: none; }
.lw .pagination { font-family: var(--font-type); }
.lw .pagination .disabled { color: var(--line); }
.lw .breadcrumbs, .lw .catalogue-no { font-family: var(--font-type); color: var(--muted); }
.lw .catalogue-no { margin: 0 0 .5rem; }

/* Product page */
.lw .gallery-frame { position: relative; }
.lw .gallery-main { background: var(--grain), var(--card); border-color: var(--line); border-radius: 0; padding: .6rem; }
.lw .placeholder { background: #cfc6ad; color: #6a604f; font-family: var(--font-type); font-size: 1.1rem; font-weight: 400; text-transform: none; }
.lw .gallery-frame .product-card__stamp { font-size: 2.4rem; }
.lw .gallery-thumbs button { border-radius: 0; background: var(--card); }
.lw .in-stock { color: #3d6b35; }
.lw .out-of-stock { color: var(--stempel); }
.lw .stock { font-family: var(--font-type); font-weight: 400; }
.lw .description { border-top: 1px dotted var(--line); }

/* Account & misc */
.lw .tabs { border-bottom: 4px double var(--ink); font-family: var(--font-type); }
.lw .tabs a { color: var(--muted) !important; text-decoration: none; }
.lw .tabs a.active { color: var(--ink) !important; border-bottom: 3px solid var(--accent); }
.lw .cart-product img { border-radius: 0; }
.lw .narrow h1, .lw .center h1 { text-align: inherit; }

@media (max-width: 600px) {
  .lw .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
  .lw .product-card__meta { display: none; }
  .lw .product-card__no { font-size: .75rem; padding: .4rem .5rem; }
  .lw .product-card__body { padding: .7rem .6rem .8rem; }
  .lw .product-card__price { font-size: 1.05rem; }
  .lw .product-card__stamp { font-size: 1.1rem; }
}
