/* ==========================================================================
   Izograph Studio - site styles
   Replaces styles/style.css (fixed 1000px, float-based, table layouts).
   ========================================================================== */

:root {
  --brand:        #ff9933;
  --brand-dark:   #e07d1c;
  --ink:          #2b1608;   /* deep warm brown - 9.9:1 on brand orange */
  --ink-soft:     #5a3a22;
  --surface:      #fffaf4;
  --surface-edge: #f0dcc6;
  --dark:         #171310;   /* gallery bed - icons read best on dark */
  --dark-soft:    #241d18;
  --focus:        #1b4fd8;

  --wrap:      1180px;
  --radius:    10px;
  --gap:       clamp(0.75rem, 2vw, 1.25rem);
  --pad-block: clamp(1.75rem, 5vw, 3.5rem);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--brand);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--ink); text-underline-offset: 0.18em; }
a:hover { color: #000; }

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

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 0.75rem 1.25rem;
  text-decoration: none; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ---------------------------------------------------------------- header */
.site-header {
  background: var(--brand);
  border-bottom: 2px solid rgba(43, 22, 8, 0.18);
}

.header-inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 1rem clamp(1rem, 4vw, 2rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap);
}

.logo { flex: 0 0 auto; line-height: 0; }
.logo img { width: clamp(170px, 22vw, 240px); height: auto; }

/* mobile toggle -- hidden on desktop */
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 46px; height: 42px;
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 50%; transform: translateX(-50%);
  width: 22px; height: 2px;
  background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle-bar          { top: 50%; margin-top: -1px; }
.nav-toggle-bar::before  { top: -7px; left: 0; transform: none; }
.nav-toggle-bar::after   { top:  7px; left: 0; transform: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar          { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before  { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after   { transform: translateY(-7px) rotate(-45deg); }

/* ------------------------------------------------------------------- nav */
.site-nav {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
}

.nav-list,
.nav-sub {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-end;
  gap: clamp(0.5rem, 1.6vw, 1.4rem);
}

.nav-list > li > a {
  display: inline-block;
  padding: 0.4rem 0.15rem;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.nav-list > li > a:hover,
.nav-list > li.is-current > a { border-bottom-color: var(--ink); }

.nav-sub {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.85rem;
}
.nav-sub a {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0.85;
  border-bottom: 2px solid transparent;
}
.nav-sub a:hover,
.nav-sub li.is-current a { opacity: 1; border-bottom-color: var(--ink); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav {
    flex: 1 0 100%;
    margin-left: 0;
    align-items: stretch;
    gap: 0;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list > li { width: 100%; border-top: 1px solid rgba(43,22,8,.15); }
  .nav-list > li > a { padding: 0.7rem 0; width: 100%; }
  .nav-sub {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.25rem 0 0.5rem 1rem;
    border-top: 1px solid rgba(43,22,8,.15);
  }
  .nav-sub a { display: inline-block; padding: 0.4rem 0; }
}

/* ------------------------------------------------------------------ main */
.site-main { padding-block: var(--pad-block); }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}
.wrap.narrow { max-width: 62ch; }

h1 {
  font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h2 { font-size: clamp(1.2rem, 1rem + 0.7vw, 1.5rem); line-height: 1.25; }

.lede, .intro {
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 0 2rem;
}

/* ------------------------------------------------------------------ home */
.home { text-align: center; }
.home .lede { margin-inline: auto; }

.home-figure {
  margin: 0 auto 2rem;
  max-width: 486px;
}
.home-figure img {
  width: 100%;
  border: 6px solid var(--ink);
  border-radius: 4px;
  background: var(--dark);
}

.home-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }

.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  background: var(--ink);
  color: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
}
.btn:hover { background: #000; color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--surface); }

/* --------------------------------------------------------------- gallery */
.grid {
  list-style: none;
  margin: 0;
  padding: var(--gap);
  background: var(--dark);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr));
  gap: var(--gap);
}

.grid-item { margin: 0; }

.shot {
  display: block;
  position: relative;
  background: var(--dark-soft);
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  cursor: zoom-in;
}
.shot img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .35s ease, opacity .35s ease;
}
.shot:hover img,
.shot:focus-visible img { transform: scale(1.045); opacity: .9; }

/* ----------------------------------------------------------- gallery cards */
.cards {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: clamp(1rem, 3vw, 2rem);
}
.card a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--surface-edge);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  height: 100%;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card a:hover { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(43,22,8,.28); }
.card img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--dark); }
.card h2 { margin: 0.9rem 1rem 0.25rem; }
.card p  { margin: 0 1rem 1.15rem; color: var(--ink-soft); font-size: 0.95rem; }

/* --------------------------------------------------------------- contact */
.contact-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.contact-list li {
  display: flex; flex-wrap: wrap; gap: 0.35rem 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(43,22,8,.18);
}
.contact-list span {
  flex: 0 0 7rem;
  font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------------------------------------------------------------- footer */
.site-footer {
  border-top: 2px solid rgba(43,22,8,.18);
  padding: 1.75rem clamp(1rem, 4vw, 2rem);
  text-align: center;
  font-size: 0.9rem;
}
.site-footer p { margin: 0; }

/* -------------------------------------------------------------- lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(10, 8, 6, 0.96);
  display: grid;
  place-items: center;
  padding: clamp(0.75rem, 3vw, 2.5rem);
}
.lightbox[hidden] { display: none; }

.lb-figure {
  margin: 0;
  max-width: 100%; max-height: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 0.85rem;
}
.lb-img {
  max-width: 100%;
  max-height: 82vh;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 4px;
  background: #000;
}
.lb-caption {
  color: #f3ece4;
  font-size: 0.92rem;
  text-align: center;
  max-width: 65ch;
}

.lightbox button {
  position: absolute;
  background: rgba(255,255,255,.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 50%;
  cursor: pointer;
  display: grid; place-items: center;
  line-height: 1;
  transition: background .15s ease;
}
.lightbox button:hover { background: rgba(255,255,255,.24); }

.lb-close { top: clamp(.5rem,2vw,1.25rem); right: clamp(.5rem,2vw,1.25rem); width: 46px; height: 46px; font-size: 1.9rem; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 2.1rem; }
.lb-prev { left:  clamp(.4rem,2vw,1.5rem); }
.lb-next { right: clamp(.4rem,2vw,1.5rem); }

.lb-loading .lb-img { opacity: .35; }

body.lb-open { overflow: hidden; }

@media (max-width: 560px) {
  .lb-prev, .lb-next { width: 42px; height: 42px; font-size: 1.7rem; }
  .lb-img { max-height: 70vh; }
}

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

@media print {
  .site-header, .site-footer, .lightbox { display: none !important; }
  body { background: #fff; color: #000; }
  .grid { background: none; padding: 0; }
}
