/* ==========================================================================
   Loaf & Crumb Bakery — Compound Standard
   Brand: warm, honest, editorial
   Palette: Paper #F5EDE0 | Ink #1A1816 | Terracotta #C45A3D | Oatmeal #E8DCC4
   Fonts: Fraunces (display) | Inter Tight (body) | IBM Plex Mono (accents)
   Mobile-first · No !important · No inline styles
   ========================================================================== */

/* --- Reset & base ------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --paper: #F5EDE0;
  --ink: #1A1816;
  --ink-70: rgba(26, 24, 22, 0.7);
  --ink-30: rgba(26, 24, 22, 0.3);
  --terracotta: #C45A3D;
  --terracotta-dark: #A8472F;
  --oatmeal: #E8DCC4;
  --white: #FFFFFF;
  --sans: 'Inter Tight', system-ui, -apple-system, sans-serif;
  --display: 'Fraunces', Georgia, serif;
  --mono: 'IBM Plex Mono', 'Courier New', monospace;
  --max-width: 1280px;
  --content-width: 720px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --radius: 8px;
}

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

body {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
}

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

a {
  color: var(--terracotta);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:focus-visible {
  color: var(--terracotta-dark);
}

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

/* --- Typography -------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.15;
}

h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.6rem); margin-bottom: var(--space-sm); }
h3 { font-size: clamp(1.2rem, 3vw, 1.8rem); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--terracotta);
  margin-bottom: var(--space-xs);
}

.accent-text {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

p {
  margin-bottom: var(--space-sm);
  max-width: 65ch;
}

/* --- Utility ----------------------------------------------------- */

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

.text-center { text-align: center; }

.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;
}

/* --- Navigation -------------------------------------------------- */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--ink-30);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav-logo {
  font-family: var(--display);
  font-size: 1.2rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.nav-logo:hover {
  color: var(--terracotta);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--ink);
}

.nav-toggle svg {
  display: block;
}

.nav-links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--ink-70);
  position: relative;
}

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

.nav-links a[aria-current="page"]::after {
  content: '';
  display: block;
  height: 2px;
  background: var(--terracotta);
  margin-top: 2px;
}

@media (max-width: 767px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--ink-30);
    gap: var(--space-xs);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: var(--space-xs) 0;
    font-size: 1rem;
  }
}

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

.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
  padding-top: 80px;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(26, 24, 22, 0.45) 0%,
    rgba(26, 24, 22, 0.65) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--content-width);
  padding: var(--space-xl) var(--space-md);
}

.hero-content h1 {
  font-weight: 300;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.hero-content h1 span {
  display: block;
}

.hero-content h1 .sub {
  font-size: 0.45em;
  font-family: var(--sans);
  font-weight: 300;
  letter-spacing: 0.02em;
  margin-top: var(--space-xs);
  opacity: 0.8;
}

.hero-cta {
  display: inline-flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
}

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

.btn-primary:hover {
  background: var(--terracotta-dark);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--ink);
}

/* --- Sections ---------------------------------------------------- */

.section {
  padding: var(--space-2xl) 0;
}

.section-alt {
  background: var(--oatmeal);
}

.section-intro {
  max-width: var(--content-width);
  margin: 0 auto var(--space-xl);
  text-align: center;
}

/* --- Grid cards -------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(26, 24, 22, 0.08);
}

.card-img {
  aspect-ratio: 4 / 3;
  background: var(--oatmeal);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-30);
  font-family: var(--mono);
  font-size: 0.75rem;
  overflow: hidden;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: var(--space-sm) var(--space-md);
}

.card-body h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
}

.card-body p {
  font-size: 0.9rem;
  color: var(--ink-70);
  margin-bottom: 0;
}

.card-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--terracotta);
  color: var(--white);
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  margin-bottom: var(--space-xs);
}

/* --- Opening hours table ----------------------------------------- */

.hours-table {
  width: 100%;
  max-width: 480px;
  border-collapse: collapse;
  font-family: var(--sans);
}

.hours-table td {
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--ink-30);
  font-size: 0.95rem;
}

.hours-table td:last-child {
  text-align: right;
  color: var(--ink-70);
}

.hours-table .today td {
  font-weight: 600;
  color: var(--terracotta);
}

.hours-table .today td:last-child {
  color: var(--terracotta);
}

/* --- Open / closed badge ----------------------------------------- */

.open-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  margin-bottom: var(--space-sm);
}

.open-badge.open {
  background: #e6f4e6;
  color: #2d6a2d;
}

.open-badge.closed {
  background: #fce8e6;
  color: #a8472f;
}

.open-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.open-badge.open .dot { background: #2d6a2d; }
.open-badge.closed .dot { background: #a8472f; }

/* --- Map --------------------------------------------------------- */

.map-wrapper {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  margin: var(--space-md) 0;
}

.map-wrapper iframe {
  width: 100%;
  height: 350px;
  border: 0;
  display: block;
}

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

.contact-form {
  max-width: 560px;
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-70);
  margin-bottom: var(--space-xs);
}

.form-group input,
.form-group textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--ink-30);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--terracotta);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.btn-submit {
  background: var(--ink);
  color: var(--white);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.85rem 2.5rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.25s ease;
}

.btn-submit:hover {
  background: var(--terracotta);
}

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

footer {
  border-top: 1px solid var(--ink-30);
  padding: var(--space-lg) 0;
  font-size: 0.85rem;
  color: var(--ink-70);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.footer-inner a {
  color: var(--ink-70);
}

.footer-inner a:hover {
  color: var(--terracotta);
}

/* --- Instagram embed placeholder --------------------------------- */

.insta-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.85rem;
  margin-top: var(--space-xs);
}

/* --- About page extra -------------------------------------------- */

.story-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.story-image {
  aspect-ratio: 4 / 5;
  background: var(--oatmeal);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-30);
  font-family: var(--mono);
  font-size: 0.75rem;
}

@media (max-width: 767px) {
  .story-section {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

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

@media (max-width: 767px) {
  :root {
    --space-xl: 2.5rem;
    --space-2xl: 3.5rem;
  }

  .hero {
    min-height: 80vh;
  }

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

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (min-width: 768px) and (max-width: 1279px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Map + hours side-by-side (visit page, desktop) -------------- */

@media (min-width: 768px) {
  .visit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }
}

/* --- Placeholder image fallback ---------------------------------- */

.placeholder-img {
  background: var(--oatmeal);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-30);
  font-family: var(--mono);
  font-size: 0.8rem;
  text-align: center;
  padding: var(--space-md);
}

/* --- Print ------------------------------------------------------- */

@media print {
  nav {
    position: static;
    border: none;
  }
  .hero {
    min-height: auto;
    padding: var(--space-lg) 0;
    color: var(--ink);
    background: var(--paper);
  }
  .hero-video, .hero-overlay { display: none; }
  .btn { display: none; }
}
