/* ==========================================================================
   Meridian & Co. — quiet editorial luxury
   Charcoal #16161a · Ivory #f4f1ea · Gold #c9a96a / champagne #d9c089
   ========================================================================== */

:root {
  --charcoal: #16161a;
  --charcoal-soft: #1d1d22;
  --ivory: #f4f1ea;
  --ivory-dim: #cfcabd;
  --gold: #c9a96a;
  --gold-text: #d9c089;       /* contrast-safe on charcoal for text sizes */
  --gold-bright: #e6d3a3;
  --rule: rgba(201, 169, 106, 0.45);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --measure: 38rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--charcoal);
  color: var(--ivory);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Accessibility ---------- */

.skip-link {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(-200%);
  top: 0.75rem;
  background: var(--gold);
  color: var(--charcoal);
  padding: 0.6rem 1.4rem;
  font-family: var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.8rem;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  transform: translateX(-50%) translateY(0);
}

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

/* ---------- Typography ---------- */

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ivory);
  margin: 0 0 1rem;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 4.25rem);
  letter-spacing: 0.01em;
}

h2 {
  font-size: clamp(2rem, 4vw, 2.9rem);
}

h3 {
  font-size: 1.45rem;
  font-weight: 600;
}

p {
  margin: 0 0 1.1rem;
}

a {
  color: var(--gold-text);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 0.25em;
}

a:hover {
  color: var(--gold-bright);
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--gold-text);
  margin: 0 0 1.25rem;
}

/* ---------- Layout primitives ---------- */

.section {
  max-width: 62rem;
  margin: 0 auto;
  padding: clamp(4.5rem, 10vw, 7.5rem) 1.5rem;
  text-align: center;
}

.section-lede {
  max-width: var(--measure);
  margin: 0 auto 3rem;
  color: var(--ivory-dim);
}

.section-note {
  max-width: var(--measure);
  margin: 3rem auto 0;
  color: var(--ivory-dim);
  font-size: 0.95rem;
}

.rule {
  border: none;
  border-top: 1px solid var(--rule);
  max-width: 16rem;
  margin: 0 auto;
}

.prose {
  max-width: var(--measure);
  margin: 0 auto;
  text-align: left;
  color: var(--ivory-dim);
}

.prose p {
  margin-bottom: 1.5rem;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  border: 1px solid var(--gold);
  color: var(--gold-text);
  background: transparent;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1rem 2.4rem;
  cursor: pointer;
}

@media (prefers-reduced-motion: no-preference) {
  .btn {
    transition: background-color 0.45s ease, color 0.45s ease;
  }
}

.btn:hover,
.btn:focus-visible {
  background: var(--gold);
  color: var(--charcoal);
}

/* ---------- Header & navigation ---------- */

.site-header {
  border-bottom: 1px solid var(--rule);
  padding: 1.1rem 1.5rem;
}

.header-inner {
  max-width: 70rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--gold-text);
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ivory);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.6rem;
}

.site-nav a {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ivory-dim);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--gold-bright);
}

.site-nav .nav-cta {
  border: 1px solid var(--gold);
  padding: 0.55rem 1.1rem;
  color: var(--gold-text);
}

@media (prefers-reduced-motion: no-preference) {
  .site-nav .nav-cta {
    transition: background-color 0.45s ease, color 0.45s ease;
  }
}

.site-nav .nav-cta:hover,
.site-nav .nav-cta:focus-visible {
  background: var(--gold);
  color: var(--charcoal);
}

/* Nav toggle: display:none is unconditional at desktop widths; it only
   appears on small screens once script.js has flagged <html class="js">.
   No-JS visitors keep the plain inline nav and never see the button. */
.nav-toggle {
  display: none;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold-text);
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.5rem 1.1rem;
  cursor: pointer;
}

/* Small screens + JS: the nav becomes a right-hand drawer over a dimmed
   backdrop — ivory on charcoal with a gold hairline along its left edge. */
@media (max-width: 720px) {
  .header-inner {
    justify-content: space-between;
  }

  html.js .nav-toggle {
    display: inline-block;
  }

  /* While the drawer is open, the toggle stays exactly where it was
     tapped, raised above the backdrop as the Close control (scroll is
     locked, so it cannot drift). */
  html.js .nav-toggle[aria-expanded="true"] {
    position: relative;
    z-index: 95;
  }

  html.js .site-nav {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(10, 10, 12, 0.55); /* dimmed backdrop */
    visibility: hidden;
    opacity: 0;
  }

  html.js .site-nav.is-open {
    visibility: visible;
    opacity: 1;
  }

  html.js .site-nav ul {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(22rem, 86vw);
    background: var(--charcoal-soft);
    border-left: 1px solid var(--gold); /* gold hairline */
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.75rem;
    padding: 3rem 2.5rem;
    overflow-y: auto;
    transform: translateX(100%);
  }

  html.js .site-nav.is-open ul {
    transform: none;
  }

  html.js .site-nav li {
    opacity: 0;
  }

  html.js .site-nav.is-open li {
    opacity: 1;
  }

  html.js .site-nav a {
    font-size: 0.85rem;
    color: var(--ivory);
  }

  html.js .site-nav a:hover,
  html.js .site-nav a:focus-visible {
    color: var(--gold-bright);
  }

  /* Slow, refined entrance; links fade up gently after the drawer lands.
     Reduced motion: instant show/hide, no transforms in motion. */
  @media (prefers-reduced-motion: no-preference) {
    html.js .site-nav {
      transition: opacity 0.5s ease, visibility 0s linear 0.5s;
    }

    html.js .site-nav.is-open {
      transition: opacity 0.5s ease, visibility 0s;
    }

    html.js .site-nav ul {
      transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    }

    html.js .site-nav li {
      transform: translateY(0.6rem);
      transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    }

    html.js .site-nav.is-open li {
      transform: none;
    }

    html.js .site-nav.is-open li:nth-child(1) { transition-delay: 0.18s; }
    html.js .site-nav.is-open li:nth-child(2) { transition-delay: 0.24s; }
    html.js .site-nav.is-open li:nth-child(3) { transition-delay: 0.3s; }
    html.js .site-nav.is-open li:nth-child(4) { transition-delay: 0.36s; }
    html.js .site-nav.is-open li:nth-child(5) { transition-delay: 0.42s; }
    html.js .site-nav.is-open li:nth-child(6) { transition-delay: 0.48s; }
  }
}

/* ---------- Hero ---------- */

.hero {
  max-width: 62rem;
  margin: 0 auto;
  padding: clamp(5rem, 12vw, 9rem) 1.5rem clamp(4.5rem, 10vw, 7rem);
  text-align: center;
}

.hero-lede {
  max-width: var(--measure);
  margin: 0 auto 3.5rem;
  color: var(--ivory-dim);
  font-size: 1.1rem;
}

.hero-dial {
  display: block;
  margin: 0 auto 3.5rem;
  max-width: min(320px, 70vw);
  height: auto;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-dial {
    animation: dial-fade 1.6s ease both;
  }

  @keyframes dial-fade {
    from {
      opacity: 0;
      transform: scale(0.97);
    }
    to {
      opacity: 1;
      transform: scale(1);
    }
  }
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 2.25rem;
}

.hero-note {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--ivory-dim);
}

/* ---------- Collection cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.5rem;
  text-align: center;
}

.card {
  background: var(--charcoal-soft);
  border: 1px solid var(--rule);
  padding: 2.75rem 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card-dial {
  margin-bottom: 1.6rem;
}

.card h3 {
  margin-bottom: 0.35rem;
}

.card-kind {
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin-bottom: 1.4rem;
}

.card-desc {
  color: var(--ivory-dim);
  font-size: 0.98rem;
  margin-bottom: 1.5rem;
}

.specs {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--rule);
  width: 100%;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  color: var(--ivory-dim);
}

.specs li {
  margin-bottom: 0.45rem;
}

.price {
  margin: auto 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  width: 100%;
}

.price-amount {
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 500;
  color: var(--gold-bright);
  letter-spacing: 0.03em;
}

/* ---------- Services ---------- */

.services {
  max-width: var(--measure);
  margin: 0 auto;
  text-align: left;
}

.service {
  padding: 2rem 0;
  border-bottom: 1px solid var(--rule);
}

.service:first-child {
  border-top: 1px solid var(--rule);
}

.service h3 {
  margin-bottom: 0.5rem;
}

.service p {
  color: var(--ivory-dim);
  margin-bottom: 0.6rem;
}

.service-price {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--gold-bright);
  letter-spacing: 0.04em;
  margin-bottom: 0 !important;
}

/* ---------- FAQ ---------- */

.faq-list {
  max-width: var(--measure);
  margin: 0 auto;
  text-align: left;
}

.faq-item {
  border-bottom: 1px solid var(--rule);
}

.faq-item:first-child {
  border-top: 1px solid var(--rule);
}

.faq-item summary {
  cursor: pointer;
  padding: 1.4rem 2.25rem 1.4rem 0;
  position: relative;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--gold-text);
}

.faq-item[open] summary::after {
  content: "\2013"; /* en dash */
}

.faq-item summary h3 {
  display: inline;
  font-size: 1.25rem;
  font-weight: 500;
}

.faq-item summary:hover h3 {
  color: var(--gold-bright);
}

.faq-item p {
  color: var(--ivory-dim);
  padding: 0 0 1.6rem;
  max-width: 36rem;
}

/* ---------- Visit ---------- */

.visit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2.5rem 1.5rem;
  max-width: 56rem;
  margin: 0 auto;
}

.visit-block h3 {
  font-size: 0.8rem;
  font-family: var(--sans);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  color: var(--gold-text);
  margin-bottom: 1rem;
}

.visit-block p {
  color: var(--ivory);
}

.visit-note {
  font-size: 0.9rem;
  color: var(--ivory-dim) !important;
}

/* ---------- Contact form ---------- */

.contact-form {
  max-width: 30rem;
  margin: 0 auto;
  text-align: left;
}

.form-row {
  margin-bottom: 1.5rem;
}

.contact-form label {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin-bottom: 0.5rem;
}

.optional {
  text-transform: none;
  letter-spacing: 0.05em;
  color: var(--ivory-dim);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  background: var(--charcoal-soft);
  border: 1px solid var(--rule);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 300;
  padding: 0.8rem 1rem;
  border-radius: 0;
}

.contact-form select {
  appearance: none;
}

.contact-form input:focus-visible,
.contact-form select:focus-visible,
.contact-form textarea:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 1px;
  border-color: var(--gold);
}

.btn-submit {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
}

.form-note {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--ivory-dim);
  text-align: center;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  text-align: center;
  padding: 4rem 1.5rem 3rem;
  color: var(--ivory-dim);
  font-size: 0.92rem;
}

.footer-mark {
  color: var(--gold-text);
  margin-bottom: 0.75rem;
}

.footer-name {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ivory);
  margin-bottom: 0.75rem;
}

.footer-fine {
  margin-top: 2rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: rgba(244, 241, 234, 0.55);
}

/* Social links (fictional .example profiles) */
.social-links { display: flex; gap: 1.2rem; list-style: none; justify-content: center; padding: 0 1.5rem; margin: 1.5rem auto 0; }
.social-links a { display: inline-flex; color: inherit; opacity: 0.85; }
.social-links a:hover, .social-links a:focus-visible { opacity: 1; }
.social-links svg { width: 1.3rem; height: 1.3rem; }

/* ---------- Collections catalog page ---------- */

.catalog-intro h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin-bottom: 1.25rem;
}

.catalog-dial {
  width: clamp(150px, 42vw, 190px);
  height: auto;
  margin: 0 auto 1.4rem;
  display: block;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45));
}

.catalog-grid {
  align-items: stretch;
}

.catalog-card {
  scroll-margin-top: 6rem;
}


/* Appointments are the business — the Book link never hides in the drawer */
.header-book { display: none; }

@media (max-width: 720px) {
  .header-book {
    display: inline-block;
    border: 1px solid var(--gold);
    color: var(--gold-text);
    font-size: 0.75rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.5rem 1rem;
    margin-right: 0.7rem;
  }
}

/* The homepage's featured dials now use the full catalog illustrations */
.cards .catalog-dial {
  width: clamp(140px, 38vw, 170px);
  height: auto;
  margin: 0 auto 1.4rem;
  display: block;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45));
}

@media (max-width: 720px) {
  .header-inner {
    flex-wrap: nowrap;
    gap: 0.6rem;
  }

  .header-inner .brand { margin-right: auto; }

  .brand-name { font-size: 1.1rem; white-space: nowrap; }

  .header-book { margin-right: 0; }

  .nav-toggle { padding: 0.5rem 0.8rem; }
}

/* ---------- Catalog shop tools ---------- */

.catalog-shop { max-width: 70rem; }

.catalog-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.5rem;
  justify-content: center;
  text-align: left;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 1.5rem 0.5rem;
  margin-bottom: 1.25rem;
}

.tool { display: flex; flex-direction: column; gap: 0.35rem; }

.tool-search { flex: 1 1 16rem; }

.tool label {
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-text);
}

.tool input,
.tool select {
  background: var(--charcoal-soft);
  border: 1px solid var(--rule);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 300;
  padding: 0.6rem 0.8rem;
  min-width: 9rem;
}

.tool input::placeholder { color: var(--ivory-dim); opacity: 0.7; }

.tool input:focus-visible,
.tool select:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 1px;
}

.catalog-count {
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ivory-dim);
  min-height: 1.2em;
  margin-bottom: 2rem;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.75rem;
  text-align: center;
}

.catalog-card[hidden] { display: none; }

.catalog-pages {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-top: 3rem;
}

.catalog-pages button {
  min-width: 2.6rem;
  padding: 0.55rem 0.6rem;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ivory-dim);
  font-family: var(--sans);
  font-size: 0.9rem;
  cursor: pointer;
}

.catalog-pages button:hover,
.catalog-pages button:focus-visible {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.catalog-pages button[aria-current="page"] {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--charcoal);
}

.catalog-empty {
  color: var(--ivory-dim);
  border: 1px solid var(--rule);
  max-width: 30rem;
  margin: 1rem auto 0;
  padding: 1.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* The hidden attribute must always win (no-JS keeps tools/pagination hidden) */
.catalog-tools[hidden],
.catalog-pages[hidden],
.catalog-empty[hidden] { display: none; }

/* ---------- Chip filters (no native dropdowns) ---------- */

.catalog-tools { flex-direction: column; align-items: stretch; gap: 1.1rem; }

.catalog-tools .tool-search { flex: none; }

.tool-chips { flex-direction: column; gap: 0.45rem; min-width: 0; max-width: 100%; }

.tool-label {
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-text);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chips-scroll {
  flex-wrap: nowrap;
  max-width: 100%;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 0.2rem;
}

.chips-scroll::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ivory-dim);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  padding: 0.45rem 0.95rem;
  cursor: pointer;
  white-space: nowrap;
}

.chip:hover,
.chip:focus-visible {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.chip[aria-pressed="true"] {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--charcoal);
}

@media (min-width: 721px) {
  .tool-search { max-width: 28rem; }
}
