:root {
  color-scheme: light;
  --bg: #f7f3ea;
  --bg-soft: #fffcf6;
  --surface: rgba(255, 252, 246, 0.88);
  --surface-solid: #fffcf6;
  --surface-alt: #eef4ef;
  --text: #17211d;
  --muted: #65726c;
  --line: rgba(23, 33, 29, 0.12);
  --primary: #1d3b33;
  --primary-strong: #102720;
  --primary-soft: #e4efe8;
  --accent: #d3b16f;
  --accent-strong: #9d6b24;
  --accent-soft: #f3e5c4;
  --success: #26734d;
  --white: #ffffff;
  --danger: #9f302d;
  --shadow: 0 28px 90px rgba(29, 59, 51, 0.16);
  --shadow-soft: 0 18px 56px rgba(29, 59, 51, 0.10);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 8%, rgba(211, 177, 111, 0.32), transparent 28rem),
    radial-gradient(circle at 88% 14%, rgba(228, 239, 232, 0.92), transparent 30rem),
    linear-gradient(180deg, #fffcf6 0%, var(--bg) 48%, #efe8dc 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(23, 33, 29, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 33, 29, 0.025) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 78%);
}

body.modal-open {
  overflow: hidden;
}

body[dir="rtl"] {
  direction: rtl;
}

body[dir="rtl"] .check-list li {
  padding-left: 0;
  padding-right: 30px;
}

body[dir="rtl"] .check-list li::before {
  left: auto;
  right: 0;
}

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

button,
a,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - 32px));
  margin: 16px auto 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.86);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.brand,
.nav-links,
.header-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 860;
  letter-spacing: -0.04em;
  font-size: 1.12rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border-radius: 14px;
  background: var(--primary);
  color: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.nav-links {
  gap: 1.15rem;
  color: var(--muted);
  font-size: 0.94rem;
}

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

.header-actions {
  gap: 10px;
}

.language-label select {
  min-height: 42px;
  max-width: 132px;
  padding: 0 38px 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--surface-solid);
}

.header-cta,
.primary-button,
.secondary-button,
.install-button,
.submit-button,
.ghost-button,
.google-button,
.anonymous-button {
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 780;
  border: 0;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.header-cta {
  padding: 0 18px;
  background: var(--primary);
  color: #fffaf1;
  border: 1px solid rgba(29, 59, 51, 0.14);
}

.primary-button,
.secondary-button,
.install-button,
.submit-button,
.google-button,
.anonymous-button,
.ghost-button {
  display: inline-flex;
}

.primary-button,
.submit-button {
  padding: 0 22px;
  color: #fffaf1;
  background: var(--primary);
  box-shadow: 0 18px 40px rgba(29, 59, 51, 0.22);
}

.secondary-button,
.install-button,
.google-button,
.anonymous-button,
.ghost-button {
  padding: 0 22px;
  color: var(--text);
  background: rgba(255, 252, 246, 0.86);
  border: 1px solid var(--line);
}

.primary-button:hover,
.secondary-button:hover,
.header-cta:hover,
.install-button:hover,
.submit-button:hover,
.google-button:hover,
.anonymous-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
}

.primary-button:hover,
.header-cta:hover,
.submit-button:hover {
  background: var(--primary-strong);
}

.section-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.75fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(54px, 8vw, 98px) 0 44px;
}

.hero-content h1,
.role-card h2,
.example-copy h2,
.steps-section h2,
.dashboard-copy h2,
.language-section h2,
.account-section h2,
.cta-section h2 {
  margin: 0;
  letter-spacing: -0.058em;
  line-height: 0.98;
}

.hero-content h1 {
  max-width: 770px;
  font-size: clamp(3rem, 7vw, 6.5rem);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  font-weight: 850;
}

.hero-text {
  max-width: 700px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.24rem);
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.trust-row span,
.language-grid span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--muted);
  background: rgba(255, 252, 246, 0.76);
  font-size: 0.9rem;
}

.app-preview {
  justify-self: center;
}

.phone-shell {
  position: relative;
  width: min(100%, 390px);
  min-height: 660px;
  padding: 18px;
  border: 1px solid rgba(23, 33, 29, 0.12);
  border-radius: 44px;
  background:
    radial-gradient(circle at 78% 8%, rgba(211, 177, 111, 0.38), transparent 14rem),
    linear-gradient(180deg, #284b40 0%, #162e27 100%);
  color: #fffaf1;
  box-shadow: 0 40px 120px rgba(29, 59, 51, 0.30);
  overflow: hidden;
}

.phone-shell::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 36px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.phone-topbar,
.dashboard-head,
.receipt-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.phone-topbar {
  color: rgba(255, 250, 241, 0.84);
}

.signal-dot {
  width: 40px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.qr-card,
.reward-card,
.mini-feed {
  position: relative;
  margin-top: 24px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  background: rgba(255, 252, 246, 0.13);
  backdrop-filter: blur(14px);
}

.qr-card p {
  margin: 0 0 18px;
  font-weight: 800;
}

.qr-card small {
  display: block;
  margin-top: 16px;
  color: rgba(255, 250, 241, 0.78);
}

.qr-svg {
  display: block;
  width: 100%;
  max-width: 245px;
  margin: 0 auto;
  filter: drop-shadow(0 18px 35px rgba(0, 0, 0, 0.16));
}

.reward-head strong,
.reward-head span,
.mini-feed span,
.dashboard-action strong,
.dashboard-action span {
  display: block;
}

.reward-head span,
.mini-feed span,
.dashboard-action span {
  color: rgba(255, 250, 241, 0.78);
}

.progress {
  height: 10px;
  margin-top: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.mini-feed {
  display: grid;
  gap: 8px;
  font-size: 0.94rem;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--line);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.stats-strip article {
  padding: 26px;
  background: rgba(255, 252, 246, 0.82);
}

.stats-strip strong,
.stats-strip span {
  display: block;
}

.stats-strip strong {
  font-size: 1.28rem;
  letter-spacing: -0.04em;
}

.stats-strip span {
  margin-top: 5px;
  color: var(--muted);
}

.role-section,
.example-section,
.dashboard-section,
.language-section,
.account-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 96px 0 0;
}

.role-card,
.receipt-card,
.dashboard-card,
.account-card,
.cta-section,
.language-section {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

.role-card,
.receipt-card,
.account-card {
  background: rgba(255, 252, 246, 0.82);
}

.role-card {
  padding: clamp(28px, 4vw, 44px);
  overflow: hidden;
}

.customer-card {
  background:
    radial-gradient(circle at top right, rgba(211, 177, 111, 0.24), transparent 20rem),
    rgba(255, 252, 246, 0.86);
}

.business-card-light {
  background:
    radial-gradient(circle at top right, rgba(38, 115, 77, 0.15), transparent 20rem),
    linear-gradient(180deg, rgba(238, 244, 239, 0.98), rgba(255, 252, 246, 0.88));
}

.role-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 22px;
  border-radius: 20px;
  background: var(--primary-soft);
}

.role-card h2,
.example-copy h2,
.dashboard-copy h2,
.language-section h2,
.account-section h2,
.cta-section h2,
.steps-section h2 {
  font-size: clamp(2.15rem, 4.4vw, 4.4rem);
}

.role-card p:not(.eyebrow),
.example-copy p,
.dashboard-copy p,
.language-section p,
.account-section p,
.cta-section p {
  color: var(--muted);
  line-height: 1.72;
  font-size: 1.04rem;
}

.role-card p:not(.eyebrow) {
  margin: 18px 0 28px;
}

.example-section {
  align-items: center;
}

.receipt-card {
  padding: clamp(26px, 4vw, 40px);
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.96), rgba(238, 244, 239, 0.86));
}

.receipt-top strong {
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.receipt-top span {
  color: var(--muted);
}

.receipt-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.receipt-line:first-of-type {
  margin-top: 24px;
}

.receipt-line span {
  color: var(--muted);
}

.stamp-row {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
  margin-top: 24px;
}

.stamp-row span {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px dashed rgba(29, 59, 51, 0.28);
  color: var(--muted);
  font-weight: 800;
  background: rgba(255, 255, 255, 0.52);
}

.stamp-row .is-filled {
  border-style: solid;
  color: #fffaf1;
  background: var(--primary);
}

.steps-section {
  padding: 96px 0 0;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 34px;
}

.steps-grid article {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 252, 246, 0.82);
  box-shadow: var(--shadow-soft);
}

.steps-grid article > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: 15px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 900;
}

.steps-grid h3 {
  margin: 0;
  letter-spacing: -0.03em;
  font-size: 1.18rem;
}

.steps-grid p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.dashboard-section {
  align-items: center;
}

.dashboard-card {
  padding: 24px;
  color: #fffaf1;
  background:
    radial-gradient(circle at top right, rgba(211, 177, 111, 0.28), transparent 18rem),
    linear-gradient(180deg, #284b40 0%, #162e27 100%);
  box-shadow: var(--shadow);
}

.dashboard-head {
  color: rgba(255, 250, 241, 0.84);
}

.dashboard-metric {
  display: grid;
  place-items: center;
  min-height: 178px;
  margin: 22px 0;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.dashboard-metric strong {
  font-size: 5rem;
  line-height: 0.9;
  letter-spacing: -0.08em;
}

.dashboard-metric span {
  margin-top: -24px;
  color: rgba(255, 250, 241, 0.76);
}

.dashboard-action,
.scan-log {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  background: rgba(255, 252, 246, 0.11);
}

.scan-log {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  color: rgba(255, 250, 241, 0.82);
}

.check-list {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 30px;
  color: var(--text);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 5px var(--success);
}

.language-section {
  align-items: center;
  padding: clamp(28px, 4vw, 44px);
  margin-top: 96px;
  background: rgba(255, 252, 246, 0.82);
}

.language-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.account-section {
  align-items: center;
}

.account-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px;
}

.avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 22px;
  color: #fffaf1;
  background: var(--primary);
  font-weight: 900;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-card > div:nth-child(2) {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.account-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-card span {
  color: var(--muted);
}

.account-card .ghost-button {
  margin-left: auto;
}

body[dir="rtl"] .account-card .ghost-button {
  margin-left: 0;
  margin-right: auto;
}

.cta-section {
  margin: 96px auto 0;
  padding: clamp(34px, 5vw, 58px);
  text-align: center;
  background:
    radial-gradient(circle at top, rgba(211, 177, 111, 0.18), transparent 22rem),
    rgba(255, 252, 246, 0.86);
}

.cta-section p {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.centered-actions {
  justify-content: center;
}

.install-button {
  margin-top: 16px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto;
  color: var(--muted);
  font-size: 0.94rem;
}

.auth-modal {
  width: min(95vw, 620px);
  padding: 0;
  border: 0;
  border-radius: 32px;
  background: transparent;
  color: var(--text);
}

.auth-modal::backdrop {
  background: rgba(16, 39, 32, 0.45);
  backdrop-filter: blur(10px);
}

.modal-shell {
  position: relative;
  display: grid;
  gap: 18px;
  margin: 0;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: 32px;
  background: var(--surface-solid);
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  right: 20px;
  top: 18px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
}

body[dir="rtl"] .modal-close {
  right: auto;
  left: 20px;
}

.modal-copy h2 {
  max-width: 500px;
  margin: 0;
  letter-spacing: -0.05em;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
}

.modal-copy p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.65;
}

.role-switch,
.mode-switch,
.social-actions,
.field-row {
  display: grid;
  gap: 10px;
}

.role-switch,
.mode-switch,
.social-actions {
  grid-template-columns: 1fr 1fr;
}

.role-button,
.mode-button {
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-weight: 780;
}

.role-button.is-active,
.mode-button.is-active {
  color: #fffaf1;
  background: var(--primary);
  border-color: var(--primary);
}

.social-actions {
  margin-top: 2px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.business-fields {
  display: grid;
  gap: 14px;
}

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

.form-field {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-weight: 700;
}

.form-field input,
.form-field select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--text);
  background: #fff;
  outline: none;
}

.form-field input:focus,
.form-field select:focus {
  border-color: rgba(29, 59, 51, 0.48);
  box-shadow: 0 0 0 4px rgba(29, 59, 51, 0.1);
}

.file-field input {
  padding: 11px 14px;
}

.file-field small {
  color: var(--muted);
  font-weight: 500;
}

.submit-button {
  width: 100%;
  margin-top: 4px;
}

.auth-message {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.auth-message.is-error {
  color: var(--danger);
}

.auth-message.is-success {
  color: var(--success);
}

[hidden] {
  display: none !important;
}

@media (max-width: 980px) {
  .site-header {
    align-items: stretch;
    border-radius: 26px;
    flex-wrap: wrap;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .header-actions {
    margin-left: auto;
  }

  body[dir="rtl"] .header-actions {
    margin-left: 0;
    margin-right: auto;
  }

  .hero,
  .role-section,
  .example-section,
  .dashboard-section,
  .language-section,
  .account-section {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 48px;
  }

  .app-preview {
    width: 100%;
  }

  .phone-shell {
    margin: 0 auto;
  }

  .stats-strip,
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .site-header,
  .section-shell,
  .stats-strip,
  .site-footer {
    width: min(100% - 24px, 1180px);
  }

  .site-header {
    margin-top: 10px;
    padding: 10px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .header-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .language-label select,
  .header-cta {
    width: 100%;
    max-width: none;
  }

  .hero-content h1 {
    font-size: clamp(2.7rem, 15vw, 4.8rem);
  }

  .hero-actions,
  .social-actions,
  .role-switch,
  .mode-switch,
  .field-row {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .centered-actions {
    display: grid;
  }

  .primary-button,
  .secondary-button,
  .install-button,
  .google-button,
  .anonymous-button {
    width: 100%;
  }

  .phone-shell {
    min-height: auto;
  }

  .stats-strip,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .role-section,
  .example-section,
  .dashboard-section,
  .account-section,
  .steps-section {
    padding-top: 64px;
  }

  .language-section,
  .cta-section {
    margin-top: 64px;
  }

  .stamp-row {
    grid-template-columns: repeat(5, 1fr);
  }

  .account-card {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .account-card .ghost-button {
    width: 100%;
    margin-left: 0;
  }

  .site-footer {
    display: grid;
  }
}
