/* Shared styles for all public pages. Design system from the handoff. */
:root {
  --bg: #FAFAF8; --surface: #FFFFFF; --ink: #1C1B1A; --muted: #8A8780;
  --line: #E8E6E1; --accent: #1C1B1A; --accent-ink: #FFFFFF; --radius: 10px;
  --font-display: "Schibsted Grotesk", sans-serif; --font-body: "Schibsted Grotesk", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;
  --display-weight: 600; --display-track: -0.02em;
}
html[data-type="serif"]   { --font-display: "Instrument Serif", serif; --display-weight: 400; --display-track: 0; }
html[data-type="archivo"] { --font-display: "Archivo", sans-serif; --font-body: "Archivo", sans-serif; --display-weight: 650; --display-track: -0.03em; }
html[data-accent="forest"] { --accent: #2E5D43; }
html[data-accent="clay"]   { --accent: #B0573A; }
html[data-accent="cobalt"] { --accent: #2A5BD7; }
html[data-theme="dark"] { --bg: #161514; --surface: #1F1E1C; --ink: #F2F0EC; --muted: #93908A; --line: #2E2C29; }

/* Theme presets — selectable per section / per gallery */
html[data-theme="noir"]   { --bg: #0D0C0B; --surface: #161514; --ink: #EDEBE7; --muted: #807D77; --line: #262422; --accent: #EDEBE7; --accent-ink: #0D0C0B; }
html[data-theme="paper"]  { --bg: #F6F1E7; --surface: #FFFDF7; --ink: #2B2620; --muted: #97907F; --line: #E7DfCE; --accent: #8A6D3B; --accent-ink: #FFFDF7; }
html[data-theme="forest"] { --bg: #101B15; --surface: #18261E; --ink: #E7EFE9; --muted: #8AA192; --line: #24352B; --accent: #7FB892; --accent-ink: #101B15; }
html[data-theme="ocean"]  { --bg: #0E1A23; --surface: #15242F; --ink: #E5EEF3; --muted: #84A8B5; --line: #213441; --accent: #5FA8D3; --accent-ink: #0E1A23; }
html[data-theme="sunset"] { --bg: #FBF1EA; --surface: #FFFAF6; --ink: #2A211C; --muted: #A8907F; --line: #F0DDD0; --accent: #C75B39; --accent-ink: #FFFAF6; }
/* Glass Heart — white ground, blue accent, classic serif display */
html[data-theme="glassheart"] {
  --bg: #FFFFFF; --surface: #F6F9FD; --ink: #16324A; --muted: #7C90A4; --line: #DDE7F2;
  --accent: #2D7CD3; --accent-ink: #FFFFFF;
  --font-display: "Instrument Serif", Georgia, serif; --display-weight: 400; --display-track: 0;
}
html[data-theme="glassheart"] h1, html[data-theme="glassheart"] h2, html[data-theme="glassheart"] .blog-title { color: var(--accent); }
html[data-theme="glassheart"] .site-nav { background: rgba(255,255,255,0.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
html[data-theme="glassheart"] .card, html[data-theme="glassheart"] .gal-hero.no-cover { background: rgba(246,249,253,0.8); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
html[data-theme="glassheart"] .wordmark { color: var(--accent); }

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-body); background: var(--bg); color: var(--ink);
  font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; min-height: 100vh;
  transition: background 0.2s, color 0.2s;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-track); }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 40px; width: 100%; }
main { flex: 1 0 auto; }

/* Nav */
.site-nav { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.wordmark { font-size: 11px; letter-spacing: 0.32em; font-weight: 600; text-transform: uppercase; }
.nav-right { display: flex; align-items: center; gap: 4px; }
.nav-link { color: var(--muted); font-size: 13.5px; padding: 8px 12px; border-radius: 8px; transition: color 0.12s; }
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--ink); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; border: none; background: transparent; color: var(--ink); cursor: pointer; transition: background 0.12s; }
.icon-btn:hover { background: rgba(127,124,118,0.16); }

/* Buttons + chips */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--radius); padding: 12px 28px; font-size: 14px; font-weight: 550; font-family: var(--font-body); cursor: pointer; transition: filter 0.12s, transform 0.06s; }
.btn:hover { filter: brightness(0.97); }
.btn:active { transform: scale(0.985); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 9px 18px; font-size: 13.5px; font-weight: 500; transition: border-color 0.12s; }
.chip:hover { border-color: var(--muted); }

/* Page heads */
.page-head { padding: 64px 0 8px; }
.sec-label { font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.page-head h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.05; }
.page-head .sub { color: var(--muted); font-size: 15px; margin-top: 10px; }

/* Hero (home) */
.hero { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; text-align: center; padding: 80px 0; }
.hero .wordmark { display: block; opacity: 0.85; margin-bottom: 22px; }
.hero h1 { font-size: clamp(44px, 7vw, 84px); line-height: 1.04; }
.hero p { font-size: 16px; letter-spacing: 0.04em; color: var(--muted); max-width: 560px; margin: 18px auto 0; }
.hero .cta { margin-top: 34px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Generic section spacing on inner pages */
.section { padding: 24px 0 72px; }
.prose { color: var(--ink); opacity: 0.9; max-width: 640px; font-size: 17px; line-height: 1.65; }

/* Cards grid (sections / albums) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; padding: 28px 0 40px; }
.card { display: block; color: inherit; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); cursor: pointer; transition: box-shadow 0.15s, transform 0.15s; }
.card:hover { box-shadow: 0 8px 26px rgba(20,19,18,0.10); transform: translateY(-2px); }
.card-cover { height: 170px; background-color: var(--surface); background-image: repeating-linear-gradient(135deg, var(--line) 0 14px, transparent 14px 28px); background-size: cover; background-position: center; background-repeat: no-repeat; }
.card-body { padding: 15px 17px 17px; }
.card-body h3 { font-size: 17px; }
.card-body .meta { color: var(--muted); font-size: 13px; margin-top: 5px; display: flex; gap: 8px; align-items: center; }
.lock { font-size: 11px; }

.contact-links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }

.empty { padding: 70px 20px; text-align: center; color: var(--muted); }

/* Footer */
.site-footer { flex: none; padding: 40px 0; text-align: center; color: var(--muted); font-size: 12px; letter-spacing: 0.08em; border-top: 1px solid var(--line); }

/* ---- Page-builder blocks ---- */
.page-blocks { padding: 40px 0 64px; }
.blk-hero { text-align: center; padding: 60px 0; }
.blk-hero .wordmark { display: block; opacity: 0.85; margin-bottom: 22px; }
.blk-hero h1 { font-size: clamp(44px, 7vw, 84px); line-height: 1.04; }
.blk-hero p { font-size: 16px; letter-spacing: 0.04em; color: var(--muted); max-width: 560px; margin: 18px auto 0; }
.blk-hero .cta { margin-top: 34px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.blk-heading { margin: 28px 0 8px; font-size: 30px; }
.blk-heading:first-child { margin-top: 0; }
.blk-text { font-size: 17px; line-height: 1.65; color: var(--ink); opacity: 0.92; max-width: 680px; margin: 0 auto 14px; }
.blk-text a { color: var(--accent); }
.blk-text[style*="left"] { margin-left: 0; }
.blk-image { margin: 18px 0; }
.blk-image img { display: inline-block; border-radius: 8px; max-width: 100%; height: auto; }
.blk-cap { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.blk-btnwrap { margin: 18px 0; }
.blk-contact { margin: 10px 0 20px; }

/* Feedback form block */
.blk-form { max-width: 560px; margin: 18px 0 28px; position: relative; }
.blk-form-title { font-size: 22px; margin-bottom: 6px; }
.blk-form-intro { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.blk-form-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.blk-form-row input { flex: 1; min-width: 180px; }
.blk-form input[type="text"], .blk-form input[type="email"], .blk-form textarea {
  background: var(--surface); border: 1.5px solid var(--line); color: var(--ink);
  border-radius: 9px; padding: 11px 13px; font-size: 14px; font-family: inherit; outline: none; width: 100%;
}
.blk-form input:focus, .blk-form textarea:focus { border-color: var(--accent); }
.blk-form textarea { resize: vertical; min-height: 110px; line-height: 1.55; }
.blk-form-foot { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
.blk-form-msg { font-size: 13px; color: var(--muted); }

@media (max-width: 700px) { .wrap { padding: 0 22px; } .nav-link { padding: 8px 8px; } }

/* ---- Gallery pages (shared by /gallery) ---- */
.crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.crumb a:hover { color: var(--ink); }
.g-head { padding: 40px 0 8px; }
.g-head h1 { font-size: 34px; }
.g-head .sub { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 0; }

/* Title card — per-gallery banner with cover, title, description, date */
.gal-hero { position: relative; margin: 26px 0 6px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); min-height: 240px; display: flex; align-items: flex-end; background: var(--surface) center/cover no-repeat; }
.gal-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(12,11,10,0.72) 0%, rgba(12,11,10,0.25) 55%, rgba(12,11,10,0.05) 100%); }
.gal-hero-body { position: relative; padding: 26px 28px; color: #F6F5F2; width: 100%; }
.gal-hero-body .crumb { color: rgba(246,245,242,0.75); margin-bottom: 6px; }
.gal-hero-body .crumb a:hover { color: #fff; }
.gal-hero-body h1 { font-size: clamp(28px, 4.5vw, 44px); line-height: 1.06; }
.gal-hero-body .gdesc { font-size: 14.5px; opacity: 0.88; margin-top: 8px; max-width: 560px; }
.gal-hero-body .gmeta { font-size: 12.5px; opacity: 0.75; margin-top: 8px; letter-spacing: 0.04em; }
/* Title-card variants — banner height */
.gal-hero.gh-h-sm { min-height: 150px; }
.gal-hero.gh-h-lg { min-height: 380px; }
.gal-hero.gh-h-xl { min-height: 62vh; }
/* Text vertical placement */
.gal-hero.gh-pos-top { align-items: flex-start; }
.gal-hero.gh-pos-top::before { background: linear-gradient(to bottom, rgba(12,11,10,0.72) 0%, rgba(12,11,10,0.25) 55%, rgba(12,11,10,0.05) 100%); }
.gal-hero.gh-pos-middle { align-items: center; }
.gal-hero.gh-pos-middle::before { background: rgba(12,11,10,0.45); }
/* Text alignment */
.gal-hero.gh-align-center .gal-hero-body { text-align: center; }
.gal-hero.gh-align-center .gdesc { margin-left: auto; margin-right: auto; }
.gal-hero.gh-align-right .gal-hero-body { text-align: right; }
.gal-hero.gh-align-right .gdesc { margin-left: auto; }
/* Title size */
.gal-hero.gh-size-sm h1 { font-size: clamp(20px, 3vw, 28px); }
.gal-hero.gh-size-lg h1 { font-size: clamp(38px, 6.5vw, 64px); }
/* Title font override */
.gal-hero.gh-font-grotesk h1 { font-family: "Schibsted Grotesk", sans-serif; font-weight: 600; letter-spacing: -0.02em; }
.gal-hero.gh-font-archivo h1 { font-family: "Archivo", sans-serif; font-weight: 650; letter-spacing: -0.03em; }
.gal-hero.gh-font-serif h1 { font-family: "Instrument Serif", serif; font-weight: 400; letter-spacing: 0; }

/* Music embed */
.music-wrap { margin: 14px 0 0; }
.music-wrap iframe { width: 100%; max-width: 660px; border: 0; border-radius: 12px; display: block; }

.gal-hero.no-cover { min-height: 0; background: var(--surface); }
.gal-hero.no-cover::before { display: none; }
.gal-hero.no-cover .gal-hero-body { color: var(--ink); }
.gal-hero.no-cover .crumb { color: var(--muted); }
.gal-hero.no-cover .gdesc, .gal-hero.no-cover .gmeta { color: var(--muted); opacity: 1; }

/* Photo masonry */
.photos { columns: 4; column-gap: 12px; padding: 22px 0 40px; }
.photo { position: relative; break-inside: avoid; margin: 0 0 12px; border-radius: 6px; overflow: hidden; cursor: zoom-in; background: var(--line); }
.photo img { width: 100%; display: block; }
.photo .ph-act { position: absolute; top: 6px; right: 6px; opacity: 0; transition: opacity 0.15s; display: flex; gap: 4px; }
.photo:hover .ph-act, .photo:focus-within .ph-act { opacity: 1; }
.ph-btn { width: 30px; height: 30px; border-radius: 7px; border: none; background: rgba(20,19,18,0.55); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ph-btn:hover { background: rgba(20,19,18,0.78); }

/* PIN gate */
.gate { max-width: 360px; margin: 80px auto; text-align: center; }
.gate h2 { font-size: 22px; margin-bottom: 6px; }
.gate p { color: var(--muted); font-size: 13.5px; margin-bottom: 20px; }
.pin-row { display: flex; gap: 10px; justify-content: center; margin-bottom: 14px; }
.pin-box { width: 48px; height: 58px; text-align: center; font-size: 24px; font-weight: 600; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); outline: none; }
.pin-box:focus { border-color: var(--accent); }
.pin-err { animation: shake 0.4s; }
@keyframes shake { 20%{transform:translateX(-7px)} 40%{transform:translateX(6px)} 60%{transform:translateX(-4px)} 80%{transform:translateX(3px)} }
.gate-msg { font-size: 13px; color: var(--muted); min-height: 18px; }

/* Lightbox */
.lb { position: fixed; inset: 0; z-index: 60; display: none; flex-direction: column; background: rgba(16,15,14,0.96); color: #F2F0EC; }
.lb.on { display: flex; }
.lb-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; }
.lb-meta { font-size: 12.5px; opacity: 0.85; font-family: var(--font-mono); }
.lb-actions { display: flex; gap: 6px; }
.lb-btn { width: 38px; height: 38px; border-radius: 8px; border: none; background: transparent; color: #F2F0EC; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.lb-btn:hover { background: rgba(242,240,236,0.14); }
.lb-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 0 14px 8px; touch-action: pan-y; }
.lb-img { max-width: min(86vw, 1200px); max-height: 100%; border-radius: 4px; }
.lb-arrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(242,240,236,0.25); background: transparent; color: #F2F0EC; cursor: pointer; flex: none; }
.lb-arrow:hover { background: rgba(242,240,236,0.12); }
.lb-cap { text-align: center; font-size: 13px; opacity: 0.8; padding: 0 20px 6px; min-height: 18px; }
.lb-exif { text-align: center; font-size: 11.5px; font-family: var(--font-mono); opacity: 0.6; padding: 0 20px 16px; letter-spacing: 0.03em; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 90; background: var(--ink); color: var(--bg); padding: 10px 20px; border-radius: 999px; font-size: 13px; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.toast.on { opacity: 1; }

@media (max-width: 860px) { .photos { columns: 2; } .lb-arrow { display: none; } }
@media (max-width: 520px) { .photos { columns: 1; } .gal-hero-body { padding: 18px 18px; } }

/* ---- Blog (shared by /blog and /al-aerospace) ---- */
.blog-head { padding: 34px 0 0; }
.blog-title { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.02em; }
.blog-title a { color: inherit; }
.tabbar { display: flex; gap: 28px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-top: 22px; scrollbar-width: none; }
.tabbar::-webkit-scrollbar { display: none; }
.tabbar a { color: var(--muted); font-size: 15px; padding: 12px 0; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color 0.12s; }
.tabbar a:hover { color: var(--ink); }
.tabbar a.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.post-list { padding: 10px 0 60px; }
.post-row { display: flex; gap: 28px; align-items: center; padding: 26px 0; border-bottom: 1px solid var(--line); }
.post-row:hover .pr-title { text-decoration: underline; text-underline-offset: 3px; }
.pr-text { flex: 1; min-width: 0; }
.pr-tab { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.pr-title { font-size: 21px; font-weight: 700; font-family: var(--font-display); letter-spacing: -0.015em; line-height: 1.25; }
.pr-sub { color: var(--muted); font-size: 15px; margin-top: 6px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pr-meta { color: var(--muted); font-size: 13px; margin-top: 10px; }
.pr-cover { flex: none; width: 160px; height: 107px; border-radius: 8px; background: var(--line) center/cover no-repeat; }
@media (max-width: 600px) { .pr-cover { width: 100px; height: 70px; } .post-row { gap: 16px; } }
.article { max-width: 700px; margin: 0 auto; padding: 36px 0 80px; }
.art-tab { font-size: 12.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.article h1.art-title { font-size: clamp(30px, 5vw, 44px); line-height: 1.12; margin-top: 10px; }
.art-sub { color: var(--muted); font-size: 18px; margin-top: 12px; line-height: 1.5; }
.art-meta { color: var(--muted); font-size: 13.5px; margin-top: 16px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.art-cover { margin: 28px 0 8px; }
.art-cover img { width: 100%; border-radius: 10px; display: block; }
.art-body { padding-top: 10px; }
.art-body .blk-text { font-family: "Source Serif 4", Georgia, serif; font-size: 18.5px; line-height: 1.75; max-width: none; }
.art-body .blk-heading { margin-top: 36px; }
.art-body .blk-image { margin: 26px 0; text-align: center; }
.art-back { display: inline-block; margin-top: 40px; color: var(--muted); font-size: 14px; }
.art-back:hover { color: var(--ink); }
.about-body { max-width: 700px; padding: 30px 0 80px; }
.about-body .blk-text { font-family: "Source Serif 4", Georgia, serif; font-size: 18px; line-height: 1.7; }
.draft-note { background: var(--surface); border: 1px dashed var(--muted); color: var(--muted); border-radius: 9px; padding: 8px 14px; font-size: 13px; margin-top: 20px; display: inline-block; }
