/* ============================================================
   Todaro Bros. — Home of Fine Italian Foods since 1917
   Heritage Italian specialty grocer · Murray Hill, NYC
   ============================================================ */

/* ---- Design tokens ---- */
:root {
  --ink:      #1c1815;   /* near-black, from the wordmark */
  --brick:    #9b1c22;   /* brick red, from the original site CSS */
  --brick-dk: #7a141a;
  --cream:    #f2e8d8;   /* parchment background, from jar labels */
  --wheat:    #e4d3b3;   /* deeper tan, section alternation */
  --olive:    #3f4a35;   /* muted olive, small accents */
  --walnut:   #6b5842;   /* warm brown, hairlines + secondary text */
  --walnut-2: #8a755c;

  --edge: rgba(107, 88, 66, 0.28);

  --maxw: 1180px;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: clamp(0.8rem, 0.77rem + 0.15vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  --step-1:  clamp(1.18rem, 1.08rem + 0.5vw, 1.5rem);
  --step-2:  clamp(1.55rem, 1.35rem + 1vw, 2.35rem);
  --step-3:  clamp(2.1rem, 1.75rem + 2vw, 3.75rem);
  --step-4:  clamp(2.9rem, 2.2rem + 3.6vw, 6rem);
}

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

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; height: auto; }
a { color: var(--brick); text-decoration: none; }
a:hover { text-decoration: underline; }

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.08;
  color: var(--ink);
  margin: 0;
  font-optical-sizing: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brick);
  color: #fff;
  padding: 0.7rem 1.1rem;
  z-index: 100;
  border-radius: 0 0 8px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; text-decoration: none; }

/* Shared layout helpers — each major inner block is centered + padded */
.header-inner,
.hero-inner,
.history,
.counter,
.signatures-inner,
.visit,
.footer-inner,
.footer-base {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--walnut);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.eyebrow::before {
  content: "";
  width: 2.2rem;
  height: 2px;
  background: currentColor;
  flex: none;
}
.eyebrow-red { color: var(--brick); }
.eyebrow-cream { color: var(--wheat); }

/* Offset anchor targets so the sticky header never covers a heading */
.history, .counter, .signatures, .visit { scroll-margin-top: 84px; }

.section-head { max-width: 34ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-title {
  font-size: var(--step-3);
  letter-spacing: -0.015em;
}
.section-title-light { color: var(--cream); }

/* ============================================================
   Header / Nav
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--edge);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.6rem;
}
.brand { display: inline-flex; align-items: center; }
.brand:hover { text-decoration: none; }
.brand-logo { width: auto; height: 52px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.7rem;
}
.site-nav > a {
  color: var(--ink);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.site-nav > a:hover { color: var(--brick); text-decoration: none; }

.nav-call {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.1;
  background: var(--brick);
  color: #fff !important;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  text-align: center;
}
.nav-call:hover { background: var(--brick-dk); text-decoration: none; }
.nav-call-label {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.85;
}
.nav-call-number { font-weight: 600; font-size: var(--step--1); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 40px;
  padding: 0 9px;
  background: none;
  border: 1px solid var(--edge);
  border-radius: 9px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--edge);
    padding: 0.25rem var(--gutter) 1.4rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .site-nav[data-nav-open="true"] {
    max-height: 26rem;
  }
  /* No-JS fallback: the toggle can't work, so show the nav inline. */
  html:not(.js) .nav-toggle { display: none; }
  html:not(.js) .site-nav {
    position: static;
    max-height: none;
    overflow: visible;
    border-bottom: none;
    padding: 0 0 0.5rem;
  }
  .site-nav > a {
    padding: 0.95rem 0.2rem;
    border-bottom: 1px solid var(--edge);
    font-size: 0.95rem;
  }
  .nav-call { margin-top: 1.1rem; flex-direction: row; gap: 0.4rem; justify-content: center; padding: 0.85rem; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding-block: clamp(2.75rem, 6vw, 5rem) clamp(2.5rem, 5vw, 4rem);
  background: radial-gradient(120% 90% at 50% -20%, var(--wheat) 0%, var(--cream) 58%);
  border-bottom: 1px solid var(--edge);
}
.hero-inner {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}
@media (min-width: 920px) {
  .hero-inner { grid-template-columns: 1.02fr 0.98fr; }
}
.hero-title {
  font-size: var(--step-4);
  letter-spacing: -0.025em;
  margin-bottom: 1.15rem;
}
.hero-title-since { font-style: italic; color: var(--brick); }
.hero-lede {
  font-size: var(--step-1);
  color: var(--walnut);
  max-width: 40ch;
  margin: 0 0 1.75rem;
  line-height: 1.45;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  border: 1px solid var(--brick);
  border-radius: 999px;
  padding: 0.4rem 1.25rem;
  margin: 0 0 1.9rem;
}
.hero-badge-mark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--brick);
  letter-spacing: -0.02em;
  flex: none;
}
.hero-badge-text {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brick);
  line-height: 1.25;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: var(--step-0);
  border: 1.5px solid var(--brick);
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.btn-primary { background: var(--brick); color: #fff; }
.btn-primary:hover { background: var(--brick-dk); border-color: var(--brick-dk); text-decoration: none; }
.btn-quiet { background: transparent; color: var(--brick); }
.btn-quiet:hover { background: var(--brick); color: #fff; text-decoration: none; }

.hero-figure {
  margin: 0;
  background: #fff;
  padding: clamp(0.6rem, 1.5vw, 1rem);
  border: 1px solid var(--edge);
  box-shadow: 0 26px 50px -30px rgba(28, 24, 21, 0.55);
  transform: rotate(-0.6deg);
}
.hero-photo { width: 100%; }
.hero-caption {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-style: italic;
  color: var(--walnut);
  text-align: center;
  padding: 0.75rem 0.5rem 0.2rem;
}

/* ============================================================
   History + generation timeline (signature)
   ============================================================ */
.history { padding-block: clamp(3.5rem, 7vw, 6rem); }
.history-body {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: start;
}
@media (min-width: 900px) {
  .history-body { grid-template-columns: 1.15fr 0.85fr; }
}
.history-prose p { margin: 0 0 1.15rem; max-width: 60ch; }
.history-prose p:last-child { margin-bottom: 0; }

.pull-quote {
  margin: 0;
  border-left: 3px solid var(--brick);
  padding-left: 1.3rem;
}
.pull-quote p {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: var(--step-2);
  line-height: 1.28;
  margin: 0;
  color: var(--ink);
}

.timeline-wrap {
  margin-top: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--edge);
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
}
.timeline-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: var(--step-2);
  color: var(--ink);
  margin: 0 0 2.25rem;
}
.timeline-arrow { color: var(--brick); }

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.gen {
  position: relative;
  padding: 0 0 1.9rem 2.2rem;
  border-left: 2px solid var(--brick);
}
.gen:last-child { padding-bottom: 0; }
.gen::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--brick);
  border: 3px solid var(--cream);
}
.gen-year {
  font-family: var(--serif);
  font-weight: 700;
  font-size: var(--step-2);
  color: var(--brick);
  line-height: 1;
  margin: 0 0 0.3rem;
}
.gen-name { font-size: var(--step-1); margin: 0 0 0.35rem; }
.gen-note {
  font-size: var(--step--1);
  color: var(--walnut);
  line-height: 1.55;
  margin: 0;
  max-width: 42ch;
}

@media (min-width: 1000px) {
  .timeline { grid-template-columns: repeat(4, 1fr); }
  .gen {
    padding: 2.4rem 1.5rem 0 0;
    border-left: none;
    border-top: 2px solid var(--brick);
  }
  .gen::before { left: 0; top: -8px; }
  .gen-note { max-width: none; }
}

/* ============================================================
   The Counter — departments
   ============================================================ */
.counter {
  padding-block: clamp(3.5rem, 7vw, 6rem);
  background: var(--wheat);
  border-block: 1px solid var(--edge);
}
.counter-grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
@media (min-width: 900px) {
  .counter-grid { grid-template-columns: 1.15fr 0.85fr; }
}
.counter-lede { max-width: 52ch; color: var(--ink); margin: 0; }

.counter-figure {
  margin: 0;
  background: #fff;
  padding: 0.7rem;
  border: 1px solid var(--edge);
  box-shadow: 0 20px 42px -28px rgba(28, 24, 21, 0.5);
}
.counter-photo { width: 100%; }
.counter-figure figcaption {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-style: italic;
  color: var(--walnut);
  text-align: center;
  padding: 0.6rem 0.3rem 0.1rem;
}

.departments {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1px;
  background: var(--edge);
  border: 1px solid var(--edge);
}
.dept {
  background: var(--cream);
  padding: 1.15rem 1.3rem 1.25rem;
}
.dept-label {
  font-family: var(--serif);
  font-weight: 600;
  font-size: var(--step-1);
  margin: 0 0 0.3rem;
}
.dept-desc {
  font-size: var(--step--1);
  color: var(--walnut);
  margin: 0;
  line-height: 1.5;
}

/* ============================================================
   Todaro Signatures (dark band)
   ============================================================ */
.signatures {
  background: var(--ink);
  color: var(--cream);
  padding-block: clamp(3.5rem, 7vw, 6rem);
}
.signatures-inner {
  display: grid;
  gap: clamp(2.25rem, 4vw, 4rem);
  align-items: center;
}
@media (min-width: 900px) {
  .signatures-inner { grid-template-columns: 0.9fr 1.1fr; }
}
.signatures-lede {
  font-size: var(--step-1);
  color: var(--wheat);
  max-width: 44ch;
  margin: 0 0 1.5rem;
  line-height: 1.5;
}
.signatures-lede em { font-style: italic; color: #fff; }
.signatures-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0; }
.tag {
  border: 1px solid rgba(242, 232, 216, 0.35);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--cream);
}

.signatures-figures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2.5vw, 1.75rem);
}
.sig-figure {
  margin: 0;
  background: var(--cream);
  border: 1px solid rgba(242, 232, 216, 0.2);
  overflow: hidden;
  box-shadow: 0 22px 44px -30px rgba(0, 0, 0, 0.7);
}
.sig-figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.sig-figure figcaption {
  font-family: var(--sans);
  font-size: var(--step--1);
  color: var(--walnut);
  padding: 0.75rem 0.9rem 0.9rem;
  font-style: italic;
}
@media (max-width: 520px) {
  .signatures-figures { grid-template-columns: 1fr; }
}

/* ============================================================
   Visit
   ============================================================ */
.visit {
  padding-block: clamp(3.5rem, 7vw, 6rem);
}
.visit-grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: stretch;
}
@media (min-width: 900px) {
  .visit-grid { grid-template-columns: 0.85fr 1.15fr; }
}
.visit-address {
  font-style: normal;
  margin: 1.75rem 0 0;
}
.visit-address p { margin: 0 0 0.2rem; font-size: var(--step-1); font-family: var(--serif); }
.visit-line-strong { font-weight: 700; }

.visit-contact { margin: 1.75rem 0 0; display: grid; gap: 1.1rem; }
.visit-contact-row dt {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--walnut);
  margin-bottom: 0.2rem;
}
.visit-contact-row dd { margin: 0; font-size: var(--step-1); font-family: var(--serif); }
.visit-contact-row dd a { color: var(--ink); }

.social {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.social a {
  display: inline-flex;
  border: 1px solid var(--edge);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--ink);
}
.social a:hover { background: var(--brick); border-color: var(--brick); color: #fff; text-decoration: none; }

.visit-map {
  border: 1px solid var(--edge);
  overflow: hidden;
  min-height: 340px;
  background: var(--wheat);
}
.visit-map iframe {
  width: 100%;
  height: 100%;
  min-height: 340px;
  border: 0;
  display: block;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: #14110f;
  color: var(--walnut-2);
  padding-top: clamp(2.5rem, 5vw, 3.75rem);
  font-size: var(--step--1);
}
.footer-inner {
  display: grid;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 760px) {
  .footer-inner { grid-template-columns: 1.4fr 1fr; }
}
.footer-logo { width: 120px; height: auto; margin-bottom: 1rem; filter: invert(1) brightness(1.6); }
.footer-tagline { margin: 0; font-family: var(--serif); font-style: italic; font-size: var(--step-1); color: var(--wheat); max-width: 30ch; }
.footer-detail p { margin: 0 0 0.5rem; }
.footer-detail a { color: var(--wheat); }
.footer-detail a:hover { color: #fff; text-decoration: none; }
.footer-social {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
}
.footer-social a { color: var(--walnut-2); }
.footer-social a:hover { color: var(--cream); }

.footer-base {
  margin-top: 2.5rem;
  border-top: 1px solid rgba(242, 232, 216, 0.12);
  padding-block: 1.4rem 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  justify-content: space-between;
  color: var(--walnut);
}
.footer-base p { margin: 0; }

/* ============================================================
   Scroll reveal — only hides when JS is present (html.js), so the
   page is fully visible with JavaScript disabled.
   ============================================================ */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s ease, transform .7s ease;
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
}
