/* ناژ کافه — Nazh Coffee & Good Moments */

@font-face {
  font-family: "NazhCafe";
  src: url("../fonts/NazhCafe-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "NazhCafe";
  src: url("../fonts/NazhCafe-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --bg-soft: #f6f5f1;
  --ink: #141414;
  --ink-2: #3c3c3a;
  --muted: #7a7a76;
  --line: #e7e6e1;
  --line-2: #d4d3cd;
  --green: #4a5a35;
  --bg-soft-2: #efeee9;
  --surface: rgba(255, 255, 255, .97);
  --photo-bg: #ffffff;
  --shadow: rgba(20, 24, 14, .12);
  color-scheme: light;

  --font: "NazhCafe", "Vazirmatn", Tahoma, sans-serif;
  --latin: "NazhCafe", Georgia, serif;

  --t-meta: 0.75rem;
  --t-sm: 0.875rem;
  --t-body: 1rem;
  --t-lg: 1.125rem;
  --t-h3: 1.375rem;
  --t-h2: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);
  --t-h1: clamp(2.5rem, 1.6rem + 4vw, 4.75rem);

  --wrap: 1240px;
  --gutter: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (min-width: 768px) { :root { --gutter: 32px; } }

/* حالت تاریک: رنگ‌ها از لوگو (سبز زیتونی تیره و طلایی) */
:root[data-theme="dark"] {
  --bg: #121410;
  --bg-soft: #1b1e18;
  --bg-soft-2: #23271f;
  --ink: #eceae2;
  --ink-2: #c9c7bd;
  --muted: #8f8d84;
  --line: #2a2e25;
  --line-2: #3b4034;
  --green: #b3c38a;
  --surface: rgba(18, 20, 16, .97);
  --shadow: rgba(0, 0, 0, .5);
  color-scheme: dark;
}
html { transition: background-color .3s var(--ease); }
body { transition: background-color .3s var(--ease), color .3s var(--ease); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.7;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-weight: 700; margin: 0; line-height: 1.25; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.latin { font-family: var(--latin); direction: ltr; letter-spacing: .2em; text-transform: uppercase; font-size: var(--t-meta); }

/* ---------- header ---------- */
.header { position: sticky; top: 0; z-index: 50; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 2px 10px -4px var(--shadow); }
.header .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 76px; }
.header-logo { justify-self: center; display: flex; align-items: center; }
.header-logo img { width: 52px; height: 52px; }
.nav { display: none; gap: 32px; font-size: var(--t-sm); }
.nav a { position: relative; padding-block: 6px; color: var(--ink-2); transition: color .2s; }
.nav a::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px; background: var(--ink); transform: scaleX(0); transition: transform .3s var(--ease); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.header-end { justify-self: end; display: flex; align-items: center; gap: 20px; font-size: var(--t-sm); }
.header-end .ig { display: none; color: var(--ink-2); }
.burger { width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; cursor: pointer; margin-inline-start: -10px; }
.burger span { display: block; width: 22px; height: 1px; background: var(--ink); box-shadow: 0 7px 0 var(--ink); transform: translateY(-3.5px); }
@media (min-width: 900px) {
  .nav { display: flex; }
  .burger { display: none; }
  .header-end .ig { display: inline; }
}

.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-sm); border-bottom: 1px solid currentColor; padding-bottom: 2px; }

/* mobile drawer */
.drawer { position: fixed; inset: 0; z-index: 80; background: var(--bg); display: flex; flex-direction: column; padding: 16px var(--gutter) 32px; opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s; }
.drawer.open { opacity: 1; visibility: visible; }
.drawer-top { display: flex; justify-content: space-between; align-items: center; height: 44px; }
.drawer-top img { width: 44px; }
.drawer-close { width: 44px; height: 44px; border: 0; background: none; cursor: pointer; font-size: 28px; line-height: 1; }
.drawer nav { display: grid; margin-top: 48px; border-top: 1px solid var(--line); }
.drawer nav a { font-size: 1.75rem; font-weight: 700; padding: 18px 0; border-bottom: 1px solid var(--line); }
.drawer-foot { margin-top: auto; color: var(--muted); font-size: var(--t-sm); line-height: 1.9; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); font-size: var(--t-sm); cursor: pointer; transition: background .25s var(--ease), color .25s var(--ease); }
.btn:hover { background: var(--bg); color: var(--ink); }
.btn.outline { background: transparent; color: var(--ink); }
.btn.outline:hover { background: var(--ink); color: var(--bg); }
.btn.on-dark { background: #fff; color: #141414; border-color: #fff; }
.btn.on-dark:hover { background: transparent; color: #fff; }

/* ---------- hero ---------- */
.hero { padding-top: var(--gutter); }
.hero-card { position: relative; height: min(84vh, 760px); min-height: 520px; overflow: hidden; color: #fff; }
.hero-card .hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-logo { position: absolute; z-index: 2; left: 6%; top: 50%; width: clamp(150px, 19vw, 260px); height: auto; translate: 0 -50%; filter: drop-shadow(0 6px 24px rgba(0,0,0,.45)); pointer-events: none; }
@media (max-width: 767px) { .hero-logo { display: none; } }
.hero-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.62), rgba(0,0,0,.08) 60%); }
.hero-text { position: absolute; z-index: 3; inset-inline: 0; bottom: 0; padding: 32px 24px; }
@media (min-width: 768px) { .hero-text { padding: 64px; } }
.hero-text .latin { opacity: .85; margin-bottom: 16px; display: table; }
.hero-text h1 { font-size: var(--t-h1); line-height: 1.1; margin-bottom: 16px; }
.hero-text p { font-size: var(--t-lg); max-width: 460px; opacity: .9; margin-bottom: 32px; }

/* ---------- intro ---------- */
.intro { padding: 96px 0; text-align: center; }
@media (min-width: 768px) { .intro { padding: 128px 0; } }
.eyebrow { display: block; font-size: var(--t-sm); color: var(--muted); margin-bottom: 16px; }
.intro h2 { font-size: var(--t-h2); margin-bottom: 24px; }
.intro p { max-width: 640px; margin-inline: auto; color: var(--ink-2); font-size: var(--t-lg); line-height: 2; }
.points { list-style: none; padding: 0; margin: 40px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 0; font-size: var(--t-sm); color: var(--ink-2); }
.points li { padding-inline: 20px; }
.points li + li { border-inline-start: 1px solid var(--line-2); }

/* ---------- tiles ---------- */
.tiles { display: grid; gap: var(--gutter); }
@media (min-width: 768px) { .tiles { grid-template-columns: 1fr 1fr; } }
.tile { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; color: #fff; }
@media (min-width: 768px) { .tile { aspect-ratio: 5 / 6; } }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.tile:hover img { transform: scale(1.04); }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55), transparent 55%); }
.tile-text { position: absolute; z-index: 1; inset-inline: 0; bottom: 0; padding: 28px; }
@media (min-width: 768px) { .tile-text { padding: 40px; } }
.tile-text h3 { font-size: var(--t-h2); margin-bottom: 8px; }
.tile-text p { opacity: .88; margin-bottom: 20px; max-width: 360px; }

/* ---------- story ---------- */
.story { padding: 112px 0; }
@media (min-width: 768px) { .story { padding: 144px 0; } }
.story-grid { display: grid; gap: 48px; }
@media (min-width: 900px) { .story-grid { grid-template-columns: 5fr 6fr; gap: 96px; align-items: start; } }
.story-quote { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 3rem); font-weight: 700; line-height: 1.45; margin: 0; }
.story-quote span { color: var(--green); }
.story-body { display: grid; gap: 0; border-top: 1px solid var(--ink); }
.story-row { display: grid; gap: 8px; padding: 28px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 600px) { .story-row { grid-template-columns: 160px 1fr; gap: 32px; } }
.story-row h4 { font-size: var(--t-sm); color: var(--muted); font-weight: 400; padding-top: 4px; }
.story-row p { color: var(--ink-2); line-height: 2; }
.story-row p.big { font-size: var(--t-h3); font-weight: 700; color: var(--ink); line-height: 1.5; }
.story-end { margin-top: 40px; font-size: var(--t-lg); color: var(--ink-2); }

/* ---------- featured ---------- */
.featured { padding: 0 0 112px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 32px; padding-top: 32px; border-top: 1px solid var(--line); }
.section-head h2 { font-size: var(--t-h2); }
.feat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 12px; }
@media (min-width: 768px) { .feat-row { grid-template-columns: repeat(4, 1fr); gap: var(--gutter); } }
@media (max-width: 767px) {
  .feat-img { border-radius: 14px; border: 1px solid var(--line); }
  .feat-meta { flex-direction: column; align-items: flex-start; gap: 2px; }
  .feat h3 { font-size: var(--t-body); color: var(--green); }
  .feat p { color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}
.feat { scroll-snap-align: start; display: block; }
.feat-img { aspect-ratio: 1; overflow: hidden; background: var(--photo-bg); margin-bottom: 16px; }
[data-theme="dark"] .feat-img { border-radius: 14px; }
.feat-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.feat:hover .feat-img img { transform: scale(1.04); }
.feat-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.feat h3 { font-size: var(--t-lg); color: var(--green); }
.feat p { font-size: var(--t-sm); color: var(--muted); margin-top: 4px; }

/* ---------- price ---------- */
.price { white-space: nowrap; font-weight: 700; font-size: var(--t-body); }
.price small { font-weight: 400; font-size: var(--t-meta); color: var(--muted); margin-inline-start: 4px; }

/* ---------- location ---------- */
.location { background: var(--bg-soft); padding: 96px 0; }
.loc-grid { display: grid; gap: 48px; }
@media (min-width: 900px) { .loc-grid { grid-template-columns: 1fr 1fr; gap: 80px; align-items: stretch; } }
.loc-grid h2 { font-size: var(--t-h2); margin-bottom: 32px; }
.info { border-top: 1px solid var(--ink); }
.info-row { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line-2); }
.info-row dt { color: var(--muted); font-size: var(--t-sm); padding-top: 2px; }
.info-row dd { margin: 0; }
.loc-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.map { position: relative; min-height: 360px; background: var(--bg-soft); }
[data-theme="dark"] .map iframe { filter: brightness(.88) saturate(.95); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- footer ---------- */
.footer { padding: 72px 0 32px; text-align: center; border-top: 1px solid var(--line); }
.footer img { width: 72px; margin: 0 auto 20px; }
.footer .latin { color: var(--muted); display: block; margin-bottom: 20px; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 28px; font-size: var(--t-sm); margin-bottom: 48px; }
.footer-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 24px; border-top: 1px solid var(--line); font-size: var(--t-meta); color: var(--muted); }
.footer-bottom a { color: var(--ink-2); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- انیمیشن با GSAP ---------- */
.gsap .reveal { opacity: 1; transform: none; transition: none; }
/* جا برای نقطه‌ها و دنباله‌ی حروف فارسی داخل ماسک انیمیشن */
.split-mask-word-mask, .split-word-mask { padding: .35em .1em .3em; margin: -.35em -.1em -.3em; }

/* ================= نوار بالا و پایین موبایل (حالت اپلیکیشن، همه‌ی صفحه‌ها) ================= */
.appbar, .bottom-nav { display: none; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 0; background: none; cursor: pointer; color: var(--ink); }
.icon-btn svg { width: 22px; height: 22px; }

/* دکمه‌ی روشن/تاریک */
.theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }
.header-end .theme-toggle { margin-inline-end: -10px; }

@media (max-width: 767px) {
  body {
    padding-bottom: calc(66px + env(safe-area-inset-bottom));
    -webkit-tap-highlight-color: transparent;
  }
  .header { display: none; }

  .appbar {
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 50;
    height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 12px 0 4px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 2px 10px -4px var(--shadow);
  }
  .appbar-brand { display: flex; align-items: center; gap: 10px; }
  .appbar-brand img { width: 36px; height: 36px; }
  .appbar-brand span { display: flex; flex-direction: column; line-height: 1.25; }
  .appbar-brand b { font-size: var(--t-body); }
  .appbar-brand small { font-size: var(--t-meta); color: var(--muted); }
  .appbar-brand small[dir="ltr"] { font-family: Georgia, "Times New Roman", serif; letter-spacing: .04em; text-align: right; }
  .appbar-actions { display: flex; }

  .bottom-nav {
    display: grid; grid-template-columns: repeat(4, 1fr);
    position: fixed; z-index: 60; inset-inline: 0; bottom: 0;
    height: calc(62px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface);
    border-top: 1px solid var(--line);
  }
  .bottom-nav > * { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; background: none; cursor: pointer; color: var(--muted); font-size: var(--t-meta); transition: color .2s; }
  .bottom-nav svg { width: 24px; height: 24px; }
  .bottom-nav .active { color: var(--green); }
  .bottom-nav .active::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; border-radius: 0 0 2px 2px; background: var(--green); }
  .bottom-nav > *:active { color: var(--ink); }

  .footer { padding-top: 48px; }
  .hero { padding-top: 12px; }
  .hero-card { min-height: 460px; height: 72vh; border-radius: 16px; }
  .tile { border-radius: 16px; }
  .map { border-radius: 16px; overflow: hidden; }
}
