/* ==========================================================================
   Eastside Art Gallery Inc — Custom Picture Framing Shop
   Design tokens: navy + gold + parchment, pulled from the shop's own
   business card and gold-frame product photography.
   ========================================================================== */

:root {
  --navy: #1c2b4a;
  --navy-deep: #131e33;
  --gold: #b6862c;
  --gold-light: #d9ac52;
  --parchment: #f4ede1;
  --charcoal: #2a241d;
  --plaster: #dcd6cb;
  --white: #fffdfa;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;

  --radius: 2px;
  --max-width: 1180px;

  --shadow-card: 0 8px 24px rgba(28, 43, 74, 0.10);
  --transition: 220ms ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--parchment);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; font-weight: 600; }
p { margin: 0 0 var(--space-2); }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

/* Visible focus ring everywhere, in gold */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--navy-deep);
  padding: 0.75em 1.25em;
  z-index: 200;
  font-weight: 600;
}
.skip-link:focus {
  left: var(--space-2);
  top: var(--space-2);
}

/* ---- Mitre-corner signature motif ---------------------------------------
   A 45-degree bracket echoing the mitred corner joints visible in the
   shop's own frame-corner sample photos. Used as a structural device:
   framing the hero photo, marking section labels, dividing the footer.
   ---------------------------------------------------------------------- */
.mitre {
  position: relative;
  display: inline-block;
}
.mitre-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  pointer-events: none;
}
.mitre-corner svg { width: 100%; height: 100%; display: block; }
.mitre-corner.tl { top: -10px; left: -10px; transform: rotate(0deg); }
.mitre-corner.tr { top: -10px; right: -10px; transform: rotate(90deg); }
.mitre-corner.bl { bottom: -10px; left: -10px; transform: rotate(-90deg); }
.mitre-corner.br { bottom: -10px; right: -10px; transform: rotate(180deg); }

.mitre-frame {
  position: relative;
  padding: var(--space-2);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-1);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}

/* ---- Header / Nav -------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}
.wordmark {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.01em;
  line-height: 1.1;
}
.wordmark span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-top: 2px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius);
  color: var(--white);
  width: 42px;
  height: 38px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.nav-links {
  display: flex;
  gap: var(--space-3);
}
.nav-links a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--white);
  opacity: 0.88;
  transition: opacity var(--transition), color var(--transition);
  padding: 0.25em 0;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover,
.nav-links a:focus-visible {
  opacity: 1;
  color: var(--gold-light);
  border-bottom-color: var(--gold-light);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  padding: 0.75em 1.4em;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  white-space: nowrap;
}
.btn-call {
  background: var(--gold);
  color: var(--navy-deep);
}
.btn-call:hover, .btn-call:focus-visible {
  background: var(--gold-light);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}
.btn-outline:hover, .btn-outline:focus-visible {
  background: var(--navy);
  color: var(--white);
}
.btn-outline.on-dark {
  border-color: rgba(255,255,255,0.55);
  color: var(--white);
}
.btn-outline.on-dark:hover, .btn-outline.on-dark:focus-visible {
  background: var(--white);
  color: var(--navy-deep);
}

/* ---- Hero ---------------------------------------------------------------- */
.hero {
  padding: var(--space-6) 0 var(--space-6);
  background: var(--navy);
}
.hero .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}
.hero-copy {
  color: var(--white);
  padding-top: var(--space-3);
}
.hero-copy .eyebrow { color: var(--gold-light); }
.hero-copy .eyebrow::before { background: var(--gold-light); }
.hero-title {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  line-height: 1.08;
  margin-bottom: var(--space-2);
}
.hero-sub {
  font-size: 1.1rem;
  max-width: 42ch;
  color: var(--plaster);
  margin-bottom: var(--space-3);
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.hero-photo-wrap {
  margin: 0 auto;
  max-width: 620px;
  width: 100%;
}
.hero-photo-frame {
  padding: var(--space-2);
  background: var(--white);
  box-shadow: var(--shadow-card);
}
.hero-photo-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.hero-photo-frame .mitre-corner path { stroke: var(--gold); }

/* ---- Generic section spacing --------------------------------------------- */
.section {
  padding: var(--space-6) 0;
}
.section-alt {
  background: var(--white);
}
.section-title {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  margin-bottom: var(--space-3);
  max-width: 22ch;
}

/* ---- Story ---------------------------------------------------------------- */
.story-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: center;
}
.story-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  box-shadow: var(--shadow-card);
}
.story-text p {
  font-size: 1.05rem;
  max-width: 60ch;
}
.est-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-top: var(--space-3);
  padding: 0.6em 1.1em;
  border: 1.5px solid var(--gold);
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius);
}

/* ---- Services -------------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
.service-card {
  background: var(--white);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition);
}
.service-card:hover { transform: translateY(-3px); }
.service-photo {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--plaster);
}
.service-photo img { width: 100%; height: 100%; object-fit: cover; }
.service-icon {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--plaster);
}
.service-icon svg { width: 56px; height: 56px; }
.service-icon svg path,
.service-icon svg polyline { stroke: var(--navy); }
.service-body {
  padding: var(--space-2) var(--space-3) var(--space-3);
}
.service-body h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4em;
}
.service-body p {
  font-size: 0.92rem;
  color: var(--charcoal);
  opacity: 0.85;
  margin-bottom: 0;
}
.services-closing {
  margin-top: var(--space-4);
  text-align: center;
}
.services-closing p {
  font-size: 1.05rem;
  max-width: 50ch;
  margin: 0 auto var(--space-2);
}

/* ---- Gallery ---------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
}
.gallery-item {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  cursor: pointer;
  border: none;
  padding: 0;
  display: block;
  width: 100%;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 400ms ease;
}
.gallery-item:hover img,
.gallery-item:focus-visible img {
  transform: scale(1.06);
}
.gallery-item.muted img { opacity: 0.82; }
.gallery-item .gallery-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(0deg, rgba(19,30,51,0.82), transparent);
  color: var(--white);
  font-size: 0.78rem;
  padding: 1.4em 0.8em 0.6em;
  text-align: left;
  opacity: 0;
  transition: opacity var(--transition);
}
.gallery-item:hover .gallery-caption,
.gallery-item:focus-visible .gallery-caption {
  opacity: 1;
}

/* Lightbox (progressive enhancement only) */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(19, 30, 51, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-3);
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: min(90vw, 900px);
  max-height: 82vh;
  width: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-caption {
  color: var(--plaster);
  text-align: center;
  margin-top: var(--space-2);
  font-size: 0.9rem;
}
.lightbox-close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  background: none;
  border: 1.5px solid rgba(255,255,255,0.5);
  color: var(--white);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-figure { position: relative; display: flex; flex-direction: column; align-items: center; }

/* ---- Visit ---------------------------------------------------------------- */
.visit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
.visit-facts {
  background: var(--navy);
  color: var(--white);
  padding: var(--space-4);
}
.visit-facts .eyebrow { color: var(--gold-light); }
.visit-facts .eyebrow::before { background: var(--gold-light); }
.visit-facts h2 { color: var(--white); margin-bottom: var(--space-3); }
.fact-row {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
.fact-row:last-of-type { border-bottom: none; }
.fact-row dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-light);
  min-width: 6.5em;
}
.fact-row dd {
  margin: 0;
  font-size: 0.98rem;
}
.fact-row a { text-decoration: underline; text-decoration-color: rgba(255,255,255,0.4); }
.fact-row a:hover { text-decoration-color: var(--gold-light); }

.hours-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.2em;
}
.hours-table td {
  padding: 0.15em 0;
  font-size: 0.95rem;
}
.hours-table td:first-child { color: var(--plaster); padding-right: 1em; }

.visit-form {
  background: var(--white);
  padding: var(--space-4);
  box-shadow: var(--shadow-card);
}
.visit-form h3 { font-size: 1.2rem; margin-bottom: 0.3em; }
.visit-form .form-note { font-size: 0.9rem; opacity: 0.75; margin-bottom: var(--space-3); }
.form-field {
  margin-bottom: var(--space-2);
}
.form-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 0.4em;
}
.form-field input,
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.7em 0.8em;
  border: 1.5px solid var(--plaster);
  border-radius: var(--radius);
  background: var(--parchment);
  color: var(--charcoal);
}
.form-field textarea { resize: vertical; min-height: 100px; }
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--gold);
  outline: none;
}
.form-submit {
  width: 100%;
  margin-top: var(--space-1);
}
.form-success {
  display: none;
  background: var(--plaster);
  color: var(--navy-deep);
  padding: 0.9em 1em;
  font-size: 0.92rem;
  margin-top: var(--space-2);
  border-left: 3px solid var(--gold);
}
.form-success.is-visible { display: block; }

/* ---- Footer ---------------------------------------------------------------- */
.site-footer {
  background: var(--navy-deep);
  color: var(--plaster);
  padding: var(--space-4) 0 var(--space-3);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  align-items: start;
}
.footer-wordmark {
  font-family: var(--font-display);
  color: var(--white);
  font-size: 1.15rem;
  margin-bottom: 0.3em;
}
.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
}
.footer-nav a {
  text-decoration: none;
  font-size: 0.88rem;
  color: var(--plaster);
  opacity: 0.85;
}
.footer-nav a:hover { opacity: 1; color: var(--gold-light); }
.footer-bottom {
  margin-top: var(--space-3);
  padding-top: var(--space-2);
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  opacity: 0.65;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em 1.5em;
  justify-content: space-between;
}

/* ---- Scroll reveal (progressive enhancement) ------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
/* No-JS fallback: never hide content if JS doesn't run */
.no-js .reveal { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive — tablet and up
   ========================================================================== */
@media (min-width: 640px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr auto; }
}

@media (min-width: 900px) {
  .hero .container {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
  }
  .hero-photo-wrap { margin: 0; }
  .story-grid { grid-template-columns: 1fr 1fr; }
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .visit-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
  .nav-toggle { display: none; }
}

/* ---- Mobile nav ------------------------------------------------------------ */
@media (max-width: 719px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    inset: 64px 0 0 0;
    background: var(--navy);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-3);
    gap: var(--space-3);
    transform: translateX(100%);
    transition: transform var(--transition);
    overflow-y: auto;
  }
  .main-nav.is-open { transform: translateX(0); }
  .nav-links {
    flex-direction: column;
    gap: var(--space-2);
    width: 100%;
  }
  .nav-links a { font-size: 1.1rem; display: block; }
  .main-nav .btn { width: 100%; }
}

@media (min-width: 720px) {
  .main-nav { display: flex; }
}
