/* ==========================================================================
   JPK Watches — stylesheet
   Palette: gunmetal case, aged-brass accent, lume-green highlight
   ========================================================================== */

:root {
  --bg:            #0d0f12;
  --bg-raised:     #14171c;
  --bg-sunken:     #090a0d;
  --line:          #232830;
  --line-bright:   #333a45;

  --text:          #e8e6e1;
  --text-dim:      #a0a5ad;
  --text-faint:    #6b7280;

  --brass:         #c8a250;
  --brass-bright:  #e3c179;
  --lume:          #8fd9b6;
  --rust:          #b5674a;

  --font-display:  "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body:     -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono:     "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --wrap:          1140px;
  --radius:        3px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--brass-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* Small caps label used above section headings ---------------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 .75rem;
}

.lede {
  font-size: 1.1rem;
  color: var(--text-dim);
  max-width: 62ch;
}

/* ==========================================================================
   Header / navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 15, 18, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: .01em;
}
.brand:hover { text-decoration: none; color: var(--brass-bright); }
.brand svg { flex: none; }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  display: block;
  padding: 7px 13px;
  border-radius: var(--radius);
  color: var(--text-dim);
  font-size: .93rem;
}
.nav a:hover { color: var(--text); background: var(--bg-raised); text-decoration: none; }
.nav a.is-active { color: var(--brass); }

.nav a.nav-cta {
  color: var(--bg);
  background: var(--brass);
  font-weight: 600;
}
.nav a.nav-cta:hover { background: var(--brass-bright); color: var(--bg); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-bright);
  color: var(--text);
  border-radius: var(--radius);
  padding: 8px 11px;
  font-size: .9rem;
  cursor: pointer;
}

@media (max-width: 800px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--line);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 11px 14px; }
  .nav a.nav-cta { text-align: center; margin-top: 6px; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 420px at 78% 12%, rgba(200, 162, 80, .10), transparent 65%),
    linear-gradient(180deg, var(--bg-sunken), var(--bg));
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 56px;
  align-items: center;
  padding-top: 84px;
  padding-bottom: 84px;
}

.hero h1 { margin-bottom: .35em; }
.hero h1 em {
  font-style: italic;
  color: var(--brass);
}

.hero-art {
  display: flex;
  justify-content: center;
}
.hero-art svg {
  width: 100%;
  max-width: 330px;
  height: auto;
  filter: drop-shadow(0 22px 40px rgba(0, 0, 0, .6));
}

@media (max-width: 860px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 52px;
    padding-bottom: 52px;
  }
  .hero-art { order: -1; }
  .hero-art svg { max-width: 220px; }
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--brass); color: #16130a; }
.btn-primary:hover { background: var(--brass-bright); }

.btn-ghost {
  background: transparent;
  border-color: var(--line-bright);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--brass); color: var(--brass-bright); }

/* ==========================================================================
   Sections
   ========================================================================== */

.section { padding: 76px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-sunken { background: var(--bg-sunken); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 38px;
}
.section-head h2 { margin-bottom: 0; }
.section-head .link-more {
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .section { padding: 54px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* Page banner (interior pages) -------------------------------------------- */
.page-head {
  padding: 62px 0 46px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-sunken), var(--bg));
}
.page-head h1 { margin-bottom: .3em; }

/* ==========================================================================
   Card grids
   ========================================================================== */

.grid {
  display: grid;
  gap: 22px;
}
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }

.card {
  display: flex;
  flex-direction: column;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .18s, transform .18s;
}
.card:hover { border-color: var(--line-bright); transform: translateY(-2px); }

.card-art {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-sunken);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card-art svg, .card-art img { width: 100%; height: 100%; object-fit: cover; }

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-body h3 { margin-bottom: .4em; }
.card-body p {
  color: var(--text-dim);
  font-size: .93rem;
  margin-bottom: 1em;
}
.card-foot { margin-top: auto; }

/* Tag / pill -------------------------------------------------------------- */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid var(--line-bright);
  border-radius: 100px;
  color: var(--text-faint);
}
.tag-brass { border-color: rgba(200, 162, 80, .45); color: var(--brass); }
.tag-lume  { border-color: rgba(143, 217, 182, .35); color: var(--lume); }

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

/* ==========================================================================
   Product cards (affiliate showcase)
   ========================================================================== */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-btn {
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: 7px 13px;
  background: transparent;
  border: 1px solid var(--line-bright);
  border-radius: 100px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all .15s;
}
.filter-btn:hover { color: var(--text); border-color: var(--text-faint); }
.filter-btn.is-active {
  background: var(--brass);
  border-color: var(--brass);
  color: #16130a;
  font-weight: 600;
}

.search-box {
  margin-left: auto;
  flex: 0 1 230px;
}
.search-box input {
  width: 100%;
  padding: 9px 13px;
  background: var(--bg-sunken);
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: .9rem;
}
.search-box input:focus {
  outline: none;
  border-color: var(--brass);
}
.search-box input::placeholder { color: var(--text-faint); }

@media (max-width: 640px) {
  .search-box { margin-left: 0; flex-basis: 100%; }
}

.product-card .card-art { aspect-ratio: 1 / 1; }

.product-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.price {
  font-family: var(--font-mono);
  font-size: 1.02rem;
  color: var(--lume);
  white-space: nowrap;
}
.price small {
  display: block;
  font-size: .68rem;
  color: var(--text-faint);
  letter-spacing: .06em;
  text-align: right;
}

.seller {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--text-faint);
  text-transform: uppercase;
}

.spec-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  font-size: .84rem;
  border-top: 1px solid var(--line);
}
.spec-list li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.spec-list dt, .spec-list .k { color: var(--text-faint); }
.spec-list .v { color: var(--text-dim); text-align: right; font-family: var(--font-mono); font-size: .8rem; }

.btn-buy {
  display: block;
  width: 100%;
  text-align: center;
  padding: 11px 16px;
  background: transparent;
  border: 1px solid var(--brass);
  border-radius: var(--radius);
  color: var(--brass);
  font-weight: 600;
  font-size: .92rem;
}
.btn-buy:hover {
  background: var(--brass);
  color: #16130a;
  text-decoration: none;
}

.buy-note {
  margin: 8px 0 0;
  font-size: .72rem;
  color: var(--text-faint);
  text-align: center;
}

.ribbon {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 100px;
  background: rgba(13, 15, 18, .9);
  border: 1px solid var(--brass);
  color: var(--brass);
}

.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-faint);
  border: 1px dashed var(--line-bright);
  border-radius: var(--radius);
}

/* ==========================================================================
   Disclosure callout — required for affiliate links
   ========================================================================== */

.disclosure {
  display: flex;
  gap: 16px;
  padding: 20px 22px;
  margin-bottom: 34px;
  background: rgba(200, 162, 80, .06);
  border: 1px solid rgba(200, 162, 80, .3);
  border-left-width: 3px;
  border-radius: var(--radius);
}
.disclosure svg { flex: none; margin-top: 3px; }
.disclosure p { margin: 0; font-size: .9rem; color: var(--text-dim); }
.disclosure strong { color: var(--text); }
.disclosure p + p { margin-top: .6em; }

/* ==========================================================================
   Build / journal entries
   ========================================================================== */

.build {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
}
.build:last-child { border-bottom: 0; }

.build-art svg { width: 100%; height: auto; border-radius: var(--radius); }

.build h3 { font-size: 1.5rem; }

@media (max-width: 760px) {
  .build { grid-template-columns: 1fr; gap: 20px; }
  .build-art { max-width: 240px; }
}

.parts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
  margin: 4px 0 0;
}
.parts-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 500;
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--line-bright);
}
.parts-table td {
  padding: 9px 12px 9px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text-dim);
  vertical-align: top;
}
.parts-table td:last-child { text-align: right; font-family: var(--font-mono); color: var(--text); white-space: nowrap; }
.parts-table tr:last-child td { border-bottom: 0; }
.parts-table tfoot td {
  border-top: 1px solid var(--line-bright);
  color: var(--text);
  font-weight: 600;
  padding-top: 12px;
}

.table-scroll { overflow-x: auto; }

/* Journal ----------------------------------------------------------------- */
.entry {
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}
.entry:last-child { border-bottom: 0; }

.entry-date {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.entry h3 { margin-bottom: .45em; }
.entry p:last-child { margin-bottom: 0; }

/* Callout ----------------------------------------------------------------- */
.callout {
  padding: 18px 22px;
  border-left: 3px solid var(--rust);
  background: rgba(181, 103, 74, .07);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 22px 0;
}
.callout p { margin: 0; font-size: .93rem; color: var(--text-dim); }
.callout strong { color: var(--text); }

/* Stat strip -------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat {
  background: var(--bg-raised);
  padding: 22px 20px;
  text-align: center;
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--brass);
  line-height: 1.1;
}
.stat span {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* Prose ------------------------------------------------------------------- */
.prose { max-width: 68ch; }
.prose ul, .prose ol { color: var(--text-dim); padding-left: 1.3em; }
.prose li { margin-bottom: .5em; }
.prose h3 { margin-top: 1.8em; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-sunken);
  padding: 52px 0 34px;
  font-size: .89rem;
  color: var(--text-faint);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 38px;
}
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
}

.site-footer h4 {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 7px; }
.site-footer a { color: var(--text-faint); }
.site-footer a:hover { color: var(--brass); }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  font-size: .82rem;
}

/* Utilities --------------------------------------------------------------- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
