/*
Theme Name: Endless Caffeine
Theme URI: https://www.endlesscaffeine.com
Author: Endless Caffeine
Description: Branded WordPress theme for Endless Caffeine. Ports the marketing site and pairs with the Endless Caffeine Platform plugin for online ordering, rewards, and account. Dark, industrial, lime-accented.
Version: 0.1.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: endless-caffeine
Requires at least: 6.2
Tested up to: 6.5
Requires PHP: 7.4
*/

/* ===== RESET ===== */
    *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

    :root {
      --lime: #bdff3d;
      --lime-dim: rgba(189, 255, 61, 0.12);
      --lime-glow: rgba(189, 255, 61, 0.25);
      --white: #ffffff;
      --off-white: #d8d8d8;
      --gray: #888888;
      --dark: #1a1a1a;
      --darker: #111111;
      --darkest: #0a0a0a;
      --card: #161616;
      --border: rgba(255, 255, 255, 0.06);
      --font-display: 'Bebas Neue', 'Arial Black', sans-serif;
      --font-accent: 'Playfair Display', Georgia, serif;
      --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    }

    html { scroll-behavior: smooth; font-size: 16px; }

    body {
      font-family: var(--font-body);
      background: var(--darkest);
      color: var(--off-white);
      line-height: 1.7;
      overflow-x: hidden;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }

    img { max-width: 100%; height: auto; display: block; }
    a { color: var(--lime); text-decoration: none; transition: color 0.3s; }
    a:hover { color: var(--white); }

    /* Accessibility */
    .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;
    }
    .sr-only:focus {
      position: fixed; top: 8px; left: 8px; width: auto; height: auto;
      padding: 12px 24px; margin: 0; overflow: visible; clip: auto;
      white-space: normal; background: var(--lime); color: var(--darkest);
      font-weight: 700; z-index: 9999; font-size: 0.9rem;
    }
    *:focus-visible {
      outline: 2px solid var(--lime); outline-offset: 2px;
    }

    /* Performance: defer rendering of below-fold sections */
    #featured, #menu, #location, #contact { content-visibility: auto; contain-intrinsic-size: auto 800px; }

    /* ===== ANIMATIONS ===== */
    .fade-in {
      opacity: 0; transform: translateY(30px);
      transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .fade-in.visible { opacity: 1; transform: translateY(0); }
    .fade-in-left {
      opacity: 0; transform: translateX(-40px);
      transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .fade-in-left.visible { opacity: 1; transform: translateX(0); }
    .fade-in-right {
      opacity: 0; transform: translateX(40px);
      transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .fade-in-right.visible { opacity: 1; transform: translateX(0); }

    @keyframes pulse-glow {
      0%, 100% { box-shadow: 0 0 12px rgba(189,255,61,0.15); }
      50% { box-shadow: 0 0 28px rgba(189,255,61,0.35); }
    }

    @keyframes float {
      0%, 100% { transform: translateX(-50%) translateY(0); }
      50% { transform: translateX(-50%) translateY(8px); }
    }

    /* ===== LAYOUT ===== */
    .container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

    .section-label {
      display: inline-block;
      font-size: 0.7rem; font-weight: 600;
      letter-spacing: 3px; text-transform: uppercase;
      color: var(--lime); margin-bottom: 16px;
      position: relative; padding-left: 40px;
    }
    .section-label::before {
      content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
      width: 28px; height: 1px; background: var(--lime);
    }

    .section-title {
      font-family: var(--font-display);
      font-size: clamp(2rem, 5vw, 3.4rem);
      color: var(--white); line-height: 1.1;
      margin-bottom: 20px; letter-spacing: 0.03em;
    }

    .section-subtitle {
      font-size: 1.05rem; color: var(--gray);
      max-width: 580px; line-height: 1.8;
    }

    /* ===== BUTTONS ===== */
    .btn {
      display: inline-block; padding: 16px 40px;
      font-family: var(--font-body); font-weight: 600; font-size: 0.85rem;
      letter-spacing: 1.5px; text-transform: uppercase;
      border: none; cursor: pointer; transition: all 0.3s;
    }
    .btn-primary { background: var(--lime); color: var(--darkest); }
    .btn-primary:hover {
      background: var(--white); color: var(--darkest);
      transform: translateY(-2px); box-shadow: 0 12px 40px rgba(189,255,61,0.2);
    }
    .btn-outline { background: transparent; color: var(--lime); border: 2px solid var(--lime); }
    .btn-outline:hover {
      background: var(--lime); color: var(--darkest); transform: translateY(-2px);
    }

    /* ===== HEADER ===== */
    header {
      position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
      padding: 0 24px;
      transition: background 0.4s, box-shadow 0.4s;
    }
    header.scrolled {
      background: rgba(10,10,10,0.92);
      backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
      box-shadow: 0 1px 40px rgba(0,0,0,0.5);
    }
    .nav-inner {
      max-width: 1200px; margin: 0 auto;
      display: flex; align-items: center; justify-content: space-between;
      height: 80px; transition: height 0.4s;
    }
    header.scrolled .nav-inner { height: 64px; }

    .logo { display: flex; align-items: center; text-decoration: none; }
    .logo img {
      height: 64px; width: auto; transition: height 0.4s;
    }
    header.scrolled .logo img { height: 48px; }

    nav ul { list-style: none; display: flex; gap: 36px; }
    nav ul li a {
      font-size: 0.78rem; font-weight: 500; letter-spacing: 1.5px;
      text-transform: uppercase; color: var(--off-white);
      text-decoration: none; position: relative; padding-bottom: 4px;
      transition: color 0.3s;
    }
    nav ul li a::after {
      content: ''; position: absolute; bottom: 0; left: 0;
      width: 0; height: 1px; background: var(--lime); transition: width 0.3s;
    }
    nav ul li a:hover { color: var(--lime); }
    nav ul li a:hover::after { width: 100%; }

    /* Order Online CTA in nav */
    nav ul li a.nav-order {
      background: var(--lime); color: var(--darkest);
      padding: 10px 22px; font-weight: 700; letter-spacing: 1px;
      transition: background 0.3s, transform 0.3s;
    }
    nav ul li a.nav-order::after { display: none; }
    nav ul li a.nav-order:hover { background: var(--white); color: var(--darkest); transform: translateY(-1px); }

    .nav-phone {
      display: none; align-items: center; gap: 6px;
      font-size: 0.75rem; font-weight: 600; letter-spacing: 1px;
      color: var(--lime); text-decoration: none; margin-right: 8px;
    }
    .nav-phone:hover { color: var(--white); }
    @media (max-width: 768px) {
      .nav-phone { display: flex; }
    }

    .menu-toggle {
      display: none; flex-direction: column; gap: 5px;
      background: none; border: none; cursor: pointer; padding: 8px; z-index: 1001;
    }
    .menu-toggle span {
      display: block; width: 26px; height: 2px; background: var(--white); transition: all 0.3s;
    }
    .menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

    /* ===== HERO ===== */
    #hero {
      min-height: 100vh; display: flex; align-items: center; justify-content: center;
      position: relative; overflow: hidden; background: var(--darkest);
    }
    .hero-bg {
      position: absolute; inset: 0;
      background:
        linear-gradient(180deg, rgba(10,10,10,0.45) 0%, rgba(10,10,10,0.8) 100%),
        url('images/interior-hero.jpg') center/cover no-repeat;
    }
    .hero-content {
      position: relative; z-index: 2; text-align: center;
      padding: 0 24px; max-width: 1000px;
    }
    .hero-badge {
      display: inline-flex; align-items: center; gap: 8px;
      padding: 8px 20px; border: 1px solid rgba(189,255,61,0.2);
      border-radius: 50px; font-size: 0.7rem; font-weight: 500;
      letter-spacing: 2.5px; text-transform: uppercase; color: var(--lime);
      margin-bottom: 32px; backdrop-filter: blur(4px);
      background: rgba(189,255,61,0.04);
    }
    .hero-badge::before {
      content: ''; width: 6px; height: 6px; border-radius: 50%;
      background: var(--lime); animation: pulse-glow 2s ease-in-out infinite;
    }
    .hero-title {
      font-family: var(--font-display);
      font-size: clamp(3.5rem, 10vw, 8rem);
      color: var(--white); line-height: 0.95;
      margin-bottom: 12px; letter-spacing: 0.04em;
    }
    .hero-title .accent {
      color: var(--lime); display: block;
      font-family: var(--font-accent); font-style: italic;
      font-size: 0.45em; letter-spacing: 0.02em;
      margin-top: 4px;
    }
    .hero-subtitle {
      font-size: clamp(1rem, 2vw, 1.15rem);
      color: var(--gray); max-width: 540px;
      margin: 24px auto 48px; line-height: 1.8; font-weight: 300;
    }
    .hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
    .hero-scroll {
      position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
      display: flex; flex-direction: column; align-items: center; gap: 8px;
      color: var(--gray); font-size: 0.65rem; letter-spacing: 2px;
      text-transform: uppercase; animation: float 2.5s ease-in-out infinite;
    }
    .hero-scroll .line {
      width: 1px; height: 48px;
      background: linear-gradient(180deg, var(--gray) 0%, transparent 100%);
    }

    /* ===== DIVIDER ===== */
    .section-divider {
      height: 1px; background: linear-gradient(90deg, transparent, var(--lime-dim), transparent);
    }

    /* ===== ABOUT ===== */
    #about { padding: 140px 0; background: var(--darkest); }

    .about-grid {
      display: grid; grid-template-columns: 1fr 1fr;
      gap: 80px; align-items: center;
    }
    .about-image-wrapper { position: relative; }
    .about-image {
      width: 100%; aspect-ratio: 4/5;
      background: url('images/interior-main.jpg') center/cover no-repeat;
      border: 1px solid var(--border); overflow: hidden;
    }
    .about-image-overlay {
      width: 55%; aspect-ratio: 4/5;
      background: url('images/interior-overlay.jpg') center/cover no-repeat;
      position: absolute; bottom: -40px; right: -20px;
      border: 3px solid rgba(189,255,61,0.15); z-index: 2;
      box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    }
    .about-image-wrapper::after {
      content: ''; position: absolute; top: -16px; right: -16px;
      width: 120px; height: 120px; border: 1px solid rgba(189,255,61,0.08); z-index: -1;
    }
    .about-text p { margin-bottom: 20px; color: var(--off-white); font-size: 1rem; }
    .about-text p strong { color: var(--lime); font-weight: 600; }
    .about-stats {
      display: grid; grid-template-columns: repeat(3, 1fr);
      gap: 24px; margin-top: 48px; padding-top: 40px;
      border-top: 1px solid var(--border);
    }
    .stat-item { text-align: center; }
    .stat-number {
      font-family: var(--font-display); font-size: 2.2rem;
      color: var(--lime); display: block; line-height: 1.2;
    }
    .stat-label {
      font-size: 0.7rem; letter-spacing: 1.5px;
      text-transform: uppercase; color: var(--gray); margin-top: 4px;
    }

    /* ===== FEATURED ===== */
    #featured {
      padding: 100px 0;
      background: var(--darker);
    }
    .featured-grid {
      display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 32px;
    }
    .featured-card {
      background: var(--card); border: 1px solid var(--border);
      padding: 40px 32px; text-align: center;
      transition: all 0.4s; position: relative; overflow: hidden;
    }
    .featured-card:hover {
      border-color: rgba(189,255,61,0.12);
      transform: translateY(-4px);
      box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    }
    .featured-icon {
      font-size: 2.5rem; margin-bottom: 20px; display: block;
    }
    .featured-card h3 {
      font-family: var(--font-display); font-size: 1.4rem;
      color: var(--white); margin-bottom: 12px; letter-spacing: 0.04em;
    }
    .featured-card p {
      font-size: 0.9rem; color: var(--gray); line-height: 1.7;
    }

    /* ===== MENU ===== */
    #menu { padding: 140px 0; background: var(--darkest); }

    .menu-header { text-align: center; margin-bottom: 64px; }
    .menu-header .section-subtitle { margin: 0 auto; }

    .menu-categories {
      display: flex; justify-content: center; gap: 12px;
      margin-bottom: 48px; flex-wrap: wrap;
    }
    .menu-cat-btn {
      padding: 10px 28px; background: transparent;
      border: 1px solid rgba(255,255,255,0.08); color: var(--gray);
      font-family: var(--font-body); font-size: 0.75rem; font-weight: 500;
      letter-spacing: 1.5px; text-transform: uppercase; cursor: pointer;
      transition: all 0.3s;
    }
    .menu-cat-btn:hover, .menu-cat-btn.active {
      border-color: var(--lime); color: var(--lime);
      background: rgba(189,255,61,0.04);
    }

    .menu-grid {
      display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px;
    }
    .menu-card {
      background: var(--card); border: 1px solid var(--border);
      transition: all 0.4s; overflow: hidden;
    }
    .menu-card:hover {
      transform: translateY(-4px); border-color: rgba(189,255,61,0.12);
      box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    }
    .menu-card-image {
      width: 100%; height: 200px; background-size: cover;
      background-position: center; position: relative; overflow: hidden;
    }
    .menu-card-image::after {
      content: ''; position: absolute; inset: 0;
      background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.5) 100%);
    }
    .menu-card-body { padding: 24px; }
    .menu-card-name {
      font-family: var(--font-body); font-size: 1.02rem; font-weight: 600;
      color: var(--white); margin-bottom: 8px;
    }
    .menu-card-desc {
      font-size: 0.85rem; color: var(--gray); line-height: 1.6; margin-bottom: 16px;
    }
    .menu-card-footer { display: flex; align-items: center; justify-content: space-between; }
    .menu-card-price {
      font-family: var(--font-display); font-size: 1.2rem; color: var(--lime);
    }
    .menu-card-tag {
      font-size: 0.62rem; letter-spacing: 1px; text-transform: uppercase;
      color: var(--gray); padding: 4px 10px; border: 1px solid rgba(255,255,255,0.06);
    }

    /* ===== LOCATION ===== */
    #location { padding: 140px 0; background: var(--darker); }

    .location-grid {
      display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start;
    }
    .location-info h3 {
      font-family: var(--font-display); font-size: 1.2rem;
      color: var(--white); letter-spacing: 0.04em;
      margin-bottom: 16px; margin-top: 40px;
    }
    .location-info h3:first-of-type { margin-top: 0; }
    .location-address {
      font-style: normal; color: var(--off-white); line-height: 2; font-size: 1rem;
    }
    .location-address .street { font-weight: 600; color: var(--white); font-size: 1.05rem; }
    .hours-list { list-style: none; }
    .hours-list li {
      display: flex; justify-content: space-between;
      padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 0.95rem;
    }
    .hours-list li .day { color: var(--gray); }
    .hours-list li .time { color: var(--white); font-weight: 500; }
    .map-container {
      width: 100%; aspect-ratio: 4/3;
      background: var(--card); border: 1px solid var(--border);
      overflow: hidden; position: relative;
    }
    .map-container iframe {
      width: 100%; height: 100%; border: 0;
      filter: grayscale(100%) invert(92%) contrast(83%);
    }

    /* ===== CONTACT ===== */
    #contact { padding: 140px 0; background: var(--darkest); }

    .contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
    .contact-method { margin-bottom: 36px; }
    .contact-method h3 {
      font-size: 0.7rem; font-weight: 600; letter-spacing: 2px;
      text-transform: uppercase; color: var(--gray); margin-bottom: 8px;
    }
    .contact-method p, .contact-method a {
      font-size: 1.1rem; color: var(--white); font-weight: 500;
    }
    .contact-method a { color: var(--lime); }
    .social-links { display: flex; gap: 12px; margin-top: 12px; }
    .social-link {
      width: 48px; height: 48px; border: 1px solid rgba(255,255,255,0.08);
      display: flex; align-items: center; justify-content: center;
      font-size: 0.68rem; font-weight: 600; letter-spacing: 0.5px;
      color: var(--off-white); transition: all 0.3s; text-decoration: none;
    }
    .social-link:hover {
      border-color: var(--lime); color: var(--lime);
      background: rgba(189,255,61,0.04); transform: translateY(-2px);
    }

    .contact-form { display: flex; flex-direction: column; gap: 20px; }
    .form-group input, .form-group textarea {
      width: 100%; padding: 16px 20px; background: var(--card);
      border: 1px solid var(--border); color: var(--white);
      font-family: var(--font-body); font-size: 0.95rem;
      transition: border-color 0.3s, box-shadow 0.3s; outline: none;
    }
    .form-group input::placeholder, .form-group textarea::placeholder { color: #444; }
    .form-group input:focus, .form-group textarea:focus {
      border-color: var(--lime); box-shadow: 0 0 0 3px rgba(189,255,61,0.06);
    }
    .form-group textarea { min-height: 140px; resize: vertical; }
    .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

    /* ===== FOOTER ===== */
    footer {
      padding: 80px 0 40px; background: var(--darkest);
      border-top: 1px solid var(--border);
    }
    .footer-grid {
      display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
      gap: 48px; margin-bottom: 64px;
    }
    .footer-brand .logo { margin-bottom: 20px; }
    .footer-brand p {
      color: var(--gray); font-size: 0.88rem; line-height: 1.8; max-width: 300px;
    }
    .footer-heading {
      font-size: 0.7rem; font-weight: 600; letter-spacing: 2px;
      text-transform: uppercase; color: var(--white); margin-bottom: 24px;
    }
    .footer-links { list-style: none; }
    .footer-links li { margin-bottom: 12px; }
    .footer-links li a {
      color: var(--gray); font-size: 0.88rem; text-decoration: none; transition: color 0.3s;
    }
    .footer-links li a:hover { color: var(--lime); }
    .footer-bottom {
      display: flex; justify-content: space-between; align-items: center;
      padding-top: 32px; border-top: 1px solid var(--border);
    }
    .footer-bottom p { font-size: 0.78rem; color: var(--gray); }
    .footer-social { display: flex; gap: 20px; }
    .footer-social a {
      color: var(--gray); font-size: 0.72rem; font-weight: 500;
      letter-spacing: 1px; text-transform: uppercase; text-decoration: none;
      transition: color 0.3s;
    }
    .footer-social a:hover { color: var(--lime); }

    /* ===== FAQ ===== */
    #faq { padding: 140px 0; background: var(--darker); }
    .faq-grid { max-width: 800px; margin: 0 auto; }
    .faq-item {
      border-bottom: 1px solid var(--border); padding: 28px 0;
    }
    .faq-question {
      display: flex; justify-content: space-between; align-items: center;
      width: 100%; background: none; border: none; color: var(--white);
      font-family: var(--font-body); font-size: 1.05rem; font-weight: 600;
      text-align: left; cursor: pointer; padding: 0; gap: 16px;
      transition: color 0.3s;
    }
    .faq-question:hover { color: var(--lime); }
    .faq-toggle {
      font-size: 1.4rem; color: var(--lime); transition: transform 0.3s;
      flex-shrink: 0;
    }
    .faq-item.open .faq-toggle { transform: rotate(45deg); }
    .faq-answer {
      max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.4s ease;
      color: var(--gray); font-size: 0.95rem; line-height: 1.8;
    }
    .faq-item.open .faq-answer { max-height: 200px; padding-top: 16px; }

    /* ===== BACK TO TOP ===== */
    .back-to-top {
      position: fixed; bottom: 32px; right: 32px; z-index: 999;
      width: 48px; height: 48px; background: var(--lime); color: var(--darkest);
      border: none; cursor: pointer; display: flex; align-items: center;
      justify-content: center; font-size: 1.2rem; font-weight: 700;
      opacity: 0; pointer-events: none;
      transition: opacity 0.3s, transform 0.3s;
      box-shadow: 0 8px 24px rgba(189,255,61,0.2);
    }
    .back-to-top.visible { opacity: 1; pointer-events: auto; }
    .back-to-top:hover { transform: translateY(-3px); background: var(--white); }

    /* ===== RESPONSIVE ===== */
    @media (max-width: 968px) {
      .about-grid, .location-grid, .contact-grid {
        grid-template-columns: 1fr; gap: 48px;
      }
      .featured-grid { grid-template-columns: 1fr; gap: 20px; }
      .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
      .about-image-wrapper { order: -1; }
      .about-image { aspect-ratio: 16/10; }
      .about-image-overlay { width: 40%; bottom: -24px; right: -8px; }
    }

    @media (max-width: 768px) {
      .menu-toggle { display: flex; }
      nav ul {
        position: fixed; top: 0; right: -100%;
        width: 80%; max-width: 360px; height: 100vh;
        background: rgba(10,10,10,0.98);
        backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
        flex-direction: column; align-items: flex-start; justify-content: center;
        padding: 48px; gap: 28px; transition: right 0.4s;
        box-shadow: -20px 0 60px rgba(0,0,0,0.5);
      }
      nav ul.open { right: 0; }
      nav ul li a { font-size: 1.05rem; letter-spacing: 2px; }
      .hero-title { font-size: clamp(2.8rem, 12vw, 4.5rem); }
      .hero-cta { flex-direction: column; align-items: center; }
      .form-row { grid-template-columns: 1fr; }
      .menu-grid { grid-template-columns: 1fr 1fr; }
      .footer-grid { grid-template-columns: 1fr; gap: 36px; }
      .footer-bottom { flex-direction: column; gap: 20px; text-align: center; }
      .about-stats { grid-template-columns: repeat(3, 1fr); gap: 16px; }
      .stat-number { font-size: 1.6rem; }
      #about, #menu, #location, #contact, #featured { padding: 100px 0; }
    }

    @media (max-width: 480px) {
      .container { padding: 0 16px; }
      .btn { padding: 14px 32px; font-size: 0.8rem; width: 100%; text-align: center; }
      .menu-grid { grid-template-columns: 1fr; }
    }
