/*
Theme Name: Tableside
Theme URI: https://example.com/tableside
Author: Tableside
Author URI: https://example.com
Description: A premium, mobile-first digital front door for restaurants. Each restaurant gets its own page at /restaurants/restaurant-name with a menu link, WiFi popup, Google reviews link, map, and optional WhatsApp/Instagram — all manageable from the WordPress dashboard via the Restaurants custom post type.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tableside
*/

/* ============================================================
   TABLESIDE — shared stylesheet
   Design tokens live at the top. Everything else is built on them.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,500;0,9..144,600;0,9..144,700;0,9..144,900;1,9..144,500;1,9..144,600&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

::root {
  /* ---- palette ---- */
  --ink: #0D0D0D;
  --ink-2: #1A1A1A;
  --panel: #1F1F1F;
  --panel-2: #2A2A2A;

  --brass: #C9A24A;
  --brass-hi: #D4AF37;

  --wine: #8B0000;
  --cream: #FFFFFF;

  --stone: #AAAAAA;
  --stone-dim: #777777;

  --line: rgba(212,175,55,0.2);
  --line-strong: rgba(212,175,55,0.4);

  --shadow: 0 20px 60px rgba(0,0,0,0.6);
}
  /* restaurant pages can override this at runtime */
  --accent: var(--brass);
  --accent-hi: var(--brass-hi);

  /* ---- type ---- */
  --font-display: 'Fraunces', ui-serif, Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;

  /* ---- misc ---- */
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 10px;
  --ease: cubic-bezier(.22,1,.36,1);
}

/* ============================================================
   Reset
   ============================================================ */
*, *::before, *::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
body{
  margin:0;
  background:var(--ink);
  color:var(--cream);
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
button{ font:inherit; color:inherit; background:none; border:none; cursor:pointer; }
ul{ margin:0; padding:0; list-style:none; }
h1,h2,h3,p{ margin:0; }

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

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

/* faint paper-grain texture, used behind hero / cards */
.grain{ position:relative; isolation:isolate; }
.grain::before{
  content:"";
  position:absolute; inset:0;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events:none;
  z-index:0;
}

/* ============================================================
   Layout helpers
   ============================================================ */
.wrap{
  width:100%;
  max-width:1040px;
  margin:0 auto;
  padding:0 22px;
}
.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-family:var(--font-mono);
  font-size:0.72rem;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--accent);
}
.eyebrow::before{
  content:"";
  width:6px; height:6px;
  border-radius:50%;
  background:var(--accent);
  box-shadow:0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

/* ============================================================
   Buttons — base
   ============================================================ */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:15px 26px;
  border-radius:999px;
  font-family:var(--font-body);
  font-weight:600;
  font-size:0.95rem;
  letter-spacing:0.01em;
  transition:transform .35s var(--ease), box-shadow .35s var(--ease), background-color .25s var(--ease);
  white-space:nowrap;
}
.btn:active{ transform:scale(0.97); }
.btn-primary{
  background:linear-gradient(180deg, var(--accent-hi), var(--accent));
  color:#1a1509;
  box-shadow:0 10px 30px -10px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn-primary:hover{
  transform:translateY(-2px);
  box-shadow:0 16px 34px -10px color-mix(in srgb, var(--accent) 80%, transparent);
}
.btn-ghost{
  background:transparent;
  color:var(--cream);
  border:1px solid var(--line-strong);
}
.btn-ghost:hover{
  border-color:var(--accent);
  color:var(--accent);
}

/* ============================================================
   TICKET — the signature component.
   A kitchen-order-ticket stub: notched left/right edges + a
   dashed perforation splitting the icon well from the label.
   Used for homepage feature cards AND restaurant action buttons.
   The two notch pseudo-elements must sit on a flat background
   matching --notch-bg (set per context) to read as "punched out."
   ============================================================ */
.ticket{
  --notch-bg: var(--ink);
  position:relative;
  display:flex;
  align-items:center;
  gap:16px;
  width:100%;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius-md);
  padding:18px 22px 18px 18px;
  text-align:left;
  cursor:pointer;
  transition:background-color .25s var(--ease), transform .3s var(--ease), border-color .25s var(--ease);
}
.ticket::before,
.ticket::after{
  content:"";
  position:absolute;
  top:50%;
  width:20px; height:20px;
  border-radius:50%;
  background:var(--notch-bg);
  transform:translateY(-50%);
  transition:background-color .25s var(--ease);
  z-index:1;
}
.ticket::before{ left:-10px; }
.ticket::after{ right:-10px; }

.ticket:hover, .ticket:focus-visible{
  background:var(--panel-2);
  border-color:var(--line-strong);
  transform:translateY(-3px);
}

.ticket__icon{
  flex:0 0 auto;
  width:46px; height:46px;
  border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  background:color-mix(in srgb, var(--accent) 16%, transparent);
  color:var(--accent);
  position:relative;
}
.ticket__icon svg{ width:22px; height:22px; }

.ticket__divider{
  align-self:stretch;
  width:0;
  border-left:1.5px dashed var(--line-strong);
  margin:2px 0;
  flex:0 0 auto;
}

.ticket__body{ flex:1 1 auto; min-width:0; }
.ticket__label{
  font-weight:600;
  font-size:1rem;
  color:var(--cream);
  display:block;
}
.ticket__hint{
  font-family:var(--font-mono);
  font-size:0.74rem;
  color:var(--stone-dim);
  letter-spacing:.03em;
  display:block;
  margin-top:2px;
}
.ticket__chevron{
  flex:0 0 auto;
  color:var(--stone-dim);
  transition:transform .3s var(--ease), color .25s var(--ease);
}
.ticket:hover .ticket__chevron{
  transform:translateX(3px);
  color:var(--accent);
}
.ticket__index{
  position:absolute;
  top:8px; right:16px;
  font-family:var(--font-mono);
  font-size:0.62rem;
  color:var(--stone-dim);
  letter-spacing:.04em;
}

/* ============================================================
   NAV (homepage)
   ============================================================ */
.nav{
  position:sticky;
  top:0;
  z-index:40;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:18px 22px;
  background:color-mix(in srgb, var(--ink) 78%, transparent);
  backdrop-filter:blur(14px) saturate(140%);
  -webkit-backdrop-filter:blur(14px) saturate(140%);
  border-bottom:1px solid transparent;
  transition:border-color .3s var(--ease), padding .3s var(--ease);
}
.nav.is-scrolled{
  border-bottom-color:var(--line);
  padding:12px 22px;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-family:var(--font-display);
  font-weight:600;
  font-size:1.1rem;
  color:var(--cream);
}
.brand__mark{
  width:30px; height:30px;
  border-radius:9px;
  background:linear-gradient(160deg, var(--brass-hi), var(--brass) 70%);
  display:flex; align-items:center; justify-content:center;
  color:#1a1509;
}
.brand__mark svg{ width:16px; height:16px; }

/* ============================================================
   HERO
   ============================================================ */
.hero{
  position:relative;
  padding:64px 0 40px;
  overflow:hidden;
}
.hero::after{
  content:"";
  position:absolute;
  top:-120px; right:-160px;
  width:420px; height:420px;
  background:radial-gradient(circle, color-mix(in srgb, var(--brass) 30%, transparent), transparent 70%);
  filter:blur(10px);
  pointer-events:none;
}
.hero__grid{
  position:relative;
  z-index:1;
  display:grid;
  gap:44px;
}
.hero h1{
  font-family:var(--font-display);
  font-weight:600;
  font-size:clamp(2.5rem, 9vw, 3.4rem);
  line-height:1.04;
  letter-spacing:-0.01em;
  color:var(--cream);
  margin:16px 0 18px;
}
.hero h1 em{
  font-style:italic;
  font-weight:500;
  color:var(--brass);
}
.hero p.lede{
  font-size:1.05rem;
  color:var(--stone);
  max-width:46ch;
  line-height:1.6;
}
.hero__cta{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  margin-top:28px;
}
.hero__proof{
  margin-top:34px;
  display:flex;
  align-items:center;
  gap:14px;
  font-family:var(--font-mono);
  font-size:0.75rem;
  color:var(--stone-dim);
  letter-spacing:.02em;
}
.hero__proof span{ color:var(--stone); }

/* ---- phone mock ---- */
.phone{
  position:relative;
  justify-self:center;
  width:min(280px, 78vw);
  border-radius:34px;
  padding:10px;
  background:linear-gradient(155deg, #2a2519, #14120d);
  border:1px solid var(--line-strong);
  box-shadow:var(--shadow);
}
.phone__screen{
  background:var(--ink);
  border-radius:26px;
  padding:26px 18px;
  min-height:420px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:14px;
  position:relative;
  overflow:hidden;
}
.phone__notch{
  position:absolute; top:8px; left:50%; transform:translateX(-50%);
  width:70px; height:18px; border-radius:12px; background:#0e0c08;
}
.phone__logo{
  margin-top:22px;
  width:56px; height:56px;
  border-radius:50%;
  background:linear-gradient(160deg, var(--brass-hi), var(--brass));
  display:flex; align-items:center; justify-content:center;
  font-family:var(--font-display);
  font-weight:700;
  color:#1a1509;
  font-size:1.3rem;
}
.phone__name{
  font-family:var(--font-display);
  font-size:1.15rem;
  font-weight:600;
}
.phone__sub{
  font-family:var(--font-mono);
  font-size:0.68rem;
  color:var(--stone-dim);
  margin-top:-10px;
}
.phone__tickets{
  width:100%;
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:8px;
}
.phone__ticket{
  --notch-bg:#15130f;
  position:relative;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:14px;
  padding:11px 14px;
  display:flex;
  align-items:center;
  gap:10px;
  font-size:0.82rem;
  font-weight:600;
}
.phone__ticket::before,.phone__ticket::after{
  content:"";
  position:absolute; top:50%; transform:translateY(-50%);
  width:12px; height:12px; border-radius:50%;
  background:var(--notch-bg);
}
.phone__ticket::before{ left:-6px; }
.phone__ticket::after{ right:-6px; }
.phone__ticket i{
  width:26px; height:26px;
  border-radius:8px;
  background:color-mix(in srgb, var(--brass) 18%, transparent);
  color:var(--brass);
  display:flex; align-items:center; justify-content:center;
}
.phone__ticket i svg{ width:14px; height:14px; }

/* ============================================================
   FEATURES
   ============================================================ */
.section{ padding:56px 0; }
.section--alt{ background:var(--ink-2); }
.section__head{ margin-bottom:34px; max-width:52ch; }
.section__head h2{
  font-family:var(--font-display);
  font-weight:600;
  font-size:clamp(1.8rem, 6vw, 2.4rem);
  margin-top:14px;
  letter-spacing:-0.01em;
}
.section__head p{
  color:var(--stone);
  margin-top:12px;
  line-height:1.6;
}

.feature-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
}
.feature-grid .ticket{ padding:22px 24px 22px 20px; }

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.steps{
  display:grid;
  gap:0;
  border-top:1px solid var(--line);
}
.step{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:18px;
  padding:26px 0;
  border-bottom:1px solid var(--line);
}
.step__num{
  font-family:var(--font-mono);
  font-size:0.78rem;
  color:var(--accent);
  padding-top:3px;
}
.step h3{
  font-family:var(--font-display);
  font-size:1.15rem;
  font-weight:600;
  margin-bottom:6px;
}
.step p{ color:var(--stone); line-height:1.6; font-size:0.94rem; }

/* ============================================================
   DEMO STRIP
   ============================================================ */
.demo{
  border-radius:var(--radius-lg);
  border:1px solid var(--line-strong);
  background:linear-gradient(155deg, var(--panel), var(--ink-2));
  padding:34px 26px;
  display:flex;
  flex-direction:column;
  gap:18px;
  position:relative;
  overflow:hidden;
}
.demo::before{
  content:"";
  position:absolute; inset:0;
  background-image:radial-gradient(circle, var(--line-strong) 1px, transparent 1px);
  background-size:16px 16px;
  opacity:0.35;
  mask-image:linear-gradient(180deg, transparent, #000 60%, transparent);
}
.demo__content{ position:relative; z-index:1; }
.demo h2{
  font-family:var(--font-display);
  font-size:clamp(1.5rem, 5.5vw, 2rem);
  font-weight:600;
}
.demo p{ color:var(--stone); margin-top:10px; max-width:44ch; line-height:1.6; }
.demo__row{ position:relative; z-index:1; display:flex; gap:12px; flex-wrap:wrap; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer{
  border-top:1px solid var(--line);
  padding:40px 0 30px;
}
.site-footer__row{
  display:flex;
  flex-direction:column;
  gap:22px;
}
.site-footer__brand{
  font-family:var(--font-display);
  font-size:1.05rem;
}
.site-footer__links{
  display:flex;
  flex-wrap:wrap;
  gap:18px;
  font-size:0.88rem;
  color:var(--stone);
}
.site-footer__links a:hover{ color:var(--accent); }
.site-footer__legal{
  font-family:var(--font-mono);
  font-size:0.7rem;
  color:var(--stone-dim);
}

/* ============================================================
   RESTAURANT PAGE
   ============================================================ */
.r-page{
  min-height:100vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  padding:0 0 40px;
}
.r-topbar{
  width:100%;
  display:flex;
  justify-content:center;
  padding:14px 0;
  font-family:var(--font-mono);
  font-size:0.68rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--stone-dim);
  border-bottom:1px solid var(--line);
}
.r-topbar a{ color:var(--stone); }
.r-topbar a:hover{ color:var(--accent); }

.r-card{
  width:100%;
  max-width:440px;
  padding:38px 22px 0;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
}
.r-logo{
  width:84px; height:84px;
  border-radius:50%;
  background:linear-gradient(160deg, var(--accent-hi), var(--accent));
  display:flex; align-items:center; justify-content:center;
  font-family:var(--font-display);
  font-weight:700;
  font-size:1.9rem;
  color:#1a1509;
  box-shadow:0 14px 30px -12px color-mix(in srgb, var(--accent) 65%, transparent);
  overflow:hidden;
}
.r-logo img{ width:100%; height:100%; object-fit:cover; }

.r-name{
  font-family:var(--font-display);
  font-weight:600;
  font-size:clamp(1.7rem, 7vw, 2.1rem);
  margin-top:18px;
  letter-spacing:-0.01em;
}
.r-tagline{
  font-family:var(--font-mono);
  font-size:0.72rem;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--accent);
  margin-top:8px;
}
.r-welcome{
  color:var(--stone);
  margin-top:14px;
  line-height:1.6;
  max-width:36ch;
}

.r-actions{
  width:100%;
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:32px;
}

.r-social{
  display:flex;
  gap:12px;
  width:100%;
  margin-top:12px;
}
.r-social .btn-ghost{
  flex:1;
  padding:13px 18px;
  font-size:0.86rem;
}

.r-footer{
  margin-top:44px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
}
.r-footer__qr{
  width:96px; height:96px;
  padding:8px;
  background:var(--cream);
  border-radius:14px;
}
.r-footer__qr img{ width:100%; height:100%; }
.r-footer__ticket-no{
  font-family:var(--font-mono);
  font-size:0.68rem;
  color:var(--stone-dim);
  letter-spacing:.06em;
}
.r-footer__powered{
  font-family:var(--font-mono);
  font-size:0.68rem;
  color:var(--stone-dim);
}
.r-footer__powered a{ color:var(--stone); border-bottom:1px dashed var(--line-strong); }
.r-footer__powered a:hover{ color:var(--accent); }

/* ============================================================
   WIFI MODAL — bottom sheet, receipt styling
   ============================================================ */
.sheet-backdrop{
  position:fixed; inset:0;
  background:rgba(10,9,6,0.7);
  backdrop-filter:blur(3px);
  opacity:0;
  pointer-events:none;
  transition:opacity .3s var(--ease);
  z-index:60;
}
.sheet-backdrop.is-open{ opacity:1; pointer-events:auto; }

.sheet{
  position:fixed;
  left:0; right:0; bottom:0;
  z-index:61;
  margin:0 auto;
  max-width:440px;
  background:var(--panel);
  border:1px solid var(--line-strong);
  border-bottom:none;
  border-radius:26px 26px 0 0;
  padding:14px 26px 32px;
  transform:translateY(110%);
  transition:transform .4s var(--ease);
  box-shadow:0 -20px 50px -10px rgba(0,0,0,0.6);
}
.sheet-backdrop.is-open .sheet{ transform:translateY(0); }

.sheet__grabber{
  width:40px; height:4px;
  border-radius:99px;
  background:var(--line-strong);
  margin:0 auto 18px;
}
.sheet__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:6px;
}
.sheet__head h3{
  font-family:var(--font-display);
  font-size:1.3rem;
  font-weight:600;
}
.sheet__close{
  width:32px; height:32px;
  border-radius:50%;
  background:var(--panel-2);
  display:flex; align-items:center; justify-content:center;
  color:var(--stone);
}
.sheet__close:hover{ color:var(--accent); }

.sheet__tear{
  height:0;
  border-top:1.5px dashed var(--line-strong);
  margin:18px 0;
  position:relative;
}
.sheet__tear::before,.sheet__tear::after{
  content:"";
  position:absolute; top:-9px;
  width:18px; height:18px; border-radius:50%;
  background:var(--ink);
}
.sheet__tear::before{ left:-26px; }
.sheet__tear::after{ right:-26px; }

.sheet__field{ margin-bottom:16px; }
.sheet__field label{
  display:block;
  font-family:var(--font-mono);
  font-size:0.68rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--stone-dim);
  margin-bottom:6px;
}
.sheet__value{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  background:var(--ink);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  padding:14px 16px;
}
.sheet__value span{
  font-family:var(--font-mono);
  font-size:1.05rem;
  letter-spacing:.02em;
  word-break:break-all;
}
.sheet__copy{
  flex:0 0 auto;
  display:flex; align-items:center; gap:6px;
  background:color-mix(in srgb, var(--accent) 18%, transparent);
  color:var(--accent);
  padding:8px 12px;
  border-radius:99px;
  font-size:0.8rem;
  font-weight:600;
  transition:background-color .25s var(--ease), transform .2s var(--ease);
}
.sheet__copy:hover{ background:color-mix(in srgb, var(--accent) 28%, transparent); }
.sheet__copy.is-copied{ background:var(--accent); color:#1a1509; }
.sheet__copy svg{ width:14px; height:14px; }

.sheet__note{
  font-size:0.82rem;
  color:var(--stone-dim);
  line-height:1.5;
}

/* ============================================================
   TOAST (copy confirmation, fallback)
   ============================================================ */
.toast{
  position:fixed;
  left:50%; bottom:26px;
  transform:translate(-50%, 20px);
  background:var(--cream);
  color:var(--ink);
  padding:12px 20px;
  border-radius:99px;
  font-size:0.85rem;
  font-weight:600;
  opacity:0;
  pointer-events:none;
  transition:opacity .3s var(--ease), transform .3s var(--ease);
  z-index:80;
}
.toast.is-visible{
  opacity:1;
  transform:translate(-50%, 0);
}

/* ============================================================
   Reveal-on-scroll
   ============================================================ */
[data-reveal]{
  opacity:0;
  transform:translateY(18px);
  transition:opacity .7s var(--ease), transform .7s var(--ease);
}
[data-reveal].is-visible{
  opacity:1;
  transform:translateY(0);
}

/* ============================================================
   Responsive — tablet / desktop
   ============================================================ */
@media (min-width:640px){
  .feature-grid{ grid-template-columns:1fr 1fr; }
  .r-actions{ gap:14px; }
}

@media (min-width:900px){
  .wrap{ padding:0 32px; }
  .hero__grid{
    grid-template-columns:1.1fr 0.9fr;
    align-items:center;
    padding-top:20px;
  }
  .hero p.lede{ max-width:42ch; }
  .steps{ grid-template-columns:1fr; }
  .step{ grid-template-columns:80px 1fr; }
  .demo{ flex-direction:row; align-items:center; justify-content:space-between; padding:44px 40px; }
  .demo__content{ max-width:52%; }
  .site-footer__row{ flex-direction:row; align-items:center; justify-content:space-between; }
}
/* ===== CUSTOM DESIGN ===== */

.card, .menu-item, .tile {
  background: linear-gradient(145deg, #1A1A1A, #2A2A2A) !important;
  border: 1px solid #C9A24A !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.7) !important;
}

.card:hover, .menu-item:hover {
  transform: translateY(-5px);
  transition: 0.3s;
}

svg {
  color: #D4AF37 !important;
}

button {
  border: 1px solid #C9A24A !important;
  color: #D4AF37 !important;
}

button:hover {
  background: linear-gradient(90deg, #C9A24A, #D4AF37) !important;
  color: #000 !important;
}