/*
Theme Name: Layali Cafe
Theme URI: https://aymangad.net
Author: Ayman Gad
Description: A single-page, animated theme for Layali Cafe (كافيه ليالي) — hero, story, full bilingual menu with category tabs, and location.
Version: 1.0
Requires at least: 5.8
Requires PHP: 7.4
Text Domain: layali-cafe
*/

  :root{
    --night:#0E0D0C;
    --night-2:#171412;
    --night-3:#211D19;
    --gold:#E8A33D;
    --gold-soft:#F4C877;
    --ember:#C1502E;
    --cream:#F4EEDF;
    --muted:#A99C89;
    --line:rgba(244,238,223,0.10);

    /* authentic menu category colors, matching the real printed menu */
    --c-food:#C0392B;
    --c-sweets:#E6247A;
    --c-cold:#2AA8D8;
    --c-egypt:#E8871E;
    --c-juice:#8CC63F;
    --c-coffee:#B9752E;
    --c-hot:#D9622B;

    --radius:16px;
  }

  *{ box-sizing:border-box; margin:0; padding:0; }
  html{ scroll-behavior:smooth; }
  body{
    background:var(--night); color:var(--cream);
    font-family:'IBM Plex Sans Arabic', sans-serif;
    line-height:1.7; overflow-x:hidden;
  }
  img{ max-width:100%; display:block; }
  a{ color:inherit; text-decoration:none; }
  ::selection{ background:var(--gold); color:var(--night); }

  h1,h2,h3{ font-family:'Cormorant Garamond', serif; font-weight:600; }
  .eyebrow{
    font-family:'IBM Plex Mono', monospace; font-size:11.5px; letter-spacing:0.22em;
    text-transform:uppercase; color:var(--gold); margin-bottom:10px; display:block;
  }

  .wrap{ max-width:1120px; margin-inline:auto; padding-inline:24px; }

  /* reveal-on-scroll */
  .reveal{ opacity:0; transform:translateY(28px); transition:opacity .8s ease, transform .8s ease; }
  .reveal.is-visible{ opacity:1; transform:translateY(0); }

  /* ---------------- HEADER ---------------- */
  header{
    position:fixed; inset-inline:0; top:18px; z-index:100;
    display:flex; justify-content:center; padding-inline:20px;
  }
  .nav-pill{
    display:flex; align-items:center; justify-content:center; gap:40px;
    width:auto; max-width:680px; padding:14px 30px; border-radius:999px;
    background:rgba(20,17,15,0.55); backdrop-filter:blur(16px);
    border:1px solid rgba(244,238,223,0.08);
    transition:background .3s ease, border-color .3s ease, box-shadow .3s ease;
  }
  header.is-scrolled .nav-pill{
    background:rgba(20,17,15,0.88); border-color:rgba(244,238,223,0.14);
    box-shadow:0 10px 30px rgba(0,0,0,0.3);
  }
  .brand{ display:flex; align-items:center; gap:10px; }
  .brand-mark{ width:26px; height:26px; }
  .brand-word{ font-family:'Aref Ruqaa', serif; font-size:24px; color:var(--gold); line-height:1; }
  nav{ display:flex; gap:34px; }
  nav a{ font-size:15.5px; font-weight:600; color:var(--cream); opacity:0.8; transition:opacity .2s ease, color .2s ease; }
  nav a:hover{ opacity:1; color:var(--gold); }
  @media(max-width:640px){
    .nav-pill{ flex-wrap:wrap; justify-content:center; gap:10px 18px; padding:16px 20px; }
    nav{ gap:26px; width:100%; justify-content:center; }
    nav a{ font-size:13.5px; }
  }

  /* ---------------- HERO ---------------- */
  .hero{
    position:relative; min-height:100svh; display:flex; flex-direction:column;
    align-items:center; justify-content:center; text-align:center; overflow:hidden;
    background:
      radial-gradient(ellipse 70% 50% at 50% 100%, rgba(232,163,61,0.16), transparent 65%),
      linear-gradient(180deg, #1A1512 0%, var(--night) 55%, var(--night) 100%);
    padding:120px 24px 90px;
  }

  .hero-content{ position:relative; z-index:2; }
  .hero-mark{ width:64px; height:64px; margin:0 auto 22px; }
  .hero-mark .cup-steam{ opacity:0; animation:cupSteam 2.6s ease-in-out infinite; }
  .hero-mark .c-s1{ animation-delay:0s; }
  .hero-mark .c-s2{ animation-delay:0.9s; }
  @keyframes cupSteam{
    0%{ opacity:0; transform:translateY(4px); }
    35%{ opacity:0.8; }
    100%{ opacity:0; transform:translateY(-6px); }
  }
  .hero-word{
    font-family:'Aref Ruqaa', serif; font-weight:700; font-size:clamp(56px, 12vw, 108px);
    color:var(--gold-soft); line-height:1;
    text-shadow:0 4px 20px rgba(232,163,61,0.35);
    animation:softGlow 6s ease-in-out infinite;
  }
  @keyframes softGlow{
    0%,100%{ text-shadow:0 4px 20px rgba(232,163,61,0.35); }
    50%{ text-shadow:0 4px 30px rgba(232,163,61,0.55); }
  }
  .hero-eng{
    font-family:'IBM Plex Mono', monospace; font-size:13px; letter-spacing:0.5em;
    color:var(--muted); margin-top:18px; text-transform:uppercase;
  }
  .hero-tagline{
    font-family:'Cormorant Garamond', serif; font-style:italic; font-size:clamp(18px,3vw,26px);
    color:var(--cream); margin-top:26px; max-width:520px; margin-inline:auto; opacity:0.9;
  }
  .pour-anim{ margin-top:34px; display:flex; justify-content:center; opacity:0.9; }
  .pour-stream{ animation:pourFlow 1s linear infinite; }
  @keyframes pourFlow{ to{ stroke-dashoffset:-20; } }
  .steam{ opacity:0; animation:steamRise 3s ease-in-out infinite; }
  .steam.s1{ animation-delay:0s; }
  .steam.s2{ animation-delay:1.2s; }
  @keyframes steamRise{
    0%{ opacity:0; transform:translateY(4px); }
    30%{ opacity:0.6; }
    100%{ opacity:0; transform:translateY(-8px); }
  }
  .hero-cta{
    display:inline-block; margin-top:28px; padding:15px 38px; border-radius:999px;
    background:var(--gold); color:var(--night); font-weight:700; font-size:14.5px;
    letter-spacing:0.02em; transition:transform .25s ease, box-shadow .25s ease;
    box-shadow:0 10px 30px rgba(232,163,61,0.25);
  }
  .hero-cta:hover{ transform:translateY(-3px); box-shadow:0 16px 40px rgba(232,163,61,0.35); }

  .scroll-cue{
    position:absolute; bottom:28px; left:50%; transform:translateX(-50%); z-index:2;
    width:22px; height:34px; border:1.5px solid rgba(244,238,223,0.4); border-radius:12px;
  }
  .scroll-cue::after{
    content:''; position:absolute; top:6px; left:50%; width:4px; height:8px; border-radius:2px;
    background:var(--gold); transform:translateX(-50%); animation:scrollDot 1.8s ease-in-out infinite;
  }
  @keyframes scrollDot{ 0%{ opacity:1; top:6px; } 100%{ opacity:0; top:18px; } }

  /* ---------------- ABOUT ---------------- */
  .about{ padding:110px 0 90px; background:var(--night); text-align:center; }
  .about h2{ font-size:clamp(28px,4vw,40px); color:var(--cream); margin-bottom:20px; }
  .about p{ max-width:600px; margin-inline:auto; color:var(--muted); font-size:16px; }
  .about-strip{ display:flex; justify-content:center; gap:46px; margin-top:46px; flex-wrap:wrap; }
  .about-item{ text-align:center; }
  .about-item .n{ font-family:'Cormorant Garamond', serif; font-size:34px; color:var(--gold); }
  .about-item .l{ font-size:12px; color:var(--muted); letter-spacing:0.05em; margin-top:4px; }

  /* ---------------- MENU ---------------- */
  .menu{ padding:90px 0 110px; background:linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%); }
  .menu-head{ text-align:center; margin-bottom:50px; }
  .menu-head h2{ font-size:clamp(30px,4.5vw,46px); color:var(--cream); }
  .menu-note{ font-size:12.5px; color:var(--muted); margin-top:10px; }

  .tab-bar{
    display:flex; gap:10px; overflow-x:auto; padding-bottom:14px; margin-bottom:36px;
    -ms-overflow-style:none; scrollbar-width:none;
  }
  .tab-bar::-webkit-scrollbar{ display:none; }
  .tab-btn{
    flex-shrink:0; padding:10px 20px; border-radius:999px; font-size:13.5px; font-weight:600;
    background:var(--night-3); color:var(--muted); border:1.5px solid var(--line);
    cursor:pointer; transition:all .2s ease; white-space:nowrap;
  }
  .tab-btn.is-active{ color:var(--cream); border-color:transparent; }
  .tab-btn[data-cat="food"].is-active{ background:var(--c-food); color:#fff; }
  .tab-btn[data-cat="sweets"].is-active{ background:var(--c-sweets); color:#fff; }
  .tab-btn[data-cat="icecream"].is-active{ background:var(--c-sweets); color:#fff; }
  .tab-btn[data-cat="cold"].is-active{ background:var(--c-cold); color:#fff; }
  .tab-btn[data-cat="egypt"].is-active{ background:var(--c-egypt); color:#fff; }
  .tab-btn[data-cat="juice"].is-active{ background:var(--c-juice); color:var(--night); }
  .tab-btn[data-cat="coffee"].is-active{ background:var(--c-coffee); color:#fff; }
  .tab-btn[data-cat="hot"].is-active{ background:var(--c-hot); color:#fff; }

  .tab-panel{ display:none; }
  .tab-panel.is-active{ display:block; animation:panelIn .4s ease both; }
  @keyframes panelIn{ 0%{ opacity:0; transform:translateY(10px); } 100%{ opacity:1; transform:translateY(0); } }

  .accordion-item{ border-bottom:1px solid var(--line); }
  .accordion-item:first-child{ border-top:1px solid var(--line); }
  .group-title{
    width:100%; background:none; border:none; cursor:pointer;
    font-family:'Cormorant Garamond', serif; font-size:22px; font-weight:600;
    padding:20px 2px; margin:0; color:var(--muted);
    display:flex; align-items:center; justify-content:space-between; gap:12px;
    text-align:start; font-family:inherit;
  }
  .group-title .ar{ font-size:19px; color:var(--cream); font-family:'IBM Plex Sans Arabic', sans-serif; font-weight:700; order:-1; flex:1; text-align:start; }
  .group-title .chev{ color:var(--cat-color, var(--gold)); flex-shrink:0; transition:transform .3s ease; }
  .accordion-item.is-open .group-title .chev{ transform:rotate(180deg); }

  .accordion-panel{
    max-height:0; overflow:hidden; transition:max-height .45s ease;
  }
  .accordion-item.is-open .accordion-panel{ max-height:2400px; }
  .accordion-panel .item-grid{ padding-bottom:22px; }

  .item-grid{ display:grid; grid-template-columns:repeat(2, 1fr); gap:2px 28px; }
  @media(max-width:640px){ .item-grid{ grid-template-columns:1fr; } }

  .item-row{
    display:flex; align-items:baseline; justify-content:space-between; gap:12px;
    padding:11px 0; border-bottom:1px dashed var(--line);
  }
  .item-name{ display:flex; flex-direction:column; }
  .item-name .ar{ order:-1; font-size:14.5px; font-weight:500; color:var(--cream); }
  .item-name .en{ font-size:12px; color:var(--muted); margin-top:1px; }
  .item-price{
    font-family:'IBM Plex Mono', monospace; font-size:14px; font-weight:600;
    color:var(--cat-color, var(--gold)); white-space:nowrap; flex-shrink:0;
  }
  .item-price .sub{ font-size:10px; color:var(--muted); margin-inline-start:2px; }

  /* ---------------- VISIT US ---------------- */
  .visit{ padding:100px 0 100px; background:var(--night-2); }
  .visit-grid{ display:grid; grid-template-columns:1fr 1fr; gap:50px; align-items:center; }
  @media(max-width:800px){ .visit-grid{ grid-template-columns:1fr; } }
  .visit-head{ text-align:start; order:2; }
  .visit-head h2{ font-size:clamp(28px,4vw,40px); margin-bottom:18px; }
  .visit-row{ display:flex; gap:14px; margin-top:20px; align-items:flex-start; }
  .visit-row svg{ flex-shrink:0; margin-top:3px; color:var(--gold); }
  .visit-row .label{ font-size:11.5px; letter-spacing:0.08em; color:var(--muted); text-transform:uppercase; margin-bottom:3px; }
  .visit-row .value{ font-size:15px; color:var(--cream); }
  .visit-row a.value{ transition:color .2s ease; }
  .visit-row a.value:hover{ color:var(--gold); }
  .cta-row{ display:flex; gap:12px; flex-wrap:wrap; margin-top:28px; }
  .directions-btn{
    display:inline-flex; align-items:center; gap:8px; padding:13px 28px; border-radius:999px;
    background:transparent; border:1.5px solid var(--gold); color:var(--gold); font-weight:600; font-size:14px;
    transition:background .2s ease, color .2s ease;
  }
  .directions-btn:hover{ background:var(--gold); color:var(--night); }
  .facebook-btn{ border-color:#3B5998; color:#8FA8D6; }
  .facebook-btn:hover{ background:#3B5998; color:#fff; }
  .map-frame{ border-radius:var(--radius); overflow:hidden; border:1px solid var(--line); height:340px; order:1; }
  .map-frame iframe{ width:100%; height:100%; border:0; filter:grayscale(0.3) invert(0.92) contrast(0.9); }

  /* ---------------- FOOTER ---------------- */
  footer{ background:var(--night); border-top:1px solid var(--line); padding:50px 0 30px; text-align:center; }
  .footer-brand{ font-family:'Aref Ruqaa', serif; font-size:26px; color:var(--gold); margin-bottom:14px; }
  .footer-links{ display:flex; justify-content:center; gap:26px; margin-bottom:22px; flex-wrap:wrap; }
  .footer-links a{ font-size:13.5px; color:var(--muted); transition:color .2s ease; }
  .footer-links a:hover{ color:var(--gold); }
  .footer-copy{ font-size:11.5px; color:var(--muted); opacity:0.6; }
  .footer-credit{ font-size:11px; color:var(--muted); opacity:0.55; margin-top:6px; }
  .footer-credit a{ color:var(--gold-soft); font-weight:600; opacity:1; transition:color .2s ease; }
  .footer-credit a:hover{ color:var(--gold); }
