/*
Theme Name: LaCascio's Scratch Italian
Theme URI: https://lacascios.com
Author: Amanda Sorrells
Author URI: mailto:aedsorrells@gmail.com
Description: Custom standalone theme for LaCascio's Scratch Italian, Lindale TX. Tuscan fine-dining design with mobile-first responsive layout. Pairs with the LaCascio's Menu Manager plugin for live Toast menu data.
Version: 1.2.4
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
License: Proprietary
License URI: https://lacascios.com
Text Domain: lacascios
Tags: restaurant, custom, mobile-first
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --charcoal: #1a1a1e;
  --charcoal-warm: #2a2428;
  --teal-deep: #3d5a5e;
  --teal-muted: #5a7f84;
  --gold-warm: #c9a96e;
  --gold-light: #e0c992;
  --cream: #f5f0e8;
  --cream-warm: #ede4d4;
  --rosso: #8b2e2e;
  --verde: #2e5e3e;
  --white-soft: #faf8f5;
  --tuscan-warm: #f7f0e3;
  --terracotta: #c67b4e;
  --terracotta-light: #d4956a;
  --olive-green: #5a6b33;
  --text-dark: #2c2420;
  --text-medium: #3d3530;
  --text-light: #635850;
  --paper-light: #f8f5ef;
  --rule: rgba(90,82,72,0.25);
  --rule-dark: rgba(90,82,72,0.4);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Raleway', 'Segoe UI', sans-serif;
}

/* ============================================================
   RESET + BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: var(--font-body);
  background: var(--charcoal);
  color: var(--cream);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* WordPress alignment classes */
.alignleft  { float: left;  margin-right: 1em; }
.alignright { float: right; margin-left: 1em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }

/* ============================================================
   ACCESSIBILITY UTILITIES
   ============================================================ */
.skip-nav {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--gold-warm);
  color: var(--charcoal);
  padding: 0.5rem 1rem;
  z-index: 1000;
  text-decoration: none;
  font-weight: 600;
}
.skip-nav:focus { top: 0; }

.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;
  padding: 0 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
  background: linear-gradient(
    180deg,
    rgba(16, 14, 18, 0.85) 0%,
    rgba(16, 14, 18, 0.6) 60%,
    transparent 100%
  );
  transition: all 0.5s ease;
}
.nav.scrolled {
  background: rgba(22, 20, 24, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  height: 60px;
  box-shadow: 0 1px 30px rgba(0,0,0,0.4);
}
.nav-logo img {
  height: 44px;
  transition: height 0.4s ease;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}
.nav.scrolled .nav-logo img { height: 34px; }
.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}
.nav-links a {
  color: var(--cream);
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  position: relative;
  transition: color 0.3s ease;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.nav-links a:focus-visible {
  outline: 2px solid var(--gold-warm);
  outline-offset: 4px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--gold-warm);
  transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.nav-links a:hover { color: var(--gold-light); }
.nav-links a:hover::after { width: 100%; }
.nav-links .current-menu-item > a,
.nav-links .current_page_item > a { color: var(--gold-warm); }
.nav-links .current-menu-item > a::after,
.nav-links .current_page_item > a::after { width: 100%; }

.nav-cta {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.55rem 1.5rem;
  border: 1px solid var(--gold-warm);
  color: var(--gold-warm);
  background: rgba(201, 169, 110, 0.08);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.4s ease;
}
.nav-cta:focus-visible {
  outline: 2px solid var(--gold-warm);
  outline-offset: 4px;
}
.nav-cta:hover {
  background: var(--gold-warm);
  color: var(--charcoal);
}
.nav-cta-group { display: flex; gap: 0.8rem; }

.nav-links .nav-highlight { color: var(--gold-warm); font-weight: 600; }
.nav-links .nav-highlight:hover { color: var(--gold-light); }

.mobile-nav-toggle { display: none; }
.mobile-nav-overlay { display: none; }
.mobile-only { display: none; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  font-family: var(--font-body);
  font-size: 0.73rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.95rem 2.4rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25,0.46,0.45,0.94);
  text-decoration: none;
  display: inline-block;
  border: none;
}
.btn:focus-visible {
  outline: 2px solid var(--gold-warm);
  outline-offset: 4px;
}
.btn-primary {
  background: var(--gold-warm);
  color: var(--charcoal);
  border: 1px solid var(--gold-warm);
}
.btn-primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(201,169,110,0.35);
}
.btn-dark {
  background: var(--charcoal);
  color: var(--gold-warm);
  border: 1px solid var(--charcoal);
}
.btn-dark:hover {
  background: var(--charcoal-warm);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(26,26,30,0.3);
}
.btn-secondary {
  background: rgba(245, 240, 232, 0.08);
  color: var(--cream);
  border: 1px solid rgba(245, 240, 232, 0.45);
}
.btn-secondary:hover {
  border-color: var(--cream);
  background: rgba(245, 240, 232, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer.footer {
  position: relative;
  padding: 4rem 3rem 2rem;
  background: var(--charcoal);
  border-top: 1px solid rgba(201, 169, 110, 0.2);
  overflow: hidden;
}
.footer-olive {
  position: absolute;
  width: 200px;
  height: 200px;
  opacity: 0.12;
  top: 20px;
  right: 40px;
  pointer-events: none;
}
.footer-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2rem;
  margin-bottom: 3rem;
}
.footer-social-icons { display: flex; gap: 0.8rem; margin-top: 1rem; }
.footer-social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid rgba(201,169,110,0.3);
  color: rgba(245,240,232,0.8);
  text-decoration: none;
  transition: all 0.3s ease;
}
.footer-social-icons a:hover { border-color: var(--gold-warm); color: var(--gold-warm); }
.footer-social-icons a svg { width: 18px; height: 18px; fill: currentColor; }

.footer-section h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--cream);
  margin-bottom: 1rem;
}
.footer-section p {
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.8;
  color: rgba(245,240,232,0.8);
}
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.footer-links a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: rgba(245,240,232,0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}
.footer-links a:hover { color: var(--gold-warm); }
.footer-links a:focus-visible {
  outline: 2px solid var(--gold-warm);
  outline-offset: 4px;
}
.footer-bottom {
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(201, 169, 110, 0.1);
  padding-top: 2rem;
  text-align: center;
}
.footer-copyright {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: rgba(245,240,232,0.55);
}
.footer-visit-link {
  color: rgba(245,240,232,0.8);
  text-decoration: none;
}
.footer-visit-link:hover { color: var(--gold-warm); }

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  z-index: 200;
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--charcoal);
  color: var(--gold-warm);
  border: 1px solid var(--gold-warm);
  border-radius: 50%;
  font-size: 1.2rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  pointer-events: none;
}
.back-to-top.visible { opacity: 0.7; pointer-events: auto; }
.back-to-top:focus-visible {
  outline: 2px solid var(--gold-warm);
  outline-offset: 4px;
}
.back-to-top:hover { opacity: 1; background: var(--gold-warm); color: var(--charcoal); }

/* ============================================================
   MOBILE — 768px
   ============================================================ */
@media (max-width: 768px) {
  .nav { padding: 0 1.5rem; height: 64px; z-index: 300; }
  .nav.scrolled { height: 56px; }
  .nav-links {
    position: fixed;
    top: 0; right: 0;
    width: 280px;
    height: 100vh;
    background: rgba(22, 20, 24, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 0;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 200;
    box-shadow: -4px 0 30px rgba(0,0,0,0.5);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links li { border-bottom: 1px solid rgba(201,169,110,0.15); }
  .nav-links a {
    display: block;
    padding: 1rem 0;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
  }
  .mobile-nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 201;
  }
  .mobile-nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--cream);
    transition: all 0.3s ease;
  }
  .mobile-nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .mobile-nav-toggle.open span:nth-child(2) { opacity: 0; }
  .mobile-nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
  .nav-cta-group { display: none; }
  .mobile-only { display: list-item; }
  .mobile-nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 199;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
  }
  .mobile-nav-overlay.open { opacity: 1; pointer-events: auto; }
  .nav-logo img { height: 36px; }
  .btn { padding: 0.8rem 1.8rem; font-size: 0.68rem; }
  footer.footer { padding: 3rem 1.5rem 2rem; }
  .footer-content { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}

@media (max-width: 480px) {
  .nav { padding: 0 1rem; height: 56px; }
  .footer-content { grid-template-columns: 1fr; }
  .btn { width: 100%; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   HEADER FIXES (Nov 3, 2026)
   ============================================================ */

/* A logo set under Appearance > Customize carries its full-size width
   attribute; without this it stretches sideways. */
.nav-logo img { width: auto; max-width: none; display: block; }

/* Labels never break onto two lines. */
.nav-links a,
.nav-cta { white-space: nowrap; }

/* Logged in: sit below the WordPress admin bar instead of under it. */
.admin-bar .nav { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .nav { top: 46px; }
}

/* Logo + six links + two buttons need about 1180px. Below that, use the
   slide-out menu (the mockup only switched at 768px, so the buttons wrapped
   on tablets and small laptops). Same rules as the 768px block. */
@media (max-width: 1180px) {
  .nav { padding: 0 1.5rem; height: 64px; z-index: 300; }
  .nav.scrolled { height: 56px; }
  .nav-links {
    position: fixed; top: 0; right: 0; width: 280px; height: 100vh;
    background: rgba(22, 20, 24, 0.97);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    flex-direction: column; padding: 5rem 2rem 2rem; gap: 0;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 200; box-shadow: -4px 0 30px rgba(0,0,0,0.5);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links li { border-bottom: 1px solid rgba(201,169,110,0.15); }
  .nav-links a { display: block; padding: 1rem 0; font-size: 0.85rem; letter-spacing: 0.12em; }
  .mobile-nav-toggle { display: flex; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; z-index: 201; }
  .mobile-nav-toggle span { display: block; width: 24px; height: 2px; background: var(--cream); transition: all 0.3s ease; }
  .mobile-nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .mobile-nav-toggle.open span:nth-child(2) { opacity: 0; }
  .mobile-nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
  .nav-cta-group { display: none; }
  .mobile-only { display: list-item; }
  .mobile-nav-overlay { display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 199; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; }
  .mobile-nav-overlay.open { opacity: 1; pointer-events: auto; }
  .admin-bar .nav-links { top: 32px; height: calc(100vh - 32px); }
}
@media (max-width: 782px) {
  .admin-bar .nav-links { top: 46px; height: calc(100vh - 46px); }
}
@media (max-width: 768px) {
  .nav-logo img { height: 36px; }
}
@media (max-width: 480px) {
  .nav { padding: 0 1rem; height: 56px; }
}

/* Toast Tables' own widget button: mounted for its pop-up, never shown */
#toast-booking-widget { display: none !important; }

/* ============================================================
   MOBILE FIXES (Nov 3, 2026)
   ============================================================ */

/* The closed slide-out menu sits just off the right edge; its shadow showed
   as a dark smudge down the right side of every page. Shadow only when open. */
@media (max-width: 1180px) {
  .nav-links { box-shadow: none; }
  .nav-links.open { box-shadow: -4px 0 30px rgba(0,0,0,0.5); }
}

/* Footer: legal links + site credit (inc/legal.php) */
.footer-legal ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.6rem;
  margin: 0.9rem 0 0;
  padding: 0;
}
.footer-legal li[hidden] { display: none; }
.footer-legal a,
.footer-legal button {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: rgba(245,240,232,0.7);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0.35rem 0;
  cursor: pointer;
  transition: color 0.3s ease;
}
.footer-legal a:hover,
.footer-legal button:hover { color: var(--gold-warm); }
.footer-legal a:focus-visible,
.footer-legal button:focus-visible { outline: 2px solid var(--gold-warm); outline-offset: 3px; }
.footer-credit {
  margin: 0.9rem 0 0;
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: rgba(245,240,232,0.55);
}
.footer-credit a { color: rgba(245,240,232,0.7); text-decoration: none; transition: color 0.3s ease; }
.footer-credit a:hover { color: var(--gold-warm); }
.footer-credit a:focus-visible { outline: 2px solid var(--gold-warm); outline-offset: 3px; }
