/* =========================
   home.css
   Traditional Minimal Cafe
========================= */

:root {
  --page-bg: #efe5d8;

  --traditional-dark: #1f140d;
  --traditional-dark-2: #2b1a10;
  --traditional-brown: #472a19;
  --traditional-brown-2: #5a321f;
  --traditional-brick: #8a3f24;
  --traditional-firooze: #017DAC;
  --traditional-cream: #f4ead7;
  --traditional-cream-2: #e8cec0;

  --dark-green: #e8cec0;
  --dark-green-2: #472a19;

  --cream: #e8cec0;
  --cream-light: #f1ddd3;

  --text-cream: #f7f2ee;
  --text-dark: #472a19;

  --white-line: rgba(71, 42, 25, 0.9);
  --soft-line: rgba(71, 42, 25, 0.18);

  --accent: #c79a4b;
}

/* =========================
   Reset
========================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@font-face {
  font-family: "IranNastaliq";
  src: url("../fonts/IranNastaliq.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "ElMessiri";
  src: url("../fonts/ElMessiri-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--page-bg);
  font-family: "ElMessiri", Georgia, serif;
  color: var(--text-dark);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font-family: inherit;
}

/* =========================
   Shell
========================= */

.home-shell {
  width: 100%;
  min-height: 100vh;

  display: flex;
  justify-content: center;

  background:
          radial-gradient(circle at top, rgba(199, 154, 75, 0.12), transparent 34%),
          var(--page-bg);
}

.home-container {
  width: 100%;
  max-width: 310px;
  min-height: 100vh;

  background: var(--page-bg);
  overflow: hidden;

  border-left: 2px solid var(--traditional-brown);
  border-right: 2px solid var(--traditional-brown);

  box-shadow: 0 0 40px rgba(31, 20, 13, 0.12);
}

/* =========================
   Hero
========================= */

.hero-section {
  position: relative;
  width: 100%;

  min-height: 100vh;
  min-height: 100svh;

  overflow: hidden;
  background: var(--traditional-dark);

  display: flex;
  align-items: center;
  justify-content: center;

  isolation: isolate;
}

.hero-section.traditional-hero {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--traditional-dark);
}

.hero-bg-gif {
  position: absolute;
  inset: 0;
  z-index: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;
  display: block;
}

.hero-arch-svg {
  position: absolute;
  inset: 0;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: -43px;
  margin: auto;
  height: 100%;
  pointer-events: none;
}

.hero-warm-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;

  pointer-events: none;

  background:
          radial-gradient(
                  circle at center,
                  rgba(138, 63, 36, 0.12),
                  transparent 44%
          ),
          linear-gradient(
                  to bottom,
                  rgba(31, 20, 13, 0.16) 0%,
                  rgba(31, 20, 13, 0.34) 55%,
                  rgba(31, 20, 13, 0.50) 100%
          );
}

.hero-pattern-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;

  opacity: 0.08;
  pointer-events: none;

  background-size: 42px 42px;
  background-position: 0 0, 0 21px, 21px -21px, -21px 0;
}

.top-brick-area {
  position: relative;
  z-index: 4;

  width: 100%;

  min-height: 100vh;
  min-height: 100svh;

  background: transparent;

  display: flex;
  justify-content: center;
  align-items: center;

  padding: clamp(72px, 10vh, 100px) 16px clamp(28px, 6vh, 56px);

  overflow: visible;
}

.brick-pattern {
  position: absolute;
  top: 0;

  width: 55px;
  height: 100%;

  opacity: 0.08;
  pointer-events: none;

  background-image:
          linear-gradient(rgba(244, 234, 215, 0.28) 1px, transparent 1px),
          linear-gradient(90deg, rgba(244, 234, 215, 0.20) 1px, transparent 1px);

  background-size: 24px 12px;
}

.brick-pattern.left {
  left: 0;
}

.brick-pattern.right {
  right: 0;
}

/* =========================
   Hero Content
========================= */

.hero-arch-frame {
  position: relative;
  z-index: 5;

  width: min(100%, 320px);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;

  transform: translateY(clamp(8px, 4vh, 42px));

  gap: clamp(10px, 2.2vh, 18px);
}

.hero-logo-wrap {
  position: relative;

  width: 100%;

  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo {
  position: absolute;
  top: -199px;
  width: 175px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.48));
}

.hero-ad-caption {
  position: absolute;
  width: min(100%, 270px);
  max-width: 270px;
  top: -39px;
  margin: 0 auto;
  color: #f4ead7eb;
  font-size: 1.2rem;
  line-height: 1.85;
  text-align: center;
  opacity: 1;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
}

.hero-ad-box {
  display: none;
}

.hero-ad-gif {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-menu-panel {
  width: min(100%, 260px);

  padding: 8px;

  display: flex;
  justify-content: center;

  border-radius: 18px;
}

.intro-actions {
  width: 100%;

  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.6vh, 12px);

  align-items: center;
}

.home-btn {
  width: 100%;
  min-width: 120px;

  height: clamp(34px, 5.2vh, 40px);

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(244, 234, 215, 0.92);
  color: var(--traditional-dark-2);

  border: 1px solid rgba(199, 154, 75, 0.48);
  border-radius: 12px;

  font-size: clamp(15px, 4.2vw, 17px);
  line-height: 1;
  font-weight: 700;

  box-shadow:
          0 8px 18px rgba(0, 0, 0, 0.18),
          inset 0 0 0 1px rgba(255, 255, 255, 0.22);

  transition:
          transform 0.2s ease,
          background-color 0.2s ease,
          color 0.2s ease,
          border-color 0.2s ease;
}

.home-btn:hover {
  background: var(--traditional-firooze);
  color: var(--traditional-dark);
  border-color: rgba(244, 234, 215, 0.54);
  transform: translateY(-2px);
}

.home-btn:active {
  transform: scale(0.985);
}

/* =========================
   Lang Switcher
========================= */

.lang-switcher {
  position: absolute;
  top: 18px;
  inset-inline-end: 16px;
  z-index: 8;

  display: flex;
  gap: 6px;
  align-items: center;

  padding: 6px;
  border-radius: 999px;

  background: rgba(31, 20, 13, 0.52);
  border: 1px solid rgba(199, 154, 75, 0.32);

  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.lang-switcher button,
.lang-switcher a {
  min-width: 32px;
  height: 28px;
  padding: 0 9px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 0;
  border-radius: 999px;

  background: transparent;
  color: rgba(244, 234, 215, 0.86);

  font-size: 12px;
  font-weight: 700;
  line-height: 1;

  cursor: pointer;

  transition:
          background-color 0.2s ease,
          color 0.2s ease,
          transform 0.2s ease;
}

.lang-switcher button:hover,
.lang-switcher a:hover,
.lang-switcher button.active,
.lang-switcher a.active {
  background: #017DAC;
  color: var(--traditional-dark);
  transform: translateY(-1px);
}

/* =========================
   Story
========================= */

.story-section {
  position: relative;

  background:
          radial-gradient(circle at top, rgba(199, 154, 75, 0.10), transparent 34%),
          var(--page-bg);

  padding: 34px 0 58px;

  text-align: center;
}

.story-section::before {
  content: "";

  position: absolute;
  top: 0;
  left: 28px;
  right: 28px;

  height: 1px;

  background: linear-gradient(
          90deg,
          transparent,
          rgba(71, 42, 25, 0.32),
          transparent
  );
}

.section-title {
  position: relative;
  z-index: 2;

  color: var(--text-dark);

  font-size: 24px;
  font-weight: 400;
  line-height: 1.2;

  margin-bottom: 42px;
}

.section-title span {
  font-size: 13px;
  vertical-align: middle;
  margin: 0 8px;
  color: var(--accent);
}

/* =========================
   Story Slider
========================= */

.story-gallery {
  display: none;
}

.story-slider {
  position: relative;
  z-index: 2;

  width: calc(100% - 42px);
  max-width: 330px;

  margin: 0 auto 48px;
  direction: ltr;
}

.story-slider-window {
  width: 100%;
  overflow: hidden;

  padding: 10px;

  border-radius: 24px;
  /*border: 1px solid rgba(71, 42, 25, 0.18);*/

  /*background:*/
  /*        linear-gradient(*/
  /*                145deg,*/
  /*                rgba(244, 234, 215, 0.92),*/
  /*                rgba(232, 206, 192, 0.76)*/
  /*        );*/

  /*box-shadow:*/
  /*        0 18px 36px rgba(71, 42, 25, 0.15),*/
  /*        inset 0 0 0 1px rgba(255, 255, 255, 0.28);*/
}

.story-slider-track {
  display: flex;
  width: 100%;

  direction: ltr;

  transition: transform 0.45s ease;
  will-change: transform;
}

.story-slider-item {
  position: relative;

  flex: 0 0 100%;

  width: 100%;
  height: 220px;

  padding: 0;
  overflow: hidden;

  border: 0;
  border-radius: 18px;
  margin-left: 5px;
  background: var(--traditional-brown);
  cursor: zoom-in;

  /*box-shadow: 0 14px 28px rgba(71, 42, 25, 0.18);*/
}

.story-slider-item::after {
  content: "";

  position: absolute;
  inset: 0;

  background:
          linear-gradient(
                  to top,
                  rgba(31, 20, 13, 0.68),
                  rgba(31, 20, 13, 0.14) 58%,
                  transparent
          );

  pointer-events: none;
}

.story-slider-item img {
  width: 100%;
  height: 100%;

  object-fit: cover;

  transform: scale(1.02);
  transition: transform 0.35s ease, filter 0.35s ease;
}

.story-slider-item:hover img {
  transform: scale(1.06);
  filter: saturate(1.06) contrast(1.03);
}

.story-slider-caption {
  position: absolute;
  right: 16px;
  bottom: 14px;
  z-index: 2;

  color: var(--traditional-cream);

  font-size: 14px;
  line-height: 1.4;

  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
}

.story-slider-btn {
  position: absolute;
  top: 50%;
  z-index: 5;

  width: 36px;
  height: 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(199, 154, 75, 0.45);
  border-radius: 50%;

  background: rgba(71, 42, 25, 0.94);
  color: var(--traditional-cream);

  font-size: 28px;
  line-height: 1;

  cursor: pointer;

  box-shadow: 0 10px 24px rgba(31, 20, 13, 0.24);

  transform: translateY(-50%);

  transition:
          background-color 0.2s ease,
          color 0.2s ease,
          transform 0.2s ease;
}

.story-slider-prev {
  left: -7px;
}

.story-slider-next {
  right: -7px;
}

.story-slider-btn:hover {
  background: var(--traditional-firooze);
  color: var(--traditional-dark);
  transform: translateY(-50%) scale(1.06);
}

.story-slider-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;

  margin-top: 13px;
}

.story-slider-dot {
  width: 7px;
  height: 7px;

  border: 0;
  border-radius: 999px;

  background: rgba(71, 42, 25, 0.30);
  cursor: pointer;

  transition:
          width 0.25s ease,
          background-color 0.25s ease,
          transform 0.25s ease;
}

.story-slider-dot.active {
  width: 23px;
  background: var(--traditional-brown);
}

.story-slider-dot:hover {
  transform: translateY(-1px);
}

/* =========================
   Story Modal
========================= */

body.story-modal-open {
  overflow: hidden;
}

.story-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 20px;

  background:
          radial-gradient(circle at center, rgba(199, 154, 75, 0.12), transparent 42%),
          rgba(31, 20, 13, 0.88);

  backdrop-filter: blur(7px);
}

.story-modal.active {
  display: flex;
}

.story-modal-image {
  width: min(92vw, 760px);
  max-height: 82vh;

  object-fit: contain;

  border-radius: 20px;
  border: 1px solid rgba(244, 234, 215, 0.35);

  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
}

.story-modal-close,
.story-modal-nav {
  position: fixed;
  z-index: 100000;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 0;
  border-radius: 50%;

  background: rgba(244, 234, 215, 0.95);
  color: var(--traditional-dark);

  cursor: pointer;

  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);

  transition:
          transform 0.2s ease,
          background-color 0.2s ease;
}

.story-modal-close {
  top: 16px;
  right: 16px;

  width: 42px;
  height: 42px;

  font-size: 30px;
  line-height: 1;
}

.story-modal-nav {
  top: 50%;

  width: 44px;
  height: 44px;

  font-size: 34px;
  line-height: 1;

  transform: translateY(-50%);
}

.story-modal-prev {
  left: 18px;
}

.story-modal-next {
  right: 18px;
}

.story-modal-close:hover,
.story-modal-nav:hover {
  background: var(--traditional-firooze);
}

.story-modal-close:hover {
  transform: scale(1.06);
}

.story-modal-nav:hover {
  transform: translateY(-50%) scale(1.06);
}

.story-text {
  width: calc(100% - 56px);
  max-width: 245px;

  margin: 0 auto 24px;

  color: var(--text-dark);

  font-size: 11px;
  line-height: 1.8;

  text-align: center;
}

/* =========================
   Buttons
========================= */

.cream-btn {
  width: calc(100% - 56px);
  max-width: 245px;
  height: 38px;

  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--traditional-brown);
  color: var(--text-cream);

  border: 1px solid rgba(199, 154, 75, 0.38);
  border-radius: 12px;

  font-size: 12.5px;
  line-height: 1;

  text-transform: uppercase;

  box-shadow: 0 8px 18px rgba(71, 42, 25, 0.14);

  transition:
          background-color 0.2s ease,
          transform 0.15s ease,
          color 0.2s ease;
}

.cream-btn:hover {
  background: var(--traditional-firooze);
  color: var(--traditional-dark);
}

.cream-btn:active {
  transform: scale(0.985);
}

/* =========================
   Location
========================= */

.location-section {
  background: var(--page-bg);

  padding: 0 0 72px;

  text-align: center;
}

.location-section .section-title {
  margin-bottom: 28px;
}

.location-map {
  width: 205px;
  height: 205px;

  object-fit: cover;

  margin: 0 auto 24px;

  border: 1px solid rgba(71, 42, 25, 0.15);
  border-radius: 50%;

  overflow: hidden;

  box-shadow: 0 10px 24px rgba(71, 42, 25, 0.10);
}

.address-text {
  color: var(--text-dark);

  font-size: 10.5px;
  line-height: 1.8;

  margin-bottom: 22px;
}

/* =========================
   Join Us
========================= */

.join-section {
  position: relative;

  background:var(--mt-gold);

  color: var(--text-dark);
  text-align: center;

  padding: 27px 28px 18px;

  border-top: 2px solid var(--traditional-brown);
}

.join-section::before {
  content: "";

  position: absolute;
  top: 10px;
  left: 28px;
  right: 28px;

  height: 1px;

  background: linear-gradient(
          90deg,
          transparent,
          rgba(71, 42, 25, 0.26),
          transparent
  );
}

.join-title {
  position: relative;
  z-index: 1;

  font-size: 25px;
  font-weight: 400;
  line-height: 1.2;

  margin-bottom: 15px;

  color: var(--text-dark);
}

.join-text {
  position: relative;
  z-index: 1;

  color: #5c3a28;

  font-size: 10.5px;
  line-height: 1.6;

  margin-bottom: 18px;
}

.join-actions {
  position: relative;
  z-index: 1;

  display: flex;
  flex-direction: column;
  gap: 10px;

  margin-bottom: 14px;
}

.join-actions .home-btn {
  width: 100%;
  height: 35px;

  font-size: 13px;

  background: var(--traditional-brown);
  color: var(--text-cream);
}

.join-actions .home-btn:hover {
  background: var(--traditional-firooze);
  color: var(--traditional-dark);
}

.home-footer {
  position: relative;
  z-index: 1;

  color: var(--text-dark);
  text-align: center;
}

.home-footer p {
  font-size: 13px;
  line-height: 1.3;
  margin-bottom: 3px;
}

.home-footer span {
  display: block;

  font-size: 9.5px;
  line-height: 1.4;
}

/* =========================
   Responsive
========================= */

@media (max-width: 768px) {
  .home-container {
    max-width: 100%;
    width: 100%;

    border-left: none;
    border-right: none;
  }

  .hero-section,
  .hero-section.traditional-hero {
    min-height: 100svh;
  }

  .top-brick-area {
    min-height: 100svh;
    padding: clamp(72px, 9vh, 92px) 20px clamp(30px, 5vh, 42px);
  }

  .hero-arch-frame {
    width: min(100%, 320px);
    transform: translateY(clamp(6px, 3.5vh, 34px));
  }

  .hero-menu-panel {
    width: min(100%, 260px);
  }

  .home-btn {
    min-width: 132px;
    height: clamp(36px, 5vh, 40px);
    font-size: clamp(15px, 4.3vw, 17px);
  }

  .story-slider {
    width: calc(100% - 32px);
    max-width: 430px;
  }

  .story-slider-item {
    height: 245px;
  }

  .story-text,
  .cream-btn {
    width: calc(100% - 48px);
    max-width: 360px;
  }

  .location-map {
    width: 235px;
    height: 235px;
  }

  .join-section {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 480px) {
  .lang-switcher {
    top: 14px;
    inset-inline-end: 14px;
    padding: 5px;
  }

  .lang-switcher button,
  .lang-switcher a {
    min-width: 30px;
    height: 26px;
    font-size: 11px;
  }

  .top-brick-area {
    padding: clamp(68px, 9vh, 82px) 16px clamp(28px, 5vh, 38px);
  }

  .hero-arch-frame {
    width: min(100%, 285px);
    transform: translateY(clamp(4px, 3vh, 28px));
    gap: clamp(9px, 1.9vh, 15px);
  }

  .hero-menu-panel {
    width: min(100%, 245px);
    padding: 7px;
  }

  .intro-actions {
    gap: 9px;
  }

  .home-btn {
    height: 36px;
    border-radius: 11px;

    font-size: 15.5px;
  }

  .hero-warm-overlay {
    background:
            radial-gradient(
                    circle at center,
                    rgba(138, 63, 36, 0.18),
                    transparent 42%
            ),
            linear-gradient(
                    to bottom,
                    rgba(31, 20, 13, 0.30) 0%,
                    rgba(31, 20, 13, 0.56) 56%,
                    rgba(31, 20, 13, 0.74) 100%
            );
  }

  .story-slider {
    width: calc(100% - 28px);
    margin-bottom: 42px;
  }

  .story-slider-window {
    padding: 9px;
    border-radius: 22px;
  }

  .story-slider-item {
    height: 215px;
    border-radius: 17px;
  }

  .story-slider-btn {
    width: 34px;
    height: 34px;
    font-size: 26px;
  }

  .story-slider-prev {
    left: -4px;
  }

  .story-slider-next {
    right: -4px;
  }

  .story-modal {
    padding: 16px;
  }

  .story-modal-close {
    top: 12px;
    right: 12px;

    width: 38px;
    height: 38px;
  }

  .story-modal-nav {
    width: 38px;
    height: 38px;

    font-size: 30px;
  }

  .story-modal-prev {
    left: 10px;
  }

  .story-modal-next {
    right: 10px;
  }
}

@media (max-width: 380px) {
  .hero-section,
  .hero-section.traditional-hero {
    min-height: 100svh;
  }

  .top-brick-area {
    min-height: 100svh;
    padding: clamp(64px, 8.5vh, 76px) 14px clamp(24px, 4.5vh, 34px);
  }

  .hero-arch-frame {
    width: min(100%, 260px);
    transform: translateY(clamp(0px, 2.5vh, 22px));
    gap: 8px;
  }

  .hero-menu-panel {
    width: min(100%, 225px);
    padding: 6px;
  }

  .intro-actions {
    gap: 8px;
  }

  .home-btn {
    width: 100%;
    min-width: 110px;
    height: 34px;

    font-size: 15px;

    border-radius: 10px;
  }

  .section-title {
    font-size: 22px;
  }

  .story-slider-item {
    height: 192px;
  }

  .story-slider-caption {
    right: 13px;
    bottom: 12px;

    font-size: 13px;
  }
}

@media (min-width: 769px) {
  .home-container {
    max-width: 390px;
  }

  .hero-arch-frame {
    width: min(100%, 300px);
  }
}

@media (max-height: 680px) {
  .hero-arch-frame {
    transform: translateY(8px);
    gap: 8px;
  }

  .hero-menu-panel {
    padding: 5px;
  }

  .intro-actions {
    gap: 7px;
  }

  .home-btn {
    height: 32px;
    font-size: 14.5px;
  }
}

@media (min-height: 850px) and (max-width: 768px) {
  .hero-arch-frame {
    transform: translateY(clamp(22px, 5vh, 52px));
  }
}

/* =========================
   Reduced Motion
========================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .story-slider-track,
  .story-slider-item img,
  .story-slider-btn,
  .story-slider-dot,
  .story-modal-close,
  .story-modal-nav {
    transition: none !important;
  }
}
