/* =========================================================================
   J Salinas Engravings — shared stylesheet
   Deep black/charcoal + antique gold + ivory. Elegant serif display type,
   restrained scroll-engraving flourishes, mobile-first layout.
   ========================================================================= */

/* ---------- Design tokens ---------- */
:root {
  --black: #0a0908;
  --charcoal: #161310;
  --charcoal-2: #1f1b16;
  --charcoal-3: #29241d;
  --gold: #c9a227;
  --gold-bright: #e7c765;
  --gold-dim: #8a6f26;
  --gold-line: rgba(201, 162, 39, 0.35);
  --gold-line-soft: rgba(201, 162, 39, 0.16);
  --ivory: #f3ead9;
  --ivory-dim: #cabfa9;
  --ivory-faint: rgba(243, 234, 217, 0.6);

  --font-display: Cambria, "Big Caslon", Didot, Georgia, "Times New Roman", serif;
  --font-body: Optima, "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;

  --container-w: 1180px;
  --gutter: 1.25rem;
  --radius: 2px;

  --shadow-1: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-2: 0 4px 14px rgba(0, 0, 0, 0.35);

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

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--black);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--gold-bright);
  text-decoration-color: var(--gold-line);
  text-underline-offset: 0.2em;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

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

p {
  margin: 0 0 1.1em;
  color: var(--ivory-dim);
  max-width: 62ch;
}

ul,
ol {
  color: var(--ivory-dim);
  padding-left: 1.25em;
}

li {
  margin-bottom: 0.4em;
}

small {
  color: var(--ivory-faint);
}

hr {
  border: none;
  border-top: 1px solid var(--gold-line);
  margin: 2.5rem 0;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -60px;
  background: var(--gold);
  color: var(--black);
  padding: 0.7em 1.2em;
  font-weight: 700;
  z-index: 1000;
  border-radius: var(--radius);
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

section {
  padding: 4.5rem 0;
  position: relative;
}

.section-tight {
  padding: 3rem 0;
}

.section-alt {
  background: var(--charcoal);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
}

.section-header p {
  margin-left: auto;
  margin-right: auto;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9em;
}

/* Ornamental divider: thin gold hairline with a small rotated diamond */
.flourish {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin: 1.4rem auto 0;
  width: 100%;
  max-width: 220px;
}

.flourish::before,
.flourish::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-line));
}

.flourish::after {
  background: linear-gradient(90deg, var(--gold-line), transparent);
}

.flourish span {
  width: 7px;
  height: 7px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
  flex: 0 0 auto;
}

/* Subtle engraved-metal texture used on darker sections */
.texture-scroll {
  background-image:
    repeating-linear-gradient(
      135deg,
      var(--gold-line-soft) 0px,
      var(--gold-line-soft) 1px,
      transparent 1px,
      transparent 26px
    ),
    repeating-linear-gradient(
      45deg,
      var(--gold-line-soft) 0px,
      var(--gold-line-soft) 1px,
      transparent 1px,
      transparent 26px
    );
  background-color: var(--charcoal);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-body);
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.95em 1.9em;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  color: var(--ivory);
  background: transparent;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.btn:hover {
  background: var(--gold);
  color: var(--black);
}

.btn:focus-visible {
  outline-offset: 4px;
}

.btn-solid {
  background: var(--gold);
  color: var(--black);
  font-weight: 600;
}

.btn-solid:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  color: var(--black);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.6rem;
}

/* ---------- Site header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(10, 9, 8, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--gold-line);
}

.site-header__bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.3rem 1rem;
  padding: 0.65rem var(--gutter);
  max-width: var(--container-w);
  margin: 0 auto;
}

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

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--gold-line);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  color: var(--ivory);
}

.brand__sub {
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--gold-bright);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.site-nav {
  flex-basis: 100%;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s var(--ease);
  border-top: 0 solid var(--gold-line);
}

.site-nav.is-open {
  grid-template-rows: 1fr;
  border-top-width: 1px;
}

.site-nav__inner {
  overflow: hidden;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0 1.1rem;
  display: flex;
  flex-direction: column;
}

.site-nav a {
  display: block;
  padding: 0.7em 0.2em;
  color: var(--ivory-dim);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  border-bottom: 1px solid rgba(201, 162, 39, 0.12);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--gold-bright);
}

@media (min-width: 800px) {
  .site-header__bar {
    flex-wrap: nowrap;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }

  .nav-toggle {
    display: none;
  }

  .site-nav {
    flex-basis: auto;
    display: block;
    grid-template-rows: none;
    border-top: none;
  }

  .site-nav__inner {
    overflow: visible;
  }

  .site-nav ul {
    flex-direction: row;
    gap: 1.9rem;
    padding: 0;
  }

  .site-nav a {
    padding: 0.3em 0;
    border-bottom: 1px solid transparent;
  }

  .site-nav a:hover,
  .site-nav a[aria-current="page"] {
    border-bottom-color: var(--gold);
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 78vh;
  background: var(--black);
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 9, 8, 0.35) 0%, rgba(10, 9, 8, 0.55) 45%, rgba(10, 9, 8, 0.96) 100%),
    linear-gradient(90deg, rgba(10, 9, 8, 0.85) 0%, rgba(10, 9, 8, 0.15) 55%);
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 3rem var(--gutter) 3.4rem;
  max-width: 720px;
}

.hero__eyebrow {
  color: var(--gold-bright);
  font-size: 0.8rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: block;
}

.hero h1 {
  font-size: clamp(2.1rem, 6.5vw, 3.6rem);
  margin-bottom: 0.5em;
}

.hero p {
  color: var(--ivory-dim);
  font-size: 1.05rem;
  max-width: 52ch;
}

@media (min-width: 800px) {
  .hero {
    min-height: 88vh;
  }
}

/* ---------- Page header (non-home pages) ---------- */
.page-header {
  padding: 3.2rem 0 2.2rem;
  text-align: center;
  border-bottom: 1px solid var(--gold-line);
  background:
    repeating-linear-gradient(135deg, var(--gold-line-soft) 0px, var(--gold-line-soft) 1px, transparent 1px, transparent 26px),
    var(--black);
}

.page-header h1 {
  font-size: clamp(1.9rem, 5vw, 2.7rem);
}

.page-header p {
  margin: 0.8rem auto 0;
  max-width: 60ch;
}

/* ---------- Cards ---------- */
.grid {
  display: grid;
  gap: 1.6rem;
  grid-template-columns: 1fr;
}

@media (min-width: 620px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--charcoal);
  border: 1px solid var(--gold-line);
  padding: 1.9rem 1.7rem;
  border-radius: var(--radius);
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5em;
}

.card p:last-child {
  margin-bottom: 0;
}

/* Featured work strip on the home page */
.feature-figure {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--gold-line);
  background: var(--charcoal);
}

.feature-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 5;
  transition: transform 0.5s var(--ease);
}

.feature-figure:hover img {
  transform: scale(1.04);
}

.feature-figure figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.9rem 1rem;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--ivory);
  background: linear-gradient(0deg, rgba(10, 9, 8, 0.88), rgba(10, 9, 8, 0));
}

/* ---------- Portfolio grid + lightbox ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 2.4rem;
}

.filter-btn {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ivory-dim);
  background: transparent;
  border: 1px solid var(--gold-line);
  padding: 0.55em 1.1em;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.filter-btn:hover {
  color: var(--gold-bright);
  border-color: var(--gold);
}

.filter-btn.is-active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--black);
  font-weight: 600;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}

@media (min-width: 640px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
  }
}

@media (min-width: 1000px) {
  .portfolio-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.portfolio-item {
  border: none;
  background: var(--charcoal);
  padding: 0;
  cursor: pointer;
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--gold-line);
  position: relative;
}

.portfolio-item img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.4s var(--ease), filter 0.4s var(--ease);
}

.portfolio-item:hover img,
.portfolio-item:focus-visible img {
  transform: scale(1.05);
}

.portfolio-item__label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.55rem 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ivory);
  background: linear-gradient(0deg, rgba(10, 9, 8, 0.9), rgba(10, 9, 8, 0));
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.portfolio-item:hover .portfolio-item__label,
.portfolio-item:focus-visible .portfolio-item__label {
  opacity: 1;
  transform: translateY(0);
}

.portfolio-item[hidden] {
  display: none;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  background: rgba(6, 5, 4, 0.96);
  padding: 1rem;
}

.lightbox.is-open {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox__figure {
  position: relative;
  max-width: min(92vw, 1100px);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox img {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  border: 1px solid var(--gold-line);
  box-shadow: var(--shadow-1);
}

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

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  background: rgba(10, 9, 8, 0.7);
  border: 1px solid var(--gold-line);
  color: var(--ivory);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
  background: var(--gold);
  color: var(--black);
}

.lightbox__close {
  top: -6px;
  right: -6px;
}

.lightbox__prev {
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__next {
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
}

@media (min-width: 700px) {
  .lightbox__close {
    top: -18px;
    right: -50px;
  }
  .lightbox__prev {
    left: -60px;
  }
  .lightbox__next {
    right: -60px;
  }
}

/* ---------- Process steps ---------- */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
  display: grid;
  gap: 1.4rem;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 1.8rem 1.7rem 1.8rem 4.4rem;
  background: var(--charcoal);
  border: 1px solid var(--gold-line);
  margin: 0;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 1.5rem;
  top: 1.7rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--gold-bright);
  border: 1px solid var(--gold);
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps h3 {
  font-size: 1.1rem;
  margin-bottom: 0.35em;
}

.steps p {
  margin-bottom: 0;
}

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  gap: 1.3rem;
}

@media (min-width: 640px) {
  .form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.3rem;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.field label {
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--ivory);
}

.field .hint {
  font-size: 0.78rem;
  color: var(--ivory-faint);
}

.required {
  color: var(--gold-bright);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="file"],
select,
textarea {
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--ivory);
  background: var(--charcoal-2);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  padding: 0.85em 1em;
  width: 100%;
}

textarea {
  min-height: 150px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--ivory-faint);
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 20px) center, calc(100% - 15px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

input:invalid[data-touched="true"],
textarea:invalid[data-touched="true"] {
  border-color: #b5533f;
}

.error-msg {
  font-size: 0.8rem;
  color: #e2a08f;
  min-height: 1.1em;
}

.checkbox-field {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.7rem;
}

.checkbox-field input {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  margin-top: 0.1em;
  accent-color: var(--gold);
}

.checkbox-field label {
  color: var(--ivory-dim);
  font-size: 0.88rem;
}

.form-status {
  border: 1px dashed var(--gold-line);
  padding: 1rem 1.2rem;
  font-size: 0.88rem;
  color: var(--ivory-dim);
  border-radius: var(--radius);
}

.form-status[data-state="error"] {
  border-color: #b5533f;
  color: #e2a08f;
}

.form-note {
  font-size: 0.82rem;
  color: var(--ivory-faint);
  margin-top: 1.4rem;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--gold-line);
  background: var(--charcoal);
  padding: 3.2rem 0 2rem;
}

.footer-grid {
  display: grid;
  gap: 2.4rem;
  grid-template-columns: 1fr;
}

@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: 1.3fr 1fr 1fr;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.footer-brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--gold-line);
}

.footer-brand span {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ivory);
}

.site-footer h4 {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1em;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer a {
  color: var(--ivory-dim);
  text-decoration: none;
  font-size: 0.92rem;
}

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

.footer-bottom {
  margin-top: 2.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--gold-line-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--ivory-faint);
}

.footer-bottom a {
  color: var(--ivory-faint);
}

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

/* ---------- Utility text blocks ---------- */
.lede {
  font-size: 1.12rem;
  color: var(--ivory-dim);
  max-width: 66ch;
}

.callout {
  border-left: 2px solid var(--gold);
  padding: 0.3rem 0 0.3rem 1.2rem;
  color: var(--ivory-dim);
  font-size: 0.95rem;
}

.badge-note {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.82rem;
  color: var(--gold-bright);
  border: 1px solid var(--gold-line);
  padding: 0.5em 0.9em;
  border-radius: 999px;
  margin-bottom: 1rem;
}

/* Legal / text pages */
.prose h2 {
  font-size: 1.35rem;
  margin-top: 2rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose ul {
  margin-bottom: 1.2em;
}

.prose {
  max-width: 74ch;
  margin: 0 auto;
}
