/* ============================================================
   PENDMARK - Time Redefined
   Design system: restrained luxury, trade-focused, quietly institutional
   ------------------------------------------------------------
   Brand tokens live in :root. If exact values from the official
   Pendmark brand assets differ, update them here in one place.
   ============================================================ */

:root {
  /* Color - sampled directly from the official Pendmark logo assets */
  --navy: #04172f;          /* wordmark navy - primary brand color */
  --navy-deep: #011229;     /* exact bg of the reversed logo - footer / dark sections */
  --gold: #c19963;          /* logo gold - accent */
  --gold-soft: #d0a566;     /* reversed-logo gold for lines on dark */
  --ivory: #f7f4ee;         /* warm ivory - background */
  --ivory-deep: #f1ecE2;    /* slightly deeper ivory for alternating sections */
  --charcoal: #23252a;      /* body text */
  --gray: #6f7278;          /* secondary text, metadata */
  --line: #e3ddd0;          /* hairline dividers on ivory */
  --line-gold: #cfb98a;     /* gold hairline */
  --white: #ffffff;

  /* Type */
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;

  /* Rhythm - calibrated 8px base, watch-index discipline */
  --s1: 8px;  --s2: 16px; --s3: 24px; --s4: 32px;
  --s5: 48px; --s6: 64px; --s7: 96px; --s8: 128px;

  --maxw: 1180px;
  --radius: 2px;

  --shadow-card: 0 1px 2px rgba(18, 35, 61, 0.06), 0 8px 28px rgba(18, 35, 61, 0.07);
  --shadow-card-hover: 0 2px 4px rgba(18, 35, 61, 0.08), 0 14px 40px rgba(18, 35, 61, 0.12);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--charcoal);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--gold); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 var(--s3);
  letter-spacing: 0.005em;
}
h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }
p  { margin: 0 0 var(--s2); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }

/* Eyebrow - small caps label above headings */
.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--s2);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--gray);
  max-width: 46em;
  line-height: 1.7;
}

/* Gold hairline divider with center dot - watch-index motif */
.divider {
  border: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--line-gold), transparent);
  margin: 0 auto;
  max-width: 320px;
  position: relative;
  overflow: visible;
}
.divider::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

/* Index-mark ornament: three fine ticks, like a dial's minute track */
.index-marks {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin: var(--s3) 0;
}
.index-marks span {
  display: block;
  width: 1px;
  height: 14px;
  background: var(--gold);
  opacity: 0.65;
}
.index-marks span:nth-child(2) { height: 22px; opacity: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 16px 32px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn-primary:hover { background: var(--navy-deep); color: var(--gold-soft); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { border-color: var(--gold); color: var(--navy); background: rgba(185, 154, 95, 0.08); }
.btn-gold { background: transparent; color: var(--gold); border-color: var(--gold); }
.btn-gold:hover { background: var(--gold); color: var(--navy-deep); }
.btn-light { background: var(--ivory); color: var(--navy); border-color: var(--ivory); }
.btn-light:hover { background: var(--white); color: var(--navy); }
.btn-sm { padding: 11px 22px; font-size: 0.75rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 244, 238, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: 14px clamp(20px, 4vw, 40px);
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand-link { display: inline-flex; align-items: center; }
.brand-link img { height: 46px; width: auto; }
.brand-link .brand-mark-sm { display: none; }

.primary-nav { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 30px); }
.primary-nav a {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--charcoal);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.primary-nav a:hover { color: var(--navy); border-bottom-color: var(--gold); }
.primary-nav a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--gold); }
.primary-nav .nav-cta {
  border: 1px solid var(--navy);
  border-radius: var(--radius);
  padding: 10px 18px;
  color: var(--navy);
}
.primary-nav .nav-cta:hover { background: var(--navy); color: var(--white); border-bottom-color: transparent; }

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--navy);
  margin: 5px 0;
  transition: transform .25s ease, opacity .25s ease;
}
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 900px) {
  /* backdrop-filter would create a containing block that traps the
     fixed-position mobile nav inside the header - disable it here */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--ivory); }
  .nav-toggle { display: block; }
  .brand-link img { height: 40px; }
  .primary-nav {
    position: fixed;
    inset: 0;
    top: 0;
    background: var(--navy-deep);
    flex-direction: column;
    justify-content: center;
    gap: var(--s3);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    z-index: 90;
  }
  .nav-open .primary-nav { opacity: 1; pointer-events: auto; }
  .primary-nav a { color: var(--ivory); font-size: 0.95rem; }
  .primary-nav a:hover, .primary-nav a[aria-current="page"] { color: var(--gold-soft); }
  .primary-nav .nav-cta { border-color: var(--gold); color: var(--gold-soft); }
  .nav-open .nav-toggle { position: relative; z-index: 95; }
  .nav-open .nav-toggle span { background: var(--ivory); }
  body.nav-open { overflow: hidden; }
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(72px, 11vw, 140px) 0 clamp(64px, 9vw, 120px);
  text-align: center;
  position: relative;
}
.hero::before {
  /* faint vertical index lines, dial-like discipline */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(18,35,61,0.035) 1px, transparent 1px);
  background-size: 118px 100%;
  background-position: center;
  pointer-events: none;
}
.hero .container { position: relative; }
.hero h1 { max-width: 17em; margin-left: auto; margin-right: auto; }
.hero .lede { margin: var(--s3) auto var(--s4); }
.hero-ctas { display: flex; gap: var(--s2); justify-content: center; flex-wrap: wrap; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-navy { background: var(--navy-deep); color: rgba(247,244,238,0.85); }
.section-navy h2, .section-navy h3 { color: var(--ivory); }
.section-navy .lede { color: rgba(247,244,238,0.66); }
.section-head { text-align: center; max-width: 760px; margin: 0 auto var(--s6); }
.section-head .lede { margin-left: auto; margin-right: auto; }

/* ---------- Card grids ---------- */
.grid { display: grid; gap: var(--s3); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.feature-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s4);
  transition: box-shadow .3s ease, transform .3s ease;
}
.feature-card:hover { box-shadow: var(--shadow-card); }
.feature-card h3 { font-size: 1.3rem; margin-bottom: var(--s1); }
.feature-card p { color: var(--gray); font-size: 0.95rem; margin: 0; }
.feature-card .tick {
  width: 1px; height: 20px; background: var(--gold); margin-bottom: var(--s2);
}
.section-navy .feature-card {
  background: rgba(247,244,238,0.03);
  border-color: rgba(207,185,138,0.25);
}
.section-navy .feature-card h3 { color: var(--ivory); }
.section-navy .feature-card p { color: rgba(247,244,238,0.6); }

/* Numbered process rows */
.process-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: var(--s3);
  padding: var(--s4) 0;
  border-top: 1px solid var(--line);
}
.process-row:last-child { border-bottom: 1px solid var(--line); }
.process-num {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--gold);
}
.process-row h3 { margin-bottom: 6px; }
.process-row p { color: var(--gray); margin: 0; max-width: 56em; }

/* ---------- Inventory cards ---------- */
.inv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); }
@media (max-width: 980px) { .inv-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .inv-grid { grid-template-columns: 1fr; } }

.inv-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .3s ease;
  cursor: pointer;
}
.inv-card:hover { box-shadow: var(--shadow-card-hover); }
.inv-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.inv-media {
  aspect-ratio: 4 / 3;
  background: var(--ivory-deep);
  position: relative;
  overflow: hidden;
}
.inv-media img { width: 100%; height: 100%; object-fit: cover; }
.inv-body { padding: var(--s3); display: flex; flex-direction: column; gap: 4px; flex: 1; }
.inv-brand {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}
.inv-model {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--navy);
  line-height: 1.2;
}
.inv-meta {
  font-size: 0.8rem;
  color: var(--gray);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 2px;
}
.inv-meta span + span::before { content: "·"; margin-right: 10px; color: var(--line-gold); }
.inv-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s2);
  margin-top: auto;
  padding-top: var(--s2);
  border-top: 1px solid var(--line);
}
.inv-price { font-family: var(--serif); font-size: 1.25rem; color: var(--navy); }
.inv-price small { font-family: var(--sans); font-size: 0.7rem; color: var(--gray); letter-spacing: 0.08em; }
.inv-cta {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
}
.inv-card:hover .inv-cta { color: var(--gold); }

/* Status badges */
.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--gray);
}
.badge-available { color: #2e6b46; border-color: #cfe0d5; background: #f2f8f4; }
.badge-reserved  { color: #8a6d2f; border-color: #e6d9b8; background: #faf5e8; }
.badge-incoming  { color: var(--navy); border-color: #ccd4e0; background: #eef1f6; }
.badge-sold      { color: #8c3a34; border-color: #e5cbc8; background: #f9efee; }
.badge-sample    { color: var(--gray); border-color: var(--line); background: var(--white); }
.badge-static { position: static; display: inline-block; }

/* ---------- Showroom filters ---------- */
.filters {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s3);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--s2);
  margin-bottom: var(--s4);
}
.filter-field { display: flex; flex-direction: column; gap: 6px; }
.filter-field label {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gray);
}
.filter-field select {
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--charcoal);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ivory);
  cursor: pointer;
}
.filter-field select:focus { outline: none; border-color: var(--gold); }
.filters-foot {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s2);
  border-top: 1px solid var(--line);
  padding-top: var(--s2);
}
.result-count { font-size: 0.82rem; color: var(--gray); }
.filters-reset {
  background: none; border: none; cursor: pointer;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gray);
  border-bottom: 1px solid var(--line-gold); padding: 0 0 2px;
}
.filters-reset:hover { color: var(--navy); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: var(--s7) var(--s3);
  border: 1px dashed var(--line-gold);
  border-radius: var(--radius);
  color: var(--gray);
}
.empty-state h3 { color: var(--navy); }

/* ---------- Modal (inventory detail) ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 24, 48, 0.55);
  backdrop-filter: blur(3px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: clamp(16px, 4vw, 56px) clamp(12px, 3vw, 32px);
  z-index: 200;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 960px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  position: relative;
}
@media (max-width: 800px) { .modal { grid-template-columns: 1fr; } }
.modal-media { background: var(--ivory-deep); min-height: 320px; }
.modal-media img { width: 100%; height: 100%; object-fit: cover; }
.modal-body { padding: clamp(24px, 4vw, 48px); }
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 38px; height: 38px;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  color: var(--navy);
  z-index: 2;
}
.modal-close:hover { border-color: var(--gold); color: var(--gold); }
.spec-table { width: 100%; border-collapse: collapse; margin: var(--s3) 0; font-size: 0.88rem; }
.spec-table th, .spec-table td { text-align: left; padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th {
  font-weight: 600; color: var(--gray); width: 42%;
  font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
}
.modal-price { font-family: var(--serif); font-size: 1.8rem; color: var(--navy); }
.modal-note { font-size: 0.78rem; color: var(--gray); }

/* ---------- Forms ---------- */
.form-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 48px);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-full { grid-column: 1 / -1; }
.field label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--charcoal);
}
.field label .req { color: var(--gold); }
.field input, .field select, .field textarea {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--charcoal);
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ivory);
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--white);
}
.field textarea { resize: vertical; min-height: 120px; }
.field .hint { font-size: 0.75rem; color: var(--gray); }
.form-actions { margin-top: var(--s4); display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.form-status { font-size: 0.85rem; color: var(--gray); }
.form-status.ok { color: #2e6b46; }
.form-status.err { color: #8c3a34; }
input[type="file"] { padding: 10px; background: var(--ivory); font-size: 0.85rem; }

/* ---------- Login placeholder panel ---------- */
.login-panel {
  background: var(--navy-deep);
  border: 1px solid rgba(207,185,138,0.3);
  border-radius: var(--radius);
  padding: clamp(28px, 4vw, 48px);
  max-width: 460px;
  margin: 0 auto;
  text-align: center;
  color: rgba(247,244,238,0.8);
}
.login-panel h3 { color: var(--ivory); }
.login-panel .field { text-align: left; margin-bottom: var(--s2); }
.login-panel .field label { color: rgba(247,244,238,0.75); }
.login-panel .field input {
  background: rgba(247,244,238,0.06);
  border-color: rgba(247,244,238,0.2);
  color: var(--ivory);
}
.login-panel .field input:focus { border-color: var(--gold); background: rgba(247,244,238,0.1); }
.login-panel .login-note { font-size: 0.8rem; color: rgba(247,244,238,0.55); margin-top: var(--s2); }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band .hero-ctas { margin-top: var(--s4); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: rgba(247,244,238,0.65);
  padding: var(--s6) 0 var(--s4);
  font-size: 0.85rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--s5);
  padding-bottom: var(--s5);
  border-bottom: 1px solid rgba(207,185,138,0.2);
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; gap: var(--s4); } }
.footer-brand img { height: 80px; width: auto; margin-bottom: var(--s2); }
.footer-tagline {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold-soft);
  font-size: 1.05rem;
}
.site-footer h4 {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin: 0 0 var(--s2);
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: rgba(247,244,238,0.75); }
.site-footer a:hover { color: var(--gold-soft); }
.footer-disclaimer {
  padding-top: var(--s4);
  font-size: 0.75rem;
  line-height: 1.7;
  color: rgba(247,244,238,0.45);
  max-width: 62em;
}
.footer-legal {
  display: flex;
  justify-content: space-between;
  gap: var(--s2);
  flex-wrap: wrap;
  margin-top: var(--s3);
  font-size: 0.75rem;
  color: rgba(247,244,238,0.4);
}

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-2 { margin-top: var(--s2); }
.mt-4 { margin-top: var(--s4); }
.mt-6 { margin-top: var(--s6); }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 10px 18px;
  z-index: 300;
}
.skip-link:focus { left: 0; }

/* Reveal on scroll - subtle, no flash */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
