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

:root {
  --bg: #0f0e0c;
  --bg-elevated: #17150f;
  --bg-surface: #1e1c16;
  --bg-overlay: #252318;
  --amber: #e8a849;
  --amber-light: #f2c97d;
  --amber-dim: #9c7a3a;
  --warm-ochre: #d4915c;
  --light-gold: #f0c86e;
  --text-primary: #f0ede8;
  --text-secondary: #9a9590;
  --text-tertiary: #8a8580;
  --border: #2a2720;
  --border-light: #3a3730;
  --photo-paper: #f5f0e6;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
}

/* ── Selection ── */
::selection {
  background: var(--amber);
  color: var(--bg);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    'DM Sans',
    'Noto Sans TC',
    'Noto Sans SC',
    'Noto Sans JP',
    'Noto Sans KR',
    'Noto Sans Thai',
    'Noto Sans Arabic',
    'Noto Sans Devanagari',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[dir='rtl'] {
  direction: rtl;
  text-align: right;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Grain Texture (matches app GrainOverlay) ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Nav ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 14, 12, 0.82);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border-bottom: 1px solid var(--border);
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.nav-logo {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(
    135deg,
    var(--warm-ochre),
    var(--amber),
    var(--light-gold)
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-name {
  font-size: 17px;
  font-weight: 300;
  letter-spacing: 3.5px;
  text-transform: uppercase;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--amber);
}

/* ── Focus Visible (accessibility) ── */
.nav-links a:focus-visible,
.btn-store:focus-visible,
.lang-btn:focus-visible,
.lang-dropdown a:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Language Switcher ── */
.lang-switcher {
  position: relative;
}

.lang-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
  transition:
    border-color 0.2s,
    color 0.2s;
}

.lang-btn:hover {
  border-color: var(--amber-dim);
  color: var(--text-primary);
}
.lang-btn svg {
  width: 14px;
  height: 14px;
  opacity: 0.5;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-overlay);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 6px;
  min-width: 180px;
  max-height: 320px;
  overflow-y: auto;
  display: none;
  z-index: 200;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  /* Firefox scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) transparent;
}

.lang-dropdown.open {
  display: block;
}

.lang-dropdown a {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-family: inherit;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.15s,
    color 0.15s;
}

.lang-dropdown a:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}
.lang-dropdown a.active {
  color: var(--amber);
  font-weight: 600;
}

[dir='rtl'] .lang-dropdown {
  right: auto;
  left: 0;
}
[dir='rtl'] .lang-dropdown a {
  text-align: right;
}

/* ── Hero ── */
.hero {
  min-height: min(100vh, 920px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(
    ellipse at center,
    rgba(232, 168, 73, 0.07) 0%,
    rgba(212, 145, 92, 0.03) 40%,
    transparent 70%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-logo {
  width: 100px;
  height: 100px;
  border-radius: 25px;
  background: linear-gradient(
    135deg,
    var(--warm-ochre),
    var(--amber),
    var(--light-gold)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 36px;
  box-shadow:
    0 8px 48px rgba(232, 168, 73, 0.3),
    0 0 0 1px rgba(232, 168, 73, 0.1);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.hero h1 {
  font-size: 60px;
  font-weight: 700;
  letter-spacing: -1.5px;
  margin-bottom: 14px;
  background: linear-gradient(
    135deg,
    var(--text-primary) 30%,
    var(--amber-light) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: 21px;
  color: var(--text-secondary);
  font-weight: 300;
  letter-spacing: 3px;
  margin-bottom: 20px;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-tertiary);
  max-width: 480px;
  margin: 0 auto 52px;
  line-height: 1.8;
}

.btn-group {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    background 0.2s;
}

.btn-store--apple {
  background: var(--text-primary);
  color: var(--bg);
}

.btn-store--apple:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(240, 237, 232, 0.12);
}

.btn-store--google {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-store--google:hover {
  background: var(--bg-overlay);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.btn-store svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.btn-store__text {
  text-align: left;
  line-height: 1.2;
}
.btn-store__label {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.65;
}
.btn-store__name {
  font-size: 16px;
  font-weight: 600;
}

[dir='rtl'] .btn-store__text {
  text-align: right;
}


/* ── Section Shared ── */
section {
  padding: 100px 0;
}

.section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 12px;
}

.section-title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.75;
}

/* ── Features ── */
.features {
  background: var(--bg);
  overflow: hidden;
}

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
  padding: 64px 0;
}

.feature:nth-child(even) {
  direction: rtl;
}
.feature:nth-child(even) > * {
  direction: ltr;
}

.feature-text {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(212, 145, 92, 0.12),
    rgba(232, 168, 73, 0.1)
  );
  border: 1px solid rgba(232, 168, 73, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  color: var(--amber);
}

.feature h3 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.feature p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
}

.feature-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.feature-highlights li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.feature-highlights li::before {
  content: '';
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber-dim);
  margin-top: 8px;
}

/* ── Phone mockup ── */
.phone-mockup {
  width: 272px;
  height: 544px;
  border-radius: 40px;
  background: var(--bg-elevated);
  border: 2.5px solid var(--border-light);
  position: relative;
  overflow: hidden;
  margin: 0 auto;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.phone-mockup::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 26px;
  background: var(--bg);
  border-radius: 0 0 14px 14px;
  z-index: 2;
}

.phone-screen {
  position: absolute;
  inset: 7px;
  border-radius: 33px;
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-tertiary);
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 33px;
}

.phone-screen__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.phone-screen__icon {
  opacity: 0.3;
}
.phone-screen__label {
  font-size: 12px;
  opacity: 0.4;
}

/* ── Highlights ── */
.highlights {
  padding: 56px 0 0;
}

.highlights-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.highlight-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.highlight-badge svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--amber);
}

/* ── Privacy ── */
.privacy {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.privacy .container {
  text-align: center;
}

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 52px;
}

.privacy-card {
  padding: 36px 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  text-align: center;
}

.privacy-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(212, 145, 92, 0.1),
    rgba(232, 168, 73, 0.06)
  );
  border: 1px solid rgba(232, 168, 73, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  color: var(--amber);
}

.privacy-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.privacy-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── CTA ── */
.cta {
  text-align: center;
  padding: 120px 0;
  position: relative;
}

.cta::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 640px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(232, 168, 73, 0.05) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.cta .section-title {
  font-size: 40px;
  margin-bottom: 12px;
}
.cta .section-desc {
  margin: 0 auto 48px;
  text-align: center;
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
}

footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-left {
  font-size: 13px;
  color: var(--text-tertiary);
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--amber);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding: 110px 24px 64px;
  }
  .hero h1 {
    font-size: 38px;
  }
  .hero-tagline {
    font-size: 17px;
    letter-spacing: 2px;
  }
  .hero-desc {
    font-size: 15px;
  }

  .feature {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
  }
  .feature:nth-child(even) {
    direction: ltr;
  }
  .feature-icon {
    margin: 0 auto 4px;
  }
  .feature-highlights li {
    justify-content: center;
    text-align: left;
  }

  .phone-mockup {
    width: 216px;
    height: 432px;
    border-radius: 32px;
  }
  .phone-mockup::before {
    width: 90px;
    height: 20px;
    border-radius: 0 0 10px 10px;
  }
  .phone-screen {
    border-radius: 25px;
    inset: 6px;
  }

  .privacy-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .section-title {
    font-size: 28px;
  }
  .section-desc {
    font-size: 15px;
  }
  .feature h3 {
    font-size: 22px;
  }

  .nav-links {
    display: none;
  }

  footer .container {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 20px;
  }
  .hero {
    min-height: auto;
    padding: 100px 20px 60px;
  }
  .hero h1 {
    font-size: 30px;
  }
  .hero-tagline {
    font-size: 16px;
    letter-spacing: 1.5px;
  }
  .hero-logo {
    width: 76px;
    height: 76px;
    border-radius: 19px;
  }
  .hero-logo svg {
    width: 38px;
    height: 38px;
  }
  .btn-store {
    padding: 12px 20px;
  }
  .btn-store__name {
    font-size: 15px;
  }
  .cta .section-title {
    font-size: 28px;
  }
  section {
    padding: 72px 0;
  }
  .cta {
    padding: 80px 0;
  }
  .privacy-card {
    padding: 28px 20px;
  }
}

@media (max-width: 375px) {
  .container {
    padding: 0 16px;
  }
  .hero {
    min-height: auto;
    padding: 88px 16px 48px;
  }
  .hero h1 {
    font-size: 26px;
    letter-spacing: -0.5px;
  }
  .hero-tagline {
    font-size: 15px;
    letter-spacing: 1px;
  }
  .hero-desc {
    font-size: 14px;
    margin-bottom: 36px;
  }
  .hero-logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    margin-bottom: 28px;
  }
  .hero-logo svg {
    width: 32px;
    height: 32px;
  }

  .btn-group {
    gap: 10px;
  }
  .btn-store {
    padding: 11px 16px;
    gap: 10px;
    width: 100%;
    justify-content: center;
  }
  .btn-store svg {
    width: 20px;
    height: 20px;
  }
  .btn-store__label {
    font-size: 10px;
  }
  .btn-store__name {
    font-size: 14px;
  }

  .section-title {
    font-size: 24px;
  }
  .section-label {
    font-size: 11px;
    letter-spacing: 2px;
  }
  .feature h3 {
    font-size: 20px;
  }
  .feature p {
    font-size: 14px;
  }

  .phone-mockup {
    width: 192px;
    height: 384px;
    border-radius: 28px;
  }
  .phone-mockup::before {
    width: 80px;
    height: 18px;
    border-radius: 0 0 9px 9px;
  }
  .phone-screen {
    border-radius: 22px;
    inset: 5px;
  }

  .privacy-card {
    padding: 24px 16px;
  }
  .privacy-card h3 {
    font-size: 16px;
  }
  .privacy-card p {
    font-size: 13px;
  }
  .privacy-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .cta .section-title {
    font-size: 24px;
  }
  .cta .section-desc {
    font-size: 14px;
  }

  .nav-name {
    font-size: 15px;
    letter-spacing: 2.5px;
  }
  .nav-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }
  .nav-logo svg {
    width: 17px;
    height: 17px;
  }
  .lang-btn {
    padding: 5px 10px;
    font-size: 12px;
  }

  footer .container {
    padding: 0 16px;
  }
  .footer-left {
    font-size: 12px;
  }
  .footer-links {
    gap: 16px;
  }
  .footer-links a {
    font-size: 12px;
  }
}

/* ── Scrollbar ── */
.lang-dropdown::-webkit-scrollbar {
  width: 4px;
}
.lang-dropdown::-webkit-scrollbar-track {
  background: transparent;
}
.lang-dropdown::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 2px;
}
