/* ===========================================================
   Jim's Shoe Repair — Redesign
   Palette drawn from the real 59th Street awning (dfgrty.jpg):
   charcoal fascia, awning red, mint-cream script, brass accents.
   =========================================================== */

:root {
  --charcoal: #1a1613;
  --red: #c8402e;
  --red-deep: #a3311f;
  --cream-script: #eef0e8;
  --paper: #f7f4ee;
  --paper-dim: #efe9dd;
  --ink: #3a332c;
  --brass: #8a7a5c;
  --white: #ffffff;

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

  --max-w: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --radius: 6px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

section[id],
#top {
  scroll-margin-top: 80px;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

.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;
  background: var(--red);
  color: var(--white);
  padding: 0.75em 1.25em;
  z-index: 1000;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

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

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--red);
  margin: 0 0 0.75rem;
}

.eyebrow-light {
  color: var(--cream-script);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 0.5em;
  color: var(--charcoal);
}

h2 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  font-weight: 600;
}

.lede {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--charcoal);
}

/* ===================== HEADER / NAV ===================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid rgba(26, 22, 19, 0.08);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.85rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  text-decoration: none;
  color: var(--charcoal);
  white-space: nowrap;
}

.wordmark span {
  color: var(--red);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid rgba(26, 22, 19, 0.15);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle-bar {
  width: 20px;
  height: 2px;
  background: var(--charcoal);
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--paper);
  border-bottom: 1px solid rgba(26, 22, 19, 0.08);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--ease);
}

.site-nav.is-open {
  max-height: 24rem;
}

.site-nav a {
  padding: 0.85rem var(--gutter);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-top: 1px solid rgba(26, 22, 19, 0.06);
}

.site-nav a:first-child {
  border-top: none;
}

.nav-cta {
  background: var(--red);
  color: var(--white) !important;
  text-align: center;
}

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

  .site-nav {
    position: static;
    flex-direction: row;
    align-items: center;
    max-height: none;
    overflow: visible;
    background: none;
    border: none;
    gap: 0.5rem;
  }

  .site-nav a {
    border: none;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
  }

  .site-nav a:hover {
    color: var(--red);
  }

  .nav-cta {
    padding: 0.6rem 1.1rem;
    margin-left: 0.5rem;
  }

  .nav-cta:hover {
    background: var(--red-deep);
    color: var(--white);
  }
}

/* ===================== BUTTONS ===================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85em 1.6em;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn-primary {
  background: var(--red);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--red-deep);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--cream-script);
  color: var(--cream-script);
}

.btn-ghost:hover {
  background: var(--cream-script);
  color: var(--charcoal);
  transform: translateY(-1px);
}

/* ===================== HERO ===================== */

.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--charcoal);
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 65%;
  opacity: 0;
  transform: scale(1.06);
  animation: hero-in 1.1s var(--ease) forwards;
}

@keyframes hero-in {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-photo {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26, 22, 19, 0.55) 0%, rgba(26, 22, 19, 0.72) 45%, rgba(26, 22, 19, 0.95) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem var(--gutter) 4rem;
  color: var(--white);
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  max-width: 14ch;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.eyebrow-light {
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.hero-sub {
  max-width: 46ch;
  font-size: 1.1rem;
  color: var(--cream-script);
  margin-bottom: 2rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

/* ===================== SECTIONS (generic) ===================== */

.section {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ===================== ABOUT ===================== */

.about {
  background: var(--paper);
}

.about-grid {
  display: grid;
  gap: 2.5rem;
}

.about-text p {
  max-width: 58ch;
}

.about-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.about-photo {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 2;
}

.about-photo-vintage img {
  filter: sepia(0.15) contrast(1.02);
}

@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3.5rem;
  }
}

/* ===================== SERVICES ===================== */

.services {
  background: var(--paper-dim);
}

.service-categories {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin: 0 0 1.5rem;
  padding: 0;
}

.service-categories li {
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  color: var(--charcoal);
  background: var(--white);
  border: 1px solid var(--brass);
  padding: 0.5em 1em;
  border-radius: 999px;
}

.services-copy {
  max-width: 62ch;
  margin-bottom: 2.5rem;
}

.gallery-hint {
  font-size: 0.85rem;
  color: var(--brass);
  font-weight: 600;
  margin-bottom: 1rem;
}

.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .gallery {
    grid-template-columns: 1fr 1fr;
  }
}

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

.gallery-card {
  background: var(--white);
  border: 1px solid rgba(26, 22, 19, 0.08);
  border-radius: var(--radius);
  padding: 0;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  overflow: hidden;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(26, 22, 19, 0.12);
}

/*
  Each source photo is itself a BEFORE/AFTER collage: a labeled
  "BEFORE" band stacked on top of a labeled "AFTER" band. We show
  only one band at a time by doubling the image height and sliding
  its vertical position, then cropping the frame to just that band.
*/
.gallery-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  background: var(--white);
}

.gallery-img {
  position: absolute;
  left: 0;
  width: 100%;
  height: 200%;
  object-fit: fill;
  transition: opacity 0.35s var(--ease);
}

.gallery-img.is-before {
  top: 0;
}

.gallery-img.is-after {
  top: -100%;
}

.gallery-card[data-state="before"] .gallery-img.is-before {
  opacity: 1;
}

.gallery-card[data-state="before"] .gallery-img.is-after {
  opacity: 0;
}

.gallery-card[data-state="after"] .gallery-img.is-after {
  opacity: 1;
}

.gallery-card[data-state="after"] .gallery-img.is-before {
  opacity: 0;
}

.gallery-caption {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}

.tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2em 0.55em;
  border-radius: 999px;
  display: none;
}

.gallery-card[data-state="before"] .tag-before,
.gallery-card[data-state="after"] .tag-after {
  display: inline-block;
  background: var(--red);
  color: var(--white);
}

/* No-JS fallback: the toggle can't be clicked without JS, so show the
   whole source collage (both BEFORE and AFTER bands) plainly instead
   of hiding half of it. Nothing about the repair proof is lost. */
.no-js .gallery-frame {
  aspect-ratio: auto;
}

.no-js .gallery-img.is-before,
.no-js .gallery-img.is-after {
  position: static;
  opacity: 1;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.no-js .gallery-img.is-after {
  display: none;
}

.no-js .tag-before,
.no-js .tag-after {
  display: none;
}

/* ===================== MAIL IN ===================== */

.mail-in {
  background: var(--charcoal);
  color: var(--cream-script);
}

.mail-in h2 {
  color: var(--white);
}

.mail-in-copy {
  max-width: 48ch;
  margin-bottom: 1.75rem;
  color: var(--cream-script);
}

.mail-in-note {
  font-size: 0.8rem;
  color: var(--brass);
  margin-top: 0.75rem;
}

.mail-in-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 900px) {
  .mail-in-grid {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}

.steps li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.step-num {
  flex: none;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
}

.steps p {
  margin: 0.4rem 0 0;
}

/* ===================== TESTIMONIALS ===================== */

.testimonials {
  background: var(--paper);
}

.testimonial-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

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

.testimonial-card {
  margin: 0;
  background: var(--white);
  border: 1px solid rgba(26, 22, 19, 0.08);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.testimonial-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
}

.testimonial-card p {
  font-size: 0.98rem;
}

.testimonial-card footer {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
}

.testimonial-card cite {
  font-style: normal;
  font-weight: 700;
}

.testimonial-card footer span {
  color: var(--brass);
}

.testimonial-card-tweet .tweet-mark {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--red);
  margin: 0 0 0.5rem;
}

/* ===================== LOCATIONS ===================== */

.locations {
  background: var(--paper-dim);
}

.location-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

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

.location-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(26, 22, 19, 0.08);
}

.location-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.location-card-body {
  padding: 1.25rem 1.4rem;
}

.location-tag {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--red);
  margin: 0 0 0.4rem;
}

.location-address {
  margin: 0;
  color: var(--ink);
}

.location-card-main {
  box-shadow: 0 8px 24px rgba(26, 22, 19, 0.1);
}

/* ===================== FOOTER ===================== */

.site-footer {
  background: var(--charcoal);
  color: var(--cream-script);
  padding: 3.5rem 0 1.5rem;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  gap: 2.25rem;
}

@media (min-width: 780px) {
  .footer-inner {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
}

.wordmark-footer {
  font-size: 1.5rem;
  color: var(--white);
  margin: 0 0 0.5rem;
}

.wordmark-footer span {
  color: var(--red);
}

.footer-tagline {
  color: var(--brass);
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cream-script);
  border-bottom: 1px solid transparent;
}

.footer-social a:hover {
  border-color: var(--red);
}

.footer-col h3 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brass);
  margin: 0 0 0.9rem;
}

.footer-col p {
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
}

.footer-col a {
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--red);
}

.footer-bottom {
  max-width: var(--max-w);
  margin: 2.5rem auto 0;
  padding: 1.25rem var(--gutter) 0;
  border-top: 1px solid rgba(238, 240, 232, 0.12);
  font-size: 0.8rem;
  color: var(--brass);
}
