/* Rick Shelton — Photography portfolio
   Local fonts only. No external requests. */

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/InstrumentSerif-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/InstrumentSerif-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/InstrumentSans-Variable.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0f0e0c;
  --bg-elevated: #181714;
  --bg-soft: #1c1b18;
  --text: #f3efe6;
  --text-muted: #9b9588;
  --text-faint: #6e6a60;
  --line: rgba(243, 239, 230, 0.12);
  --line-strong: rgba(243, 239, 230, 0.22);
  --accent: #c6b08a;
  --accent-strong: #d4c4a0;
  --on-accent: #1a1712;
  --focus: #e8d7b0;
  --error: #e8b4a8;
  --header-h: 4.25rem;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --max: 1180px;
  --max-wide: 1280px;
  --font-serif: "Instrument Serif", "Palatino Linotype", Palatino, Georgia, serif;
  --font-sans: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.65;
  font-weight: 400;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-strong);
}

:focus {
  outline: none;
}

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

.skip-link {
  position: absolute;
  left: var(--pad);
  top: -100px;
  z-index: 100;
  background: var(--accent);
  color: var(--on-accent);
  padding: 0.6rem 1rem;
  text-decoration: none;
  font-size: 0.9rem;
}

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

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: rgba(15, 14, 12, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 var(--pad);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
  line-height: 1;
}

.wordmark:hover,
.wordmark:focus-visible {
  color: var(--accent-strong);
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 1.1rem;
  height: 1px;
  background: currentColor;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.25s var(--ease), opacity 0.2s ease;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
}

.nav-toggle-bar::before {
  transform: translate(-50%, calc(-50% - 5px));
}

.nav-toggle-bar::after {
  transform: translate(-50%, calc(-50% + 5px));
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.site-nav ul {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

.site-nav a[aria-current="page"] {
  box-shadow: 0 1px 0 var(--accent);
}

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

.site-main {
  flex: 1 0 auto;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.wrap-wide {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.page-intro {
  padding: 4.5rem 0 2.75rem;
}

.page-intro h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.8rem, 7vw, 5rem);
  line-height: 1.05;
  margin: 0 0 0.85rem;
  letter-spacing: -0.02em;
}

.page-intro .lede {
  margin: 0;
  max-width: 36rem;
  color: var(--text-muted);
  font-size: 1.08rem;
}

.section {
  padding: 3.5rem 0 5rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.4rem;
}

.section-head h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  padding: 0.9rem 1.35rem;
  cursor: pointer;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 1px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  background: var(--accent-strong);
  color: var(--on-accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: var(--accent);
}

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

.hero {
  position: relative;
  min-height: min(86vh, 52rem);
  display: flex;
  align-items: flex-end;
  color: var(--text);
  overflow: hidden;
  background: var(--bg-elevated);
}

.hero-image {
  position: absolute;
  inset: 0;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 14, 12, 0.15) 0%, rgba(15, 14, 12, 0.15) 35%, rgba(15, 14, 12, 0.82) 100%),
    linear-gradient(90deg, rgba(15, 14, 12, 0.35), transparent 45%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0 0 4.25rem;
}

.hero-kicker {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(3.2rem, 10vw, 7.5rem);
  line-height: 0.92;
  margin: 0 0 1rem;
  letter-spacing: -0.03em;
}

.hero-tagline {
  margin: 0 0 1.75rem;
  max-width: 28rem;
  color: rgba(243, 239, 230, 0.82);
  font-size: 1.08rem;
}

/* ---------- Photo cards & grids ---------- */

.photo-card {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--bg-elevated);
  color: inherit;
  text-decoration: none;
  cursor: zoom-in;
  border: 0;
  padding: 0;
  width: 100%;
  text-align: left;
  font: inherit;
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 5;
  transition: transform 0.7s var(--ease), filter 0.45s ease;
}

.photo-card .photo-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2.5rem 1rem 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s var(--ease);
  pointer-events: none;
}

.photo-card .photo-meta strong {
  display: block;
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--text);
}

.photo-card .photo-meta span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(243, 239, 230, 0.7);
}

.photo-card:hover img,
.photo-card:focus-visible img {
  transform: scale(1.04);
  filter: brightness(0.72);
}

.photo-card:hover .photo-meta,
.photo-card:focus-visible .photo-meta {
  opacity: 1;
  transform: none;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0.7rem;
}

.featured-grid .photo-card:nth-child(1) {
  grid-column: span 7;
}

.featured-grid .photo-card:nth-child(2) {
  grid-column: span 5;
}

.featured-grid .photo-card:nth-child(3),
.featured-grid .photo-card:nth-child(4),
.featured-grid .photo-card:nth-child(5),
.featured-grid .photo-card:nth-child(6) {
  grid-column: span 3;
}

.featured-grid .photo-card:nth-child(1) img {
  aspect-ratio: 16 / 10;
}

.featured-grid .photo-card:nth-child(2) img {
  aspect-ratio: 4 / 5;
}

.featured-grid .photo-card:nth-child(n + 3) img {
  aspect-ratio: 4 / 5;
}

.band {
  border-top: 1px solid var(--line);
  padding: 4rem 0;
}

.band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.band h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  margin: 0 0 0.4rem;
}

.band p {
  margin: 0;
  color: var(--text-muted);
}

/* ---------- Galleries ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 2rem;
}

.filter-btn {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--line);
  padding: 0.55rem 0.95rem;
  cursor: pointer;
  border-radius: 99px;
}

.filter-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.filter-btn[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
}

.gallery-grid .photo-card img {
  aspect-ratio: 4 / 5;
}

.gallery-empty {
  color: var(--text-muted);
  padding: 3rem 0;
}

.noscript-note {
  color: var(--text-muted);
  padding: 1rem 0 2rem;
}

.noscript-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.7rem;
}

.noscript-grid img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
  padding-bottom: 5rem;
}

.about-portrait {
  background: var(--bg-elevated);
}

.about-portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.about-copy h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.05;
  margin: 0 0 0.25rem;
}

.about-role {
  margin: 0 0 1.75rem;
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.about-copy p {
  color: var(--text-muted);
  margin: 0 0 1rem;
  max-width: 38rem;
}

.about-copy p.placeholder-note {
  font-size: 0.88rem;
  color: var(--text-faint);
  border-left: 2px solid var(--accent);
  padding-left: 0.9rem;
  margin: 1.5rem 0 1.75rem;
}

.about-meta {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1rem;
}

.about-meta dt {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0;
}

.about-meta dd {
  margin: 0.2rem 0 0;
}

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

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding-bottom: 5rem;
  align-items: start;
}

.contact-copy p {
  color: var(--text-muted);
  max-width: 28rem;
}

.contact-email {
  display: inline-block;
  margin-top: 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--text);
  text-decoration: none;
}

.contact-email:hover {
  color: var(--accent);
}

.form-note {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.92rem;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.field input,
.field textarea {
  font: inherit;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 1px;
  padding: 0.8rem 0.9rem;
  width: 100%;
}

.field input:hover,
.field textarea:hover {
  border-color: var(--line-strong);
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 0;
  border-color: var(--accent);
}

.field textarea {
  min-height: 10rem;
  resize: vertical;
}

.form-status {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  min-height: 1.4em;
}

.form-status[data-kind="error"] {
  color: var(--error);
}

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.25rem 0 2.5rem;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: baseline;
}

.site-footer p {
  margin: 0;
  color: var(--text-faint);
  font-size: 0.88rem;
}

.footer-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-nav a:hover {
  color: var(--text);
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(8, 7, 6, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-dialog {
  position: relative;
  width: min(1100px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-frame {
  margin: 0;
  max-height: calc(100vh - 8rem);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-frame img {
  max-width: min(92vw, 1100px);
  max-height: calc(100vh - 10rem);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: var(--shadow);
}

.lightbox-frame figcaption {
  width: min(92vw, 1100px);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.9rem 0.1rem 0;
}

.lightbox-frame h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.25rem;
  margin: 0;
}

.lightbox-frame p {
  margin: 0.15rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.lightbox-counter {
  color: var(--text-faint);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  cursor: pointer;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  display: grid;
  place-items: center;
  padding: 0;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--bg-elevated);
  border-color: var(--accent);
}

.lightbox-close {
  top: 0;
  right: 0;
}

.lightbox-prev,
.lightbox-next {
  top: 46%;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 0;
}

.lightbox-next {
  right: 0;
}

.lightbox-close svg,
.lightbox-prev svg,
.lightbox-next svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .nav-toggle {
    display: block;
    z-index: 60;
  }

  .site-nav {
    position: fixed;
    inset: 0;
    background: rgba(15, 14, 12, 0.97);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 1.6rem;
  }

  .site-nav a {
    font-size: 1rem;
    letter-spacing: 0.2em;
  }

  .featured-grid {
    grid-template-columns: 1fr 1fr;
  }

  .featured-grid .photo-card:nth-child(1),
  .featured-grid .photo-card:nth-child(2),
  .featured-grid .photo-card:nth-child(3),
  .featured-grid .photo-card:nth-child(4),
  .featured-grid .photo-card:nth-child(5),
  .featured-grid .photo-card:nth-child(6) {
    grid-column: span 1;
  }

  .featured-grid .photo-card:nth-child(1) {
    grid-column: 1 / -1;
  }

  .featured-grid .photo-card:nth-child(1) img,
  .featured-grid .photo-card:nth-child(2) img {
    aspect-ratio: 16 / 10;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .about-portrait {
    max-width: 28rem;
  }

  .lightbox-prev,
  .lightbox-next {
    top: auto;
    bottom: 0.25rem;
    transform: none;
  }

  .lightbox-frame {
    padding-bottom: 3.5rem;
  }

  .lightbox-frame figcaption {
    flex-direction: column;
    gap: 0.25rem;
  }
}

@media (max-width: 560px) {
  .gallery-grid,
  .featured-grid {
    grid-template-columns: 1fr;
  }

  .featured-grid .photo-card:nth-child(n) {
    grid-column: 1 / -1;
  }

  .featured-grid .photo-card img,
  .gallery-grid .photo-card img {
    aspect-ratio: 4 / 5;
  }

  .hero {
    min-height: 78vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  .photo-card:hover img,
  .photo-card:focus-visible img {
    transform: none;
  }
}
