/* 
   martinworks shared design system for sub-pages
   (Home lives in MartinWorks.html; this styles portfolio.html,
   shop.html, and any future pages so they match exactly.)
   Palette + type pulled straight from the main scroller.
    */

:root {
  --bg:        #141210;    /* page background           */
  --bg-card:   #1c1814;  /* card / panel background   */
  --bg-card-2: #221e18;  /* card hover                */
  --line:      #3a3028;  /* hairlines / borders       */
  --gold:      #c8922a;  /* primary gold              */
  --gold-lite: #e8b44a;  /* bright gold (hover)       */
  --gold-mid:  #7a5518;  /* decorative gold (star/accents) */
  --gold-tag:  #b3893a;  /* readable gold (tags, small labels) */
  --ink:       #e8dfc8;  /* primary text (parchment)  */
  --ink-2:     #a8987a;  /* secondary text            */
  --ink-dim:   #988b6c;  /* dim-but-readable text      */
}

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

html { scroll-behavior: smooth; scroll-padding-top: 70px; }

body {
  margin: 0;

      /* subtle fixed backdrop: two faint gold glows + a barely-there dot grid.
         background-attachment:fixed keeps it still so content drifts over it as you scroll. */
  
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 55% at 12% 0%, rgba(200,146,42,0.045), transparent 60%),
    radial-gradient(ellipse 60% 55% at 92% 100%, rgba(200,146,42,0.03), transparent 60%),
    radial-gradient(rgba(200,146,42,0.022) 1px, transparent 1.4px);
  background-size: auto, auto, 26px 26px;
  background-attachment: fixed;
  background-repeat: no-repeat, no-repeat, repeat;
  color: var(--ink);
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold-mid); color: var(--ink); }

a { color: inherit; }

/* adjust layout here? */
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 clamp(1.4rem, 4vw, 2.5rem); }
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }

/* top accent + nav */
.topbar { height: 3px; background: linear-gradient(90deg, transparent, var(--gold-mid), var(--gold), var(--gold-mid), transparent); }

.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(20,18,16,0.72);
  border-bottom: 1px solid rgba(232,223,200,0.08);
  backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; height: 60px;
  /* full-width bar, content centered in a 1120px band to match the new pages */
  padding: 0 max(24px, calc(50% - 536px));
}


.brand {
  font-family: 'Bricolage Grotesque', sans-serif; font-size: 19px; font-weight: 700;
  letter-spacing: -0.01em; color: var(--ink); text-transform: none;
  text-decoration: none; white-space: nowrap;
}

.brand span { color: var(--gold); font-weight: 700; }

.nav-links { display: flex; gap: 2rem; list-style: none; margin: 0 0 0 auto; padding: 0; align-items: center; }
.nav-links a {
  font-family: 'Hanken Grotesk', sans-serif; font-size: 14.5px; letter-spacing: 0;
  color: var(--ink-2); text-decoration: none; text-transform: none;
  transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold-lite); }
.nav-links a.active { color: var(--gold); }

.nav-cta {
  font-family: 'Hanken Grotesk', sans-serif; font-weight: 600; font-size: 14px; letter-spacing: 0;
  text-transform: none; color: #141210; background: var(--gold); border: 1px solid var(--gold);
  padding: 9px 18px; text-decoration: none; white-space: nowrap;
  transition: transform .18s ease, box-shadow .25s ease, background .2s, color .2s;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 34px -10px rgba(200,146,42,.55); background: var(--gold-lite); color: #141210; }

/* mobile hamburger because it didnt exist on mobile (hidden on desktop, shown under 760px) */
.nav-burger {
  display: none;
  width: 42px; height: 42px; margin-left: 0.25rem; padding: 0;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-burger span {
  display: block; width: 22px; height: 2px; background: var(--gold);
  transition: transform .25s ease, opacity .2s ease;
}
.site-nav.nav-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-nav.nav-open .nav-burger span:nth-child(2) { opacity: 0; }
.site-nav.nav-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* type helpers */
.eyebrow {
  font-family: 'Bricolage Grotesque', sans-serif; font-size: 10px; letter-spacing: 0.3em;
  color: var(--gold); text-transform: uppercase; margin: 0 0 0.7rem;
  display: inline-flex; align-items: center; gap: 10px;
}
/* single left rule, matching the new pages (no flanking lines that read as dashes) */
.eyebrow::before { content: ""; display: block; width: 22px; height: 1px; background: var(--gold); opacity: .6; }
.eyebrow .rule { display: none; }
h1.page-title {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 900; color: var(--ink);
  font-size: clamp(2.6rem, 7vw, 5rem); line-height: 1.02; letter-spacing: -0.01em; margin: 0;
}
h2.sec-title {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; color: var(--ink);
  font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1.15; margin: 0 0 1.2rem;
}
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 600px; line-height: 1.85; font-style: italic; }

/*  group header (the two top-level portfolio groups) */
.group-head { text-align: center; padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(1rem, 2vw, 1.5rem); }
.group-head .eyebrow { justify-content: center; }
.group-title { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 900; color: var(--ink); font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.05; letter-spacing: -0.01em; margin: 0; }
.sec-desc { color: var(--ink-2); font-style: italic; max-width: 640px; margin: 0 0 0.5rem; }

/* intro band (slim hero for sub-pages) */
.intro {
  position: relative; text-align: center; overflow: hidden;
  padding: clamp(4rem, 9vw, 7rem) 0 clamp(2.5rem, 5vw, 4rem);
  background: radial-gradient(ellipse 80% 70% at 50% 30%, rgba(200,146,42,0.07), transparent 70%);
}
.intro .eyebrow { justify-content: center; }
.intro .lead { margin: 1.6rem auto 0; }

/* divider (line · star · line) */
.divider { display: none; } /* ornamental star divider removed for a cleaner look */
.divider .ln { flex: 1; height: 1px; background: var(--line); }
.divider .star { color: var(--gold-mid); font-family: 'Bricolage Grotesque', sans-serif; font-size: 18px; }

/* buttons and all their glory */
.btn {
  display: inline-block; font-family: 'Bricolage Grotesque', sans-serif; font-size: 12px;
  letter-spacing: 0.14em; text-transform: uppercase; padding: 14px 36px;
  text-decoration: none; transition: all .2s; cursor: pointer; border: 1px solid transparent;
}
.btn-solid  { color: var(--bg); background: var(--gold); }
.btn-solid:hover { background: var(--gold-lite); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(200,146,42,0.22); }
.btn-outline { color: var(--ink-2); background: transparent; border-color: var(--line); }
.btn-outline:hover { border-color: var(--gold-mid); color: var(--ink); background: rgba(200,146,42,0.07); transform: translateY(-2px); }

/*  project grid + cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 2.5rem; }
.card {
  background: var(--bg-card); border: 1px solid var(--line); overflow: hidden;
  transition: border-color .25s, transform .25s;
  display: flex; flex-direction: column;
}
.card:hover { border-color: var(--gold-mid); transform: translateY(-3px); }
.card-media { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.card-count {
  position: absolute; top: 0.6rem; right: 0.6rem; z-index: 2;
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(20,18,16,0.82); border: 1px solid var(--gold-mid);
  color: var(--gold-lite); font-family: 'Bricolage Grotesque', sans-serif; font-size: 0.62rem;
  letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 8px; pointer-events: none;
}


.card-count svg { width: 12px; height: 12px; }
.card-cat {
  position: absolute; left: 0; right: 0; bottom: 0; pointer-events: none;
  background: linear-gradient(transparent, rgba(20,18,16,0.95));
  padding: 2rem 1rem 0.8rem; font-family: 'Bricolage Grotesque', sans-serif; font-size: 0.8rem;
  color: var(--gold); letter-spacing: 0.1em; text-transform: uppercase;
}
.card-body { padding: 1.2rem 1.3rem 1.5rem; flex: 1; }
.card-title { font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.02rem; font-weight: 700; color: var(--ink); margin: 0 0 0.4rem; }
.card-desc { font-size: 0.9rem; color: var(--ink-dim); font-style: italic; margin: 0; }
.card-meta { font-family: 'Bricolage Grotesque', sans-serif; font-size: 0.72rem; letter-spacing: 0.08em; color: var(--gold-tag); text-transform: uppercase; margin: 0.7rem 0 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 0.8rem; }
.tag {
  font-family: 'Bricolage Grotesque', sans-serif; font-size: 9px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gold-tag); border: 1px solid var(--line); padding: 3px 9px;
}

/* image placeholder: swap the whole .ph div for an <img> when you have art because some of it still isnt made....  */
.ph {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0.5rem;
  background:
    repeating-linear-gradient(45deg, rgba(200,146,42,0.025) 0 10px, transparent 10px 20px),
    var(--bg-card-2);
  color: #5a4f3a; border-bottom: 1px solid var(--line);
}
.ph svg { width: 26px; height: 26px; opacity: 0.6; }
.ph span { font-family: 'Bricolage Grotesque', sans-serif; font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; }

/* featured project (image next to text) */
.featured { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; margin-top: 2.5rem; }
.featured .card-media { aspect-ratio: 16/11; border: 1px solid var(--line); }
.featured h3 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; color: var(--ink); font-size: clamp(1.4rem, 3vw, 2rem); margin: 0 0 1rem; line-height: 1.2; }
.featured p { color: var(--ink-2); margin: 0 0 1rem; line-height: 1.8; }

/* ---- lightbox / image viewer ---- */
.lb { position: fixed; inset: 0; z-index: 1000; display: none; background: rgba(10,9,8,0.96); backdrop-filter: blur(4px); }
.lb.open { display: grid; grid-template-rows: auto 1fr auto; }
.lb-top { position: relative; text-align: center; padding: 1rem clamp(2.6rem,7vw,3.4rem); border-bottom: 1px solid var(--line); }
.lb-head { min-width: 0; }
.lb-cat { display: block; font-family: 'Bricolage Grotesque', sans-serif; color: var(--gold); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; }
.lb-title { display: block; font-family: 'Bricolage Grotesque', sans-serif; color: var(--ink); font-size: 1.05rem; font-weight: 700; margin-top: 0.15rem; }
.lb-close { position: absolute; top: 50%; right: clamp(0.6rem,2.5vw,1.4rem); transform: translateY(-50%); background: none; border: 0; color: var(--ink-2); font-size: 2.1rem; line-height: 1; cursor: pointer; padding: 0 0.4rem; transition: color .2s; }
.lb-close:hover { color: var(--gold-lite); }
.lb-stage { grid-row: 2; position: relative; display: flex; align-items: center; justify-content: center; padding: 1rem clamp(3.5rem,9vw,5.5rem); min-height: 0; }
.lb-img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 12px 50px rgba(0,0,0,0.55); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(20,18,16,0.72); border: 1px solid var(--line); color: var(--gold); font-size: 1.5rem; width: 46px; height: 64px; cursor: pointer; transition: background .2s, color .2s; }
.lb-nav:hover { background: var(--gold); color: var(--bg); }
.lb-prev { left: clamp(0.4rem, 2vw, 1.4rem); }
.lb-next { right: clamp(0.4rem, 2vw, 1.4rem); }
.lb-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.85rem clamp(1rem,4vw,2.2rem); border-top: 1px solid var(--line); }
.lb-desc { color: var(--ink-dim); font-style: italic; font-size: 0.9rem; min-width: 0; }
.lb-count { flex: none; font-family: 'Bricolage Grotesque', sans-serif; letter-spacing: 0.12em; color: var(--gold-tag); font-size: 0.85rem; }
@media (max-width: 600px) {
  .lb-stage { padding: 0.6rem 3rem; }
  .lb-nav { width: 38px; height: 52px; font-size: 1.25rem; }
  .lb-title { font-size: 0.92rem; }
}

/* ---- downloadable assets + pixel art ---- */
.card-img.pix, .lb-img.pix { image-rendering: -moz-crisp-edges; image-rendering: pixelated; }
.card-dl {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 0.95rem;
  font-family: 'Bricolage Grotesque', sans-serif; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--gold-mid); padding: 7px 14px;
  text-decoration: none; transition: background .2s, color .2s;
}
.card-dl:hover { background: var(--gold); color: var(--bg); }
.card-dl svg { width: 14px; height: 14px; }
.lb-foot-right { display: inline-flex; align-items: center; gap: 1.2rem; }
.lb-dl {
  font-family: 'Bricolage Grotesque', sans-serif; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--gold-mid); padding: 6px 14px; text-decoration: none;
  white-space: nowrap; transition: background .2s, color .2s;
}
.lb-dl:hover { background: var(--gold); color: var(--bg); }
.lb-dl[hidden] { display: none; }
.card-soon { opacity: 0.72; }
.card-soon .ph { color: var(--gold-tag); }

/* ---- footer ---- */
.site-footer {
  border-top: 1px solid var(--line); margin-top: 2rem;
  padding: 2rem clamp(1.4rem, 4vw, 2.5rem);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.site-footer .credit { font-family: 'Bricolage Grotesque', sans-serif; font-size: 12px; color: var(--ink-dim); letter-spacing: 0.12em; }
.site-footer ul { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.site-footer a {
  font-family: 'Bricolage Grotesque', sans-serif; font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-dim); text-decoration: none; transition: color .2s;
}
.site-footer a:hover { color: var(--gold); }

/* ---- contact form ---- */
.form-panel { position: relative; border: 1px solid var(--line); background: var(--bg-card); padding: clamp(1.8rem, 4vw, 3rem); max-width: 640px; margin: 2.5rem auto 0; }
.form-panel .corner { position: absolute; width: 18px; height: 18px; border: solid var(--gold-mid); }
.form-panel .tl { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.form-panel .br { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.field { margin-bottom: 1.2rem; }
.field label { display: block; font-family: 'Bricolage Grotesque', sans-serif; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-tag); margin-bottom: 0.5rem; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--ink);
  font-family: 'Hanken Grotesk', sans-serif; font-size: 1rem; padding: 0.75rem 0.9rem; outline: none;
  transition: border-color .2s; border-radius: 10px;
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); }
.field input::placeholder, .field textarea::placeholder { color: #6f6450; }
.field select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 2.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23c8922a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.95rem center; background-size: 12px 8px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin-top: 0.4rem; }
.form-actions button.btn { border: 1px solid transparent; }
.form-status { font-style: italic; color: var(--ink-2); margin: 0; }
.form-status.ok   { color: #9ec08a; }
.form-status.err,
.form-status.warn { color: var(--gold-lite); }
.contact-alt { text-align: center; margin-top: 2rem; color: var(--ink-dim); font-style: italic; }
.contact-alt a { color: var(--gold); text-decoration: none; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }

/* ---- responsive ---- */
@media (max-width: 760px) {
  .nav-burger { display: flex; }
  .nav-cta { display: none; }
  .nav-links {
    position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(20,18,16,0.98);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(8px);
    max-height: 0; overflow: hidden;
    transition: max-height .3s ease;
  }
  .site-nav.nav-open .nav-links { max-height: 75vh; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block; text-align: center;
    padding: 0.95rem 1rem; font-size: 12px;
    border-top: 1px solid var(--line);
  }
  .featured { grid-template-columns: 1fr; }
}
@media (min-width: 1000px) {
  /* centre a lone trailing card so it never hangs left (matches the home page) */
  .grid.center-orphan { grid-template-columns: repeat(3, 1fr); }
  .grid.center-orphan > .card:last-child:nth-child(3n+1) { grid-column: 1 / -1; justify-self: center; width: 100%; max-width: calc((100% - 3rem) / 3); }
}
@media (min-width: 620px) and (max-width: 999px) {
  .grid.center-orphan { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   MODERN BLEND, align these pages with index.html / site.css:
   rounded surfaces, pill buttons, mono labels, cinematic vignette.
   ============================================================ */
.card, .form-panel, .ph { border-radius: 12px; }
.card { transition: border-color .25s, transform .25s; }
.card:hover { transform: translateY(-3px); }
.btn, .btn-solid, .btn-outline, .nav-cta { border-radius: 100px; }
.tag, .card-count { border-radius: 100px; }
.featured .card-media { border-radius: 12px; }
/* Bricolage reads tighter than Cinzel, retune heading spacing */
.brand { letter-spacing: -0.01em; }
.page-title, .sec-title, .group-title, .card-title { letter-spacing: -0.012em; }
.eyebrow, .card-cat, .card-meta, .tag { font-family: 'JetBrains Mono', monospace; }
/* cinematic vignette, matching the new pages (nav/lightbox sit above it) */
body::after { content:""; position:fixed; inset:0; pointer-events:none; z-index:40; box-shadow: inset 0 0 260px 20px rgba(0,0,0,.5); }
.site-nav { z-index: 100; }

/* ---- Services dropdown (matches the home nav) ---- */
.nav-dd { position: relative; }
.nav-dd-toggle { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.dd-caret { font-size: 9px; transition: transform .25s, color .2s; }
.nav-dd:hover .dd-caret, .nav-dd:focus-within .dd-caret { transform: rotate(180deg); color: var(--gold); }
.nav-dd::after { content: ""; position: absolute; top: 100%; left: -14px; right: -14px; height: 16px; }
.nav-dd-menu {
  position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%) translateY(6px);
  min-width: 190px; background: var(--bg-card); border: 1px solid var(--gold-mid);
  border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s;
  box-shadow: 0 24px 60px -22px rgba(0,0,0,0.8); z-index: 120;
}
.nav-dd:hover .nav-dd-menu, .nav-dd:focus-within .nav-dd-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav-dd-menu a {
  font-family: 'Hanken Grotesk', sans-serif; font-size: 14px; letter-spacing: 0.01em;
  color: var(--ink-2); padding: 9px 14px; border-radius: 8px; text-transform: none;
  transition: background .18s, color .18s; white-space: nowrap; display: flex; align-items: center; gap: 10px;
}
.nav-dd-menu a::before { content: ""; width: 5px; height: 5px; border-radius: 1px; background: var(--gold); opacity: 0; transition: opacity .18s; }
.nav-dd-menu a:hover { background: var(--bg-card-2); color: var(--gold-lite); }
.nav-dd-menu a:hover::before { opacity: 1; }
@media (max-width: 760px){
  .site-nav .nav-dd-menu { display: none; }
  .site-nav .nav-dd { width: 100%; }
}
