/* ==========================================================================
   Onyx Detail Co. — site styles
   Mobile-first. Light editorial palette, serif display + sans body.
   ========================================================================== */

:root {
  --ivory: #f7f4ee;
  --ivory-deep: #efe9de;
  --ink: #1b1a17;
  --ink-soft: #45413a;
  --muted: #6b655a;
  --gold: #9c7a3f;
  --gold-text: #86672f;           /* darker gold for small text (AA on ivory) */
  --rule: rgba(27, 26, 23, 0.14);
  --rule-strong: rgba(27, 26, 23, 0.28);

  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(20px, 5vw, 64px);
  --max: 1240px;
  --nav-h: 64px;
  --section: clamp(80px, 12vw, 160px);

  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

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

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--ink); color: var(--ivory);
  padding: 10px 16px; text-decoration: none; font-size: 0.875rem;
}
.skip-link:focus { top: 12px; }

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

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section); }

.kicker {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--sans);
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold-text);
}
.kicker::before {
  content: ""; width: 32px; height: 1px; background: var(--gold);
}

.display {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.01em;
}
.display em, .accent { font-style: italic; color: var(--gold); }
.display .kicker { display: flex; margin-bottom: 24px; line-height: 1.5; font-style: normal; }

.h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.25rem, 5.2vw, 3.75rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin-top: 20px;
}
.lede { font-size: 1.0625rem; color: var(--ink-soft); max-width: 36em; }

/* ---------- Links & buttons ---------- */
.link-underline {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 2px;
  transition: color 0.25s var(--ease-out), background-size 0.35s var(--ease-out);
}
.link-underline:hover { color: var(--gold-text); }

.link-grow {
  text-decoration: none;
  background-image: linear-gradient(var(--gold), var(--gold));
  background-size: 0 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 2px;
  transition: background-size 0.35s var(--ease-out), color 0.25s;
}
.link-grow:hover, .link-grow[aria-current="page"] { background-size: 100% 1px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 28px;
  font-family: var(--sans); font-size: 0.8125rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
  border: 1px solid var(--ink);
  transition: background-color 0.3s var(--ease-out), color 0.3s var(--ease-out), border-color 0.3s;
  cursor: pointer;
}
.btn-solid { background: var(--ink); color: var(--ivory); }
.btn-solid:hover { background: var(--gold); border-color: var(--gold); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--ivory); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 0.72rem; }

.arrow { display: inline-block; transition: transform 0.3s var(--ease-out); }
a:hover .arrow { transform: translateX(4px); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 244, 238, 0.9);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: var(--nav-h);
}

.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink); white-space: nowrap;
}
.wordmark-mark {
  font-family: var(--serif); font-size: 1.6rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; line-height: 1;
}
.wordmark-sub {
  font-family: var(--serif); font-style: italic; font-size: 1.05rem;
  color: var(--gold);
}
.wordmark-badge { width: 40px; height: 40px; border-radius: 50%; flex: none; margin-right: 2px; }

.nav-links { display: none; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
@media (max-width: 479px) { .wordmark-sub { display: none; } }
@media (max-width: 359px) {
  .wordmark-mark { font-size: 1.35rem; }
  .wordmark-badge { width: 34px; height: 34px; }
  .nav .btn-sm { padding: 0 12px; letter-spacing: 0.08em; }
}
.nav-phone { display: none; font-size: 0.875rem; text-decoration: none; white-space: nowrap; }

.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 6px;
  width: 44px; height: 44px; padding: 0 10px;
  background: none; border: 0; cursor: pointer;
}
.nav-toggle span {
  display: block; height: 1px; background: var(--ink);
  transition: transform 0.3s var(--ease-out), opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* Mobile: the primary nav becomes a dropdown panel under the header */
@media (max-width: 959px) {
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column;
    padding: 8px var(--gutter) 28px;
    background: var(--ivory);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
  }
  .site-header.menu-open .nav-links { display: flex; }
  .nav-links a {
    display: block; padding: 14px 0; background: none;
    font-family: var(--serif); font-size: 1.6rem; text-decoration: none;
    border-bottom: 1px solid var(--rule);
  }
}

@media (min-width: 960px) {
  :root { --nav-h: 76px; }
  .nav-links { display: flex; gap: 36px; font-size: 0.875rem; }
  .nav-links a { text-decoration: none; }
  .nav-phone { display: inline; }
  .nav-toggle { display: none !important; }
}

/* ---------- Hero ---------- */
.hero { padding-top: clamp(40px, 8vw, 96px); padding-bottom: clamp(56px, 8vw, 96px); }
.hero-grid { display: grid; gap: 48px; align-items: center; }
.hero h1 {
  font-size: clamp(3rem, 11vw, 6.25rem);
  max-width: 9em;
}
.hero-sub { margin-top: 24px; font-size: 1.0625rem; color: var(--ink-soft); max-width: 30em; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-meta {
  margin-top: 36px; font-size: 0.8125rem; color: var(--muted);
  letter-spacing: 0.02em;
}
.hero-meta a { text-decoration: none; }

.hero-media {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #1f1e1b;
}
.hero-media img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.12);
  will-change: transform;
}
.hero-media::after {                     /* hairline gold inset frame */
  content: ""; position: absolute; inset: 14px;
  border: 1px solid rgba(214, 188, 139, 0.35);
  pointer-events: none;
}

@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: 5fr 6fr; gap: 72px; }
}

/* ---------- Intro + trust strip ---------- */
.intro { padding-block: clamp(56px, 9vw, 112px) clamp(40px, 6vw, 72px); text-align: center; }
.intro-line {
  font-family: var(--serif); font-weight: 400; font-style: italic;
  font-size: clamp(1.75rem, 4.4vw, 3rem); line-height: 1.2;
}

.trust {
  border-block: 1px solid var(--rule);
}
.trust ul {
  display: grid; grid-template-columns: repeat(2, 1fr);
}
.trust li {
  padding: 22px 12px; text-align: center;
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-soft);
}
.trust li:nth-child(odd) { border-right: 1px solid var(--rule); }
.trust li:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
.trust li::before {
  content: ""; display: block; width: 5px; height: 5px; margin: 0 auto 12px;
  background: var(--gold); transform: rotate(45deg);
}
@media (min-width: 768px) {
  .trust ul { grid-template-columns: repeat(4, 1fr); }
  .trust li { padding: 28px 12px; border-bottom: 0 !important; border-right: 1px solid var(--rule); }
  .trust li:last-child { border-right: 0; }
}

/* ---------- Section heading block ---------- */
.section-head { display: grid; gap: 24px; margin-bottom: clamp(48px, 7vw, 88px); }
@media (min-width: 1024px) {
  .section-head { grid-template-columns: 1fr 1fr; align-items: end; gap: 72px; }
}

/* ---------- Services ---------- */
.services-list { border-top: 1px solid var(--rule-strong); }
.service {
  display: grid; gap: 20px;
  padding-block: clamp(32px, 5vw, 56px);
  border-bottom: 1px solid var(--rule);
}
.service-num {
  font-family: var(--serif); font-size: 1.1rem; color: var(--gold);
  letter-spacing: 0.08em;
}
.service-name {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2rem, 4.4vw, 2.9rem); line-height: 1.1;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px;
}
.service-tag {
  font-family: var(--sans); font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-text);
  border: 1px solid rgba(156, 122, 63, 0.45); padding: 4px 10px;
  transform: translateY(-4px);
}
.service-desc { margin-top: 12px; color: var(--ink-soft); max-width: 34em; }
.service-book { margin-top: 20px; display: inline-block; font-size: 0.875rem; font-weight: 500; }

.prices {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
}
.prices div { padding: 16px 0 4px; }
.prices div + div { padding-left: 16px; border-left: 1px solid var(--rule); }
.prices dt {
  font-size: 0.7rem; font-weight: 500; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted);
}
.prices dd {
  font-family: var(--serif); font-size: clamp(1.75rem, 3.4vw, 2.25rem); line-height: 1.2; margin-top: 4px;
  font-variant-numeric: lining-nums;
}

@media (min-width: 900px) {
  .service { grid-template-columns: 72px 1fr minmax(300px, 380px); gap: 40px; align-items: start; }
  .service-num { padding-top: 14px; }
  .prices { border-top: 0; margin-top: 10px; }
  .prices div { padding-top: 0; }
}

.pricing-notes {
  margin-top: 40px; display: grid; gap: 10px;
  font-size: 0.9375rem; color: var(--ink-soft); max-width: 46em;
}
.pricing-notes p:first-child { color: var(--ink); }

/* ---------- Photo figures (shared) ---------- */
.photo {
  position: relative; overflow: hidden; background: #26241f;
}
.photo picture, .hero-media picture { display: contents; }
.photo img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.9s var(--ease-out);
}
.photo:hover img, a:focus-visible .photo img, button:focus-visible .photo img { transform: scale(1.03); }
.photo-label {
  position: absolute; left: 14px; top: 14px;
  background: rgba(247, 244, 238, 0.92); color: var(--ink);
  font-size: 0.66rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  padding: 6px 10px;
}
.caption { margin-top: 14px; font-size: 0.875rem; color: var(--muted); }
.caption strong { color: var(--ink); font-weight: 500; }

/* ---------- Recent work teaser ---------- */
.work { background: var(--ivory-deep); }
.work-grid { display: grid; gap: 28px; }
.work-grid .photo { aspect-ratio: 4 / 3; }
.work-foot {
  margin-top: clamp(40px, 6vw, 64px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  padding-top: 28px; border-top: 1px solid var(--rule);
}
.work-foot p { color: var(--ink-soft); max-width: 32em; }
@media (min-width: 768px) {
  .work-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .work-grid figure:nth-child(2) { margin-top: 72px; }   /* editorial offset */
}

/* ---------- The Onyx standard ---------- */
.standard-grid { display: grid; gap: 56px; }
.standard-body p { font-size: 1.0625rem; color: var(--ink-soft); max-width: 34em; margin-top: 28px; }
.pullquote {
  position: relative;
  padding-top: 40px;
  border-top: 1px solid var(--gold);
}
.pullquote blockquote p {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.85rem, 4vw, 2.75rem); line-height: 1.2;
}
.pullquote figcaption {
  margin-top: 24px; font-size: 0.75rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted);
}
@media (min-width: 1024px) {
  .standard-grid { grid-template-columns: 7fr 5fr; gap: 96px; align-items: end; }
}

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--rule); }
.faq-grid { display: grid; gap: 40px; }
.faq-list { border-top: 1px solid var(--rule-strong); }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 26px 0;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item h3 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(1.35rem, 2.6vw, 1.65rem); line-height: 1.25;
  transition: color 0.25s;
}
.faq-item summary:hover h3 { color: var(--gold-text); }
.faq-icon { position: relative; flex: none; width: 14px; height: 14px; }
.faq-icon::before, .faq-icon::after {
  content: ""; position: absolute; left: 0; top: 50%; width: 14px; height: 1px; background: var(--ink);
  transition: transform 0.3s var(--ease-out);
}
.faq-icon::after { transform: rotate(90deg); }
.faq-item[open] .faq-icon::after { transform: rotate(0deg); }
.faq-answer { padding: 0 0 28px; color: var(--ink-soft); max-width: 38em; }
.faq-answer a { color: var(--ink); }
@media (min-width: 1024px) {
  .faq-grid { grid-template-columns: 5fr 7fr; gap: 96px; }
}

/* ---------- Final CTA ---------- */
.cta {
  background: var(--ink); color: var(--ivory);
  text-align: center;
}
.cta-logo { width: 132px; height: 132px; border-radius: 50%; margin: 0 auto 36px; }
.cta .kicker { color: #c9a86a; justify-content: center; }
.cta .kicker::before { background: #c9a86a; }
.cta h2 { margin-inline: auto; max-width: 13em; }
.cta h2 em { color: #c9a86a; }
.cta p { color: rgba(247, 244, 238, 0.72); margin: 24px auto 0; max-width: 32em; }
.cta .btn-solid { background: var(--ivory); color: var(--ink); border-color: var(--ivory); margin-top: 40px; }
.cta .btn-solid:hover { background: #c9a86a; border-color: #c9a86a; }
.cta-alt { margin-top: 20px !important; font-size: 0.9375rem; }
.cta-alt a { color: var(--ivory); }

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 72px 40px;
  border-top: 1px solid var(--rule);
}
.footer-grid { display: grid; gap: 40px; }
.site-footer .wordmark-badge { width: 56px; height: 56px; }
.footer-area { margin-top: 16px; color: var(--muted); font-size: 0.9375rem; max-width: 26em; }
.footer-heading {
  font-size: 0.7rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 14px;
}
.footer-list li + li { margin-top: 8px; }
.footer-list a { text-decoration: none; }
.footer-bottom {
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-size: 0.8125rem; color: var(--muted);
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

/* ---------- Gallery page ---------- */
.page-hero { padding-block: clamp(48px, 9vw, 112px) clamp(32px, 5vw, 56px); }
.page-hero h1 { font-size: clamp(3rem, 9vw, 5.5rem); }
.page-hero .lede { margin-top: 24px; }

.job {
  padding-block: clamp(40px, 6vw, 72px);
  border-top: 1px solid var(--rule-strong);
}
.job-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 8px 24px; margin-bottom: 28px;
}
.job-title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.75rem, 3.6vw, 2.4rem); line-height: 1.15; }
.job-meta {
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
}
.job-meta span + span::before { content: "·"; margin: 0 10px; color: var(--gold); }
/* 6-photo job layout: 1 featured + 5. Mobile: featured full-width, then pairs.
   Desktop: featured spans 2x2, two stacked beside it, three across below. */
.job-grid { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.job-grid .photo { display: block; aspect-ratio: 4 / 3; }
.job-grid figure:first-child,
.job-grid figure:last-child:nth-child(even) { grid-column: span 2; }
.job-grid button {
  display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: left;
}
.job-note { margin-top: 20px; color: var(--ink-soft); font-size: 0.9375rem; max-width: 40em; }
@media (min-width: 768px) {
  .job-grid { gap: 20px; grid-template-columns: repeat(3, 1fr); }
  .job-grid figure:last-child:nth-child(even) { grid-column: auto; }
  .job-grid figure:first-child { grid-column: span 2; grid-row: span 2; }
  .job-grid figure:first-child button,
  .job-grid figure:first-child .photo { height: 100%; aspect-ratio: auto; }
}

.gallery-cta {
  margin-top: clamp(24px, 4vw, 48px);
  padding-block: clamp(48px, 7vw, 88px);
  border-top: 1px solid var(--rule-strong);
  display: grid; gap: 24px; justify-items: start;
}

/* Lightbox */
.lightbox {
  width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh;
  margin: 0; padding: 0; border: 0;
  background: #141311; color: var(--ivory);
}
.lightbox::backdrop { background: rgba(20, 19, 17, 0.6); }
.lightbox-inner {
  height: 100%; display: grid; grid-template-rows: 1fr auto;
  padding: 64px 16px 20px;
}
.lightbox figure { display: grid; place-items: center; min-height: 0; }
.lightbox img { max-height: calc(100dvh - 160px); width: auto; max-width: 100%; object-fit: contain; }
.lightbox figcaption { margin-top: 16px; text-align: center; font-size: 0.875rem; color: rgba(247, 244, 238, 0.75); }
.lightbox-btn {
  position: absolute; background: none; border: 1px solid rgba(247, 244, 238, 0.3); color: var(--ivory);
  width: 44px; height: 44px; cursor: pointer; font-size: 1.1rem; line-height: 1;
  transition: border-color 0.2s, color 0.2s;
}
.lightbox-btn:hover { border-color: #c9a86a; color: #c9a86a; }
.lightbox-close { top: 12px; right: 12px; }
.lightbox-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 12px; top: 50%; transform: translateY(-50%); }

/* ---------- 404 ---------- */
.not-found { min-height: 60vh; display: grid; align-content: center; }
.not-found h1 { font-size: clamp(3rem, 9vw, 5.5rem); margin-top: 24px; }
.not-found p { margin-top: 20px; }
.not-found .btn { margin-top: 32px; justify-self: start; }

/* ---------- Scroll reveal (only when JS is running) ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .hero-media img { transform: none !important; }
  .photo:hover img { transform: none; }
}

a.photo { display: block; }
