/* ============================================================
   HARRINGTON WATCH — Shared Stylesheet
   WCAG 2.2 AA compliant | Dark luxury aesthetic
   Playfair Display (display) + Inter (body)
   ============================================================ */

/* === RESET & CUSTOM PROPERTIES === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Colors — all contrast ratios verified against WCAG 2.2 AA */
  --bg:           #0A0A0A;   /* base background */
  --surface:      #141414;   /* card / section surface */
  --surface-alt:  #1E1E1E;   /* hover / deeper surface */
  --border:       #2C2C2C;   /* subtle border */
  --text:         #F0EBE1;   /* primary text — 17.6:1 on --bg ✓ */
  --text-muted:   #8E8E8E;   /* secondary text — 5.3:1 on --bg ✓ */
  --gold:         #C9A84C;   /* accent — 9.1:1 on --bg ✓ */
  --gold-light:   #E0BF6A;   /* hover state */
  --error:        #FF7A7A;   /* form error — 5.8:1 on --bg ✓ */

  /* Typography */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  /* Scale (fluid between 375px–1280px) */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  clamp(1.75rem, 4vw, 2.25rem);
  --text-4xl:  clamp(2rem,  5vw, 3rem);
  --text-hero: clamp(2.5rem, 7vw, 4.5rem);

  /* Spacing */
  --s1: 0.25rem; --s2: 0.5rem; --s3: 0.75rem; --s4: 1rem;
  --s5: 1.25rem; --s6: 1.5rem; --s8: 2rem;  --s10: 2.5rem;
  --s12: 3rem;  --s16: 4rem;  --s20: 5rem;  --s24: 6rem;

  /* Layout */
  --max-w: 1200px;
  --nav-h: 96px;
  --radius: 3px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

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

/* ============================================================
   SKIP LINK
   ============================================================ */
.skip-link {
  position: absolute;
  top: -200%;
  left: var(--s4);
  z-index: 10000;
  padding: var(--s2) var(--s6);
  background: var(--gold);
  color: var(--bg);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius);
  transition: top 0.15s ease;
}
.skip-link:focus { top: var(--s4); }

/* ============================================================
   GLOBAL FOCUS
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--radius);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

p { max-width: 68ch; }
p + p { margin-top: var(--s4); }

a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--gold-light); }

strong { font-weight: 700; }

.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--s4);
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--s6);
}
@media (max-width: 640px) { .container { padding-inline: var(--s4); } }

/* ============================================================
   GOLD HAIRLINE — signature element
   A reference to the precision of a watch bezel / case edge
   ============================================================ */
.rule {
  display: block;
  width: 48px;
  height: 1px;
  background: var(--gold);
  margin-block: var(--s8);
}
.rule--center { margin-inline: auto; }
.rule--full    { width: 100%; }

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  background: rgba(10, 10, 10, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.site-header .container {
  width: 100%;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo img { height: 34px; width: auto; }
.nav-logo:focus-visible { outline-offset: 4px; }

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--s8);
}

.nav-links a {
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  padding-block: var(--s2);
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--s2);
  color: var(--text);
  line-height: 1;
}
.nav-toggle[aria-expanded="true"] .bar-top    { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar-mid    { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar-bottom { transform: translateY(-7px) rotate(-45deg); }
.bar { display: block; width: 22px; height: 2px; background: var(--text); transition: transform 0.2s, opacity 0.2s; }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding-block: var(--s4);
    display: none;
    z-index: 199;
  }
  .nav-links.is-open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: var(--s3) var(--s6);
    border-bottom: none;
    border-left: 2px solid transparent;
  }
  .nav-links a:hover,
  .nav-links a[aria-current="page"] {
    border-left-color: var(--gold);
    border-bottom: none;
    background: var(--surface-alt);
  }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  filter: brightness(0.3) saturate(0.8);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding: var(--s20) var(--s6);
}

.hero h1 { color: var(--text); margin-bottom: var(--s6); }

.hero-sub {
  font-size: var(--text-lg);
  color: #B8B3AA;  /* 4.6:1 on --bg ✓ */
  margin-bottom: var(--s10);
  max-width: 480px;
  margin-inline: auto;
  margin-bottom: var(--s10);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  padding: 0.875rem 2rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
  line-height: 1;
  white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.btn-primary { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.btn-primary:hover { background: var(--gold-light); color: var(--bg); border-color: var(--gold-light); transform: translateY(-1px); }

.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

.btn-ghost { background: transparent; color: var(--gold); border-color: var(--gold); }
.btn-ghost:hover { background: var(--gold); color: var(--bg); }

/* ============================================================
   SECTIONS — HOME
   ============================================================ */
.section { padding-block: var(--s24); }
.section-sm { padding-block: var(--s16); }

.section-intro { max-width: 560px; }
.section-intro.center { margin-inline: auto; text-align: center; }
.section-intro p { color: var(--text-muted); margin-top: var(--s4); }

/* Feature cards */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--s6);
  margin-top: var(--s12);
}

.feature-card {
  padding: var(--s8);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.feature-card h3 { font-size: var(--text-xl); margin-bottom: var(--s3); }
.feature-card p  { font-size: var(--text-sm); color: var(--text-muted); max-width: none; }

/* About band */
.about-band {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.about-band .inner { max-width: 680px; margin-inline: auto; }
.about-band p { color: var(--text-muted); margin-inline: auto; }

/* ============================================================
   SHOP — LISTING PAGE
   ============================================================ */
.page-header {
  padding-block: var(--s16) var(--s8);
  border-bottom: 1px solid var(--border);
}
.page-header h1 { font-size: var(--text-4xl); }

/* Filter bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2);
  padding-block: var(--s6);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s10);
}
.filter-bar p {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: var(--s2);
  max-width: none;
}

.filter-btn {
  padding: var(--s2) var(--s4);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.06em;
  background: none;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
}
.filter-btn:hover { border-color: var(--gold); color: var(--gold); }
.filter-btn[aria-pressed="true"] {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
  font-weight: 700;
}
.filter-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--s6);
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}
.product-card:hover { border-color: var(--gold); transform: translateY(-2px); }

.product-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-card-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 0;
}

.product-img {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--surface-alt);
}
.product-img img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  transition: transform 0.35s ease;
}
.product-card:hover .product-img img { transform: scale(1.04); }

.product-body {
  padding: var(--s5);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  flex: 1;
}

.product-cat {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
}

.product-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--text);
  line-height: 1.2;
}

.product-price {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text);
  padding-top: var(--s3);
  margin-top: auto;
  border-top: 1px solid var(--border);
}

/* ============================================================
   PRODUCT DETAIL PAGE
   ============================================================ */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2);
  font-size: var(--text-sm);
  color: var(--text-muted);
  padding-block: var(--s8);
  list-style: none;
}
.breadcrumb li { display: flex; align-items: center; gap: var(--s2); }
.breadcrumb a { color: var(--text-muted); text-decoration: underline; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb [aria-current="page"] { color: var(--text); }
.breadcrumb-sep { color: var(--border); user-select: none; }

.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s16);
  align-items: start;
  padding-bottom: var(--s24);
}
@media (max-width: 768px) {
  .product-detail-layout { grid-template-columns: 1fr; gap: var(--s8); }
}

.product-gallery {
  position: sticky;
  top: calc(var(--nav-h) + var(--s4));
}

.gallery-main {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }

/* Product info */
.product-info { padding-top: var(--s4); }
.product-info h1 { font-size: var(--text-4xl); margin-bottom: var(--s3); }

.product-price-lg {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--gold);
  font-family: var(--font-display);
  margin-bottom: var(--s6);
}

.product-desc {
  color: var(--text-muted);
  font-size: var(--text-base);
  line-height: 1.8;
  margin-bottom: var(--s8);
  max-width: none;
}

/* Specs table */
.specs-section { margin-bottom: var(--s8); }
.specs-section h2 {
  font-size: var(--text-xl);
  margin-bottom: var(--s5);
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--border);
}

.specs-group { margin-bottom: var(--s6); }
.specs-group h3 {
  font-size: var(--text-sm);
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--s3);
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.specs-table th, .specs-table td {
  padding: var(--s3) var(--s4);
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.specs-table th {
  background: var(--surface);
  font-weight: 600;
  color: var(--text);
  width: 42%;
}
.specs-table td { color: var(--text-muted); background: var(--bg); }

/* Purchase CTA box */
.purchase-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s6);
  margin-top: var(--s8);
}
.purchase-box p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--s4);
  max-width: none;
}
.purchase-box .btn { width: 100%; }

.warranty-note {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  margin-top: var(--s6);
  padding: var(--s4);
  background: var(--surface-alt);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.warranty-note svg { flex-shrink: 0; margin-top: 2px; }

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-hero {
  position: relative;
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.contact-hero .hero-bg { filter: brightness(0.25) saturate(0.8); }
.contact-hero h1 { position: relative; z-index: 1; }

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--s16);
  align-items: start;
  padding-block: var(--s16);
}
@media (max-width: 768px) {
  .contact-layout { grid-template-columns: 1fr; gap: var(--s10); }
}

.contact-info h2 { font-size: var(--text-3xl); margin-bottom: var(--s6); }

.contact-detail { margin-bottom: var(--s6); }
.contact-detail dt {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--s1);
}
.contact-detail dd { font-size: var(--text-base); color: var(--text); }
.contact-detail dd a { color: var(--text); }
.contact-detail dd a:hover { color: var(--gold); }

/* Contact form */
.contact-form { display: flex; flex-direction: column; gap: var(--s5); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s4);
}
@media (max-width: 540px) { .form-row { grid-template-columns: 1fr; } }

.form-group { display: flex; flex-direction: column; gap: var(--s2); }

.form-group label {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}
.required-mark { color: var(--gold); margin-left: 2px; }

.form-group input,
.form-group textarea,
.form-group select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  padding: var(--s3) var(--s4);
  width: 100%;
  transition: border-color 0.15s;
  /* Ensure selects match on all browsers */
  -webkit-appearance: none;
  appearance: none;
}
.form-group select {
  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 1l5 5 5-5' stroke='%238E8E8E' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--s4) center;
  padding-right: var(--s10);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }
.form-group input:hover,
.form-group textarea:hover { border-color: #4A4A4A; }
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: 2px solid var(--gold);
  outline-offset: 0;
  border-color: var(--gold);
}
.form-group textarea { min-height: 140px; resize: vertical; }

.form-hint { font-size: var(--text-xs); color: var(--text-muted); }
.form-error { font-size: var(--text-xs); color: var(--error); display: none; }
.form-error.visible { display: block; }

.form-success {
  display: none;
  padding: var(--s6);
  background: rgba(201, 168, 76, 0.1);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  text-align: center;
  color: var(--text);
}
.form-success.visible { display: block; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-block: var(--s12);
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: var(--s8);
  margin-bottom: var(--s10);
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand img { height: 30px; margin-bottom: var(--s4); }
.footer-brand p { font-size: var(--text-sm); color: var(--text-muted); max-width: 300px; }

.footer-col h3 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--s5);
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: var(--s3); }
.footer-col a { font-size: var(--text-sm); color: var(--text-muted); text-decoration: none; }
.footer-col a:hover { color: var(--text); }

.footer-bottom {
  padding-top: var(--s8);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s4);
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--text); }
