/* =========================================================
   SFS Stone — landing page styles
   Palette: teal #007A7A / #008B8B, white, dark footer #004D4D
   ========================================================= */

:root {
  --teal: #007a7a;
  --teal-light: #008b8b;
  --teal-soft: #00a3a3;
  --teal-dark: #004d4d;
  --teal-deeper: #003838;
  --gold: #c9a227;
  --ink: #1a2b2b;
  --ink-muted: #4a5c5c;
  --surface: #ffffff;
  --surface-muted: #eef2f4;
  --nav-pill: #e4eaee;
  --nav-active: #d4dde3;
  --radius-pill: 999px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow-soft: 0 12px 40px rgba(0, 61, 61, 0.18);
  --header-h: 72px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --font-fa: "Vazirmatn", "Inter", sans-serif;
  --max: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1, h2, h3, p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--teal-light);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 1000;
  background: var(--teal);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 122, 122, 0.08);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.brand-logo {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--teal);
}

.brand-sub {
  font-size: 0.68rem;
  color: var(--teal-light);
  font-weight: 500;
  white-space: nowrap;
}

.site-nav {
  justify-self: center;
}

.nav-pills {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.28rem;
  background: var(--surface-muted);
  border-radius: var(--radius-pill);
}

.nav-link {
  display: inline-block;
  padding: 0.55rem 1.05rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-muted);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.nav-link:hover {
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.7);
}

.nav-link.is-active {
  background: var(--nav-active);
  color: var(--ink);
  font-weight: 600;
}

.header-utils {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

#live-date {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

.lang-dropdown {
  position: relative;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  padding: 0.35rem 0.4rem;
  border-radius: 8px;
  transition: background 0.2s;
}

.lang-toggle:hover {
  background: var(--surface-muted);
}

.chevron {
  opacity: 0.7;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 124px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  padding: 0.35rem;
  z-index: 50;
}

.lang-menu[hidden] {
  display: none;
}

.lang-menu button {
  display: block;
  width: 100%;
  text-align: start;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  font-size: 0.88rem;
}

.lang-menu button:hover,
.lang-menu button[aria-selected="true"] {
  background: var(--surface-muted);
  color: var(--teal);
}

.search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--ink);
  transition: background 0.2s, color 0.2s;
}

.search-btn:hover {
  background: var(--surface-muted);
  color: var(--teal);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 8px;
  border-radius: 10px;
  justify-self: end;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Search overlay ---------- */

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 40, 40, 0.55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 1.25rem 2rem;
  backdrop-filter: blur(4px);
}

.search-overlay[hidden] {
  display: none;
}

.search-form {
  position: relative;
  width: min(560px, 100%);
  display: flex;
  gap: 0.5rem;
  background: #fff;
  padding: 0.75rem;
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.search-form input {
  flex: 1;
  border: 1px solid #d8e0e4;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
}

.search-form input:focus {
  outline: 2px solid var(--teal-light);
  border-color: transparent;
}

.search-form button[type="submit"] {
  background: var(--teal);
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 1.15rem;
  border-radius: 10px;
  transition: background 0.2s;
}

.search-form button[type="submit"]:hover {
  background: var(--teal-light);
}

.search-close {
  position: absolute;
  top: -2.4rem;
  right: 0;
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  padding: 0.25rem 0.5rem;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: #fff;
  min-height: clamp(520px, 78vh, 720px);
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(105deg, #fff 0%, #fff 42%, transparent 42.2%),
    linear-gradient(160deg, rgba(0, 122, 122, 0.92) 0%, rgba(0, 77, 77, 0.75) 55%, rgba(0, 77, 77, 0.55) 100%),
    url("../assets/images/hero.jpg") right center / cover no-repeat;
  clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 5.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  min-height: clamp(520px, 78vh, 720px);
}

.hero-copy {
  max-width: 420px;
  padding-bottom: 1rem;
}

.hero-wordmark {
  font-weight: 800;
  font-size: clamp(4.5rem, 10vw, 7rem);
  line-height: 0.85;
  letter-spacing: -0.04em;
  margin-bottom: 1.1rem;
  user-select: none;
}

.wm-s,
.wm-s2 {
  color: var(--teal);
}

.wm-f {
  color: var(--gold);
  text-shadow: 0 2px 0 rgba(0, 77, 77, 0.15);
}

.hero-en {
  color: var(--teal);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.hero-fa {
  font-family: var(--font-fa);
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 700;
  color: #2c3a3a;
  margin-bottom: 0.85rem;
}

.hero-desc {
  font-family: var(--font-fa);
  font-size: 0.95rem;
  color: var(--ink-muted);
  line-height: 1.85;
  margin-bottom: 1.5rem;
  max-width: 360px;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: #111;
  color: #fff;
  padding: 0.55rem 1rem 0.55rem 0.85rem;
  border-radius: 10px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
  min-width: 148px;
}

.store-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.store-badge span {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.store-badge small {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

.store-badge strong {
  font-size: 0.95rem;
  font-weight: 600;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 0 2rem;
}

.phone-mockup {
  transform: rotate(-8deg);
  filter: drop-shadow(0 28px 50px rgba(0, 40, 40, 0.45));
}

.phone-frame {
  width: min(240px, 58vw);
  aspect-ratio: 9 / 19;
  background: #1a1f22;
  border-radius: 36px;
  padding: 10px;
  border: 3px solid #2c3438;
  position: relative;
}

.phone-notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 36%;
  height: 14px;
  background: #1a1f22;
  border-radius: 0 0 12px 12px;
  z-index: 2;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
  background: var(--teal);
}

.phone-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}

.phone-ui {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 1.5rem;
  background: linear-gradient(180deg, rgba(0, 122, 122, 0.55) 0%, rgba(0, 77, 77, 0.75) 100%);
}

.phone-logo {
  width: 64px;
  height: 64px;
  filter: brightness(0) invert(1);
}

.phone-cta {
  display: inline-block;
  background: #fff;
  color: var(--teal-dark);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

/* ---------- About ---------- */

.about {
  background: #fff;
  padding: 2.5rem 1.25rem 1rem;
}

.about-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.about-inner h2 {
  color: var(--teal);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.about-inner p {
  color: var(--ink-muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

/* ---------- Gallery ---------- */

.gallery {
  padding: 2rem 1.25rem 1.5rem;
  background: #fff;
}

.gallery-row {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr auto 1fr 1fr;
  gap: 1rem;
  align-items: center;
}

.gallery-item {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1;
  box-shadow: 0 8px 24px rgba(0, 61, 61, 0.1);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--ease);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
}

.gallery-mark span {
  font-weight: 800;
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  letter-spacing: -0.03em;
  color: var(--teal);
  line-height: 1;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-soft) 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Features ---------- */

.features {
  padding: 1.5rem 1.25rem 3.5rem;
  background: #fff;
}

.feature-list {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  position: relative;
}

.feature-list::before {
  content: "";
  position: absolute;
  top: 36px;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal-light), transparent);
  opacity: 0.45;
  pointer-events: none;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.9rem;
  position: relative;
  z-index: 1;
}

.feature-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: linear-gradient(145deg, var(--teal-light), var(--teal));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(0, 122, 122, 0.28);
  transition: transform 0.25s var(--ease);
}

.feature-item:hover .feature-icon {
  transform: translateY(-4px);
}

.feature-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--teal);
  line-height: 1.35;
  max-width: 160px;
}

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

.footer-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0, 77, 77, 0.92) 0%, rgba(0, 56, 56, 0.95) 100%),
    url("../assets/images/footer-bg.jpg") center / cover no-repeat;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.5rem 1.25rem 3rem;
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) 2fr;
  gap: 3rem;
}

.footer-brand-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.footer-logo {
  width: 40px;
  height: 40px;
  filter: brightness(0) invert(1) sepia(1) saturate(4) hue-rotate(130deg);
}

.footer-brand-top strong {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.footer-slogan {
  font-size: 0.9rem;
  opacity: 0.85;
  margin-bottom: 1.35rem;
  max-width: 260px;
  line-height: 1.5;
}

.social-list {
  display: flex;
  gap: 0.55rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  transition: background 0.2s, transform 0.2s;
}

.social-link:hover {
  background: var(--teal-light);
  transform: translateY(-2px);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.footer-col h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-col a {
  font-size: 0.88rem;
  opacity: 0.8;
  transition: opacity 0.2s, color 0.2s;
}

.footer-col a:hover {
  opacity: 1;
  color: #b8e4e4;
}

/* ---------- RTL tweaks ---------- */

html[dir="rtl"] .brand-text,
html[dir="rtl"] .header-utils,
html[dir="rtl"] .nav-pills {
  direction: rtl;
}

html[dir="rtl"] .lang-menu {
  right: auto;
  left: 0;
}

html[dir="rtl"] .hero-copy {
  text-align: right;
}

html[dir="rtl"] .hero-wordmark,
html[dir="rtl"] .hero-en {
  direction: ltr;
  text-align: right;
  unicode-bidi: isolate;
}

html[dir="rtl"] .store-badges {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .gallery-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
  }

  .gallery-mark {
    grid-column: 1 / -1;
    padding: 0.5rem 0;
  }

  .gallery-mark span {
    font-size: 3.5rem;
  }

  .feature-list::before {
    display: none;
  }
}

@media (max-width: 860px) {
  .header-inner {
    grid-template-columns: 1fr auto auto;
  }

  .nav-toggle {
    display: flex;
    order: 2;
  }

  .header-utils {
    order: 1;
    gap: 0.45rem;
  }

  #live-date {
    display: none;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0.75rem 1.25rem 1.1rem;
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s var(--ease), opacity 0.25s, visibility 0.25s;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    justify-self: stretch;
    z-index: 90;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-pills {
    flex-direction: column;
    align-items: stretch;
    border-radius: 16px;
    padding: 0.4rem;
  }

  .nav-link {
    text-align: center;
  }

  .hero-bg {
    clip-path: none;
    background:
      linear-gradient(180deg, #fff 0%, #fff 38%, transparent 55%),
      linear-gradient(160deg, rgba(0, 122, 122, 0.88) 30%, rgba(0, 77, 77, 0.7) 100%),
      url("../assets/images/hero.jpg") center 30% / cover no-repeat;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.75rem 1.25rem 3.5rem;
    min-height: 0;
  }

  .hero-copy {
    max-width: none;
    text-align: center;
  }

  .hero-desc {
    max-width: none;
    margin-left: auto;
    margin-right: auto;
  }

  .store-badges {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
    padding: 0.5rem 0 0;
  }

  .phone-mockup {
    transform: rotate(-4deg) scale(0.92);
  }

  .feature-list {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem 1rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-cols {
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1.25rem;
  }
}

@media (max-width: 520px) {
  .brand-sub {
    display: none;
  }

  .gallery-row {
    grid-template-columns: 1fr 1fr;
  }

  .feature-list {
    grid-template-columns: 1fr;
  }

  .footer-cols {
    grid-template-columns: 1fr;
  }

  .phone-frame {
    width: min(200px, 70vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
