/* ==========================================================================
   NanoKhata — Public homepage
   Same visual system as the app: neutral canvas, restrained teal, native type.
   ========================================================================== */

:root {
  /* Surfaces */
  --canvas: #f4f6f8;
  --surface: #ffffff;
  --subtle: #f2f5f7;
  --subtle-strong: #e9eef2;

  /* Borders */
  --hairline: #e5e9ee;
  --border: #d5dce3;
  --border-strong: #c3ccd6;

  /* Type */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-faint: #94a3b8;

  /* Brand */
  --primary: #368098;
  --primary-dark: #286579;
  --primary-darker: #163f4e;
  --primary-soft: #eaf3f6;
  --primary-border: #b3d7e2;

  /* Status */
  --green-soft: #ecfdf5;
  --green-border: #a7f3d0;
  --green-dark: #047857;
  --red-soft: #fef2f2;
  --red-border: #fecaca;
  --red-dark: #b91c1c;

  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Elevation */
  --shadow-subtle: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 2px 8px rgba(15, 23, 42, 0.03);
  --shadow-modal: 0 18px 45px -12px rgba(15, 23, 42, 0.25);

  /* Native stacks with Devanagari fallbacks — no web fonts */
  --font-stack: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", "Nirmala UI", "Mangal", "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font-stack);
}

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

html {
  font-family: var(--font-stack);
  background-color: var(--canvas);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  touch-action: pan-x pan-y;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  touch-action: pan-x pan-y;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

img,
svg {
  display: block;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

@media (max-width: 600px) {
  .container {
    padding: 0 16px;
  }
}

.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;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

#start,
#value,
#how,
#compare {
  scroll-margin-top: 84px;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.2) blur(8px);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--hairline);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-icon-home {
  height: 38px;
  width: auto;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

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

.nav-cta-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-lang {
  display: inline-flex;
  align-items: center;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface);
  overflow: hidden;
  flex-shrink: 0;
}

.nav-lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 100%;
  padding: 0 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-lang-btn + .nav-lang-btn {
  border-left: 1px solid var(--hairline);
}

.nav-lang-btn:hover {
  color: var(--text-primary);
  background: var(--subtle);
}

.nav-lang-btn.is-active {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

@media (min-width: 880px) {
  .nav-links {
    display: flex;
  }
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn-primary,
.btn-auth-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  background: var(--primary);
  color: #ffffff;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-primary:hover,
.btn-auth-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-primary:active,
.btn-auth-primary:active {
  background: var(--primary-darker);
  border-color: var(--primary-darker);
}

.btn-primary:disabled,
.btn-auth-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 18px;
  background: var(--surface);
  color: var(--primary-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-secondary:hover {
  background: var(--subtle);
  border-color: var(--border-strong);
}

.btn-nav-login {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-xs);
  transition: color 0.15s ease, background 0.15s ease;
}

.btn-nav-login:hover {
  color: var(--text-primary);
  background: var(--subtle);
}

.btn-nav-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  background: var(--primary);
  color: #ffffff;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.btn-nav-primary:hover {
  background: var(--primary-dark);
}

.btn-install-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 11px;
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
}

.btn-install-home:hover {
  background: var(--subtle);
}

.btn-install-home svg {
  width: 15px;
  height: 15px;
}

@media (max-width: 520px) {
  .nav-cta-wrap {
    gap: 4px;
  }

  .btn-nav-login {
    display: none;
  }


  .btn-install-home {
    padding: 0 10px;
  }

  .btn-install-label {
    display: none;
  }
}

@media (max-width: 480px) {
  .brand-icon-home {
    height: 32px;
  }

  .nav-row {
    gap: 10px;
    height: 58px;
  }

  .btn-nav-login {
    padding: 0 8px;
    font-size: 0.84rem;
  }

  .btn-nav-primary {
    padding: 0 12px;
    font-size: 0.82rem;
  }
}

@media (min-width: 769px) {
  .btn-install-home {
    display: none !important;
  }
}

@media all and (display-mode: standalone), (display-mode: minimal-ui), (display-mode: fullscreen) {
  .btn-install-home {
    display: none !important;
  }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero-section {
  padding: 56px 0 64px;
  border-bottom: 1px solid var(--hairline);
  background: var(--surface);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

.hero-left,
.hero-right {
  min-width: 0;
}

@media (min-width: 992px) {
  .hero-section {
    padding: 72px 0 80px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.85fr);
    gap: 64px;
    align-items: center;
  }

  /* Center the text column against the phone screen only, not the caption below it */
  .hero-right {
    position: relative;
  }

  .app-preview-caption {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 14px;
  }

  .hero-section {
    padding-bottom: 168px;
  }
}

.hero-left {
  max-width: 620px;
}

.hero-headline {
  font-size: clamp(1.95rem, 3.6vw, 2.8rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin-bottom: 20px;
  text-wrap: balance;
}

.hero-headline .accent {
  color: var(--primary-dark);
}

.hero-sub {
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 34rem;
}

/* Start form */
.start-form {
  margin-top: 30px;
  max-width: 480px;
}

.start-form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.start-input-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.start-phone-group {
  display: flex;
  align-items: stretch;
  flex: 1;
  min-width: 0;
  height: 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.start-phone-group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(54, 128, 152, 0.12);
}

.start-prefix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: var(--subtle);
  border-right: 1px solid var(--hairline);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  flex-shrink: 0;
  user-select: none;
}

.start-phone-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  padding: 0 12px;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

.start-phone-input::placeholder {
  color: var(--text-faint);
  letter-spacing: 0.02em;
  font-weight: 400;
}

.btn-start {
  height: 48px;
  padding: 0 20px;
  flex-shrink: 0;
}

.start-form-note {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text-faint);
  line-height: 1.5;
}

/* App preview */
.hero-right {
  display: flex;
  justify-content: center;
}

.app-preview {
  width: 100%;
  max-width: 380px;
  margin: 0;
}

.app-preview-frame {
  display: flex;
  justify-content: center;
  padding: 26px;
  background: var(--subtle);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
}

.phone-chassis {
  position: relative;
  width: 100%;
  max-width: 288px;
  padding: 9px;
  background: #111827;
  border-radius: 30px;
  box-shadow: 0 12px 28px -14px rgba(15, 23, 42, 0.5);
}

.phone-notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  height: 17px;
  width: 74px;
  padding: 0 10px;
  background: #0b1220;
  border-radius: var(--radius-full);
  z-index: 2;
}

.phone-speaker-slit {
  flex: 1;
  height: 3px;
  background: #334155;
  border-radius: var(--radius-full);
}

.phone-camera-lens {
  width: 5px;
  height: 5px;
  background: #1e293b;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px #0f172a;
}

.phone-screen {
  position: relative;
  border-radius: 23px;
  overflow: hidden;
  background: #0f172a;
}

.phone-track {
  display: flex;
  align-items: flex-start;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  touch-action: pan-y;
}

.phone-slide {
  flex: 0 0 100%;
  min-width: 0;
}

.phone-screen-img {
  width: 100%;
  height: auto;
  display: block;
}

.app-preview-caption {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
}

.preview-copy {
  min-width: 0;
}

.preview-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.preview-sub {
  margin-top: 3px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.preview-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.preview-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-muted);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.preview-arrow:hover {
  color: var(--primary-dark);
  border-color: var(--primary-border);
  background: var(--primary-soft);
}

.preview-arrow svg {
  width: 14px;
  height: 14px;
}

.preview-dots {
  display: flex;
  align-items: center;
  gap: 2px;
}

.preview-dot {
  position: relative;
  width: 18px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
}

.preview-dot::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: #cbd5e1;
  transition: width 0.2s ease, background 0.2s ease;
}

.preview-dot:hover::before {
  background: var(--primary-border);
}

.preview-dot.is-active::before {
  width: 16px;
  background: var(--primary);
}

@media (max-width: 992px) {
  .app-preview {
    max-width: 340px;
  }
}

@media (max-width: 600px) {
  .hero-left {
    max-width: none;
  }

  .start-form {
    max-width: none;
  }

  .start-input-row {
    flex-direction: column;
  }

  .btn-start {
    width: 100%;
  }

  .app-preview {
    max-width: 300px;
  }

  .app-preview-frame {
    padding: 18px;
  }

  .app-preview-caption {
    gap: 10px;
  }
}

/* ==========================================================================
   SECTIONS (shared)
   ========================================================================== */
.section-value,
.section-how,
.section-compare {
  padding: 72px 0;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 40px;
  text-align: center;
}

.section-tag {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--primary-dark);
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.28;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 0.96rem;
  line-height: 1.65;
  color: var(--text-muted);
}

/* ==========================================================================
   VALUE
   ========================================================================== */
.section-value {
  padding-bottom: 64px;
}

.value-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .value-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

.value-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-subtle);
  transition: border-color 0.15s ease;
}

.value-card:hover {
  border-color: var(--border);
}

.value-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--primary-soft);
  border-radius: var(--radius-sm);
  color: var(--primary-dark);
  margin-bottom: 16px;
}

.value-icon svg {
  width: 19px;
  height: 19px;
}

.value-card h3 {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.value-card p {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.value-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 16px;
}

.hint-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  background: var(--subtle);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.hint-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

.hint-dot-amber {
  background: #d97706;
}

.hint-dot-slate {
  background: var(--text-faint);
}

/* Included list */
.included-card {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 28px;
}

.included-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.included-head h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.included-head p {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.included-badge {
  flex-shrink: 0;
  padding: 4px 10px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-xs);
  color: var(--primary-dark);
  font-size: 0.72rem;
  font-weight: 600;
}

.included-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px 24px;
  margin: 22px 0 20px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
}

@media (min-width: 600px) {
  .included-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .included-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.included-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.included-list svg {
  width: 15px;
  height: 15px;
  color: var(--primary);
  flex-shrink: 0;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--primary-dark);
}

.text-link:hover {
  color: var(--primary-darker);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-link svg {
  width: 15px;
  height: 15px;
}

/* ==========================================================================
   HOW IT WORKS
   ========================================================================== */
.section-how {
  background: var(--surface);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 64px 0;
}

.steps-grid {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 980px;
  margin: 0 auto;
}

@media (min-width: 760px) {
  .steps-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 24px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-bottom: 14px;
  border: 1px solid var(--primary-border);
  border-radius: 50%;
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--surface);
}

.step-card h3 {
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.4;
}

.step-card p {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   COMPARISON
   ========================================================================== */
.section-compare {
  padding-top: 64px;
  padding-bottom: 24px;
}

.compare-wrap {
  max-width: 880px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.compare-table th,
.compare-table td {
  padding: 14px 20px;
  text-align: left;
  vertical-align: top;
}

.compare-table thead th {
  background: var(--subtle);
  border-bottom: 1px solid var(--hairline);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.compare-table thead th.col-nano {
  color: var(--primary-dark);
  font-weight: 700;
}

.compare-table tbody th {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.86rem;
  width: 31%;
}

.compare-table tbody td {
  color: var(--text-muted);
  border-top: 1px solid var(--hairline);
}

.compare-table tbody th {
  border-top: 1px solid var(--hairline);
}

.compare-table tbody tr:first-child th,
.compare-table tbody tr:first-child td {
  border-top: none;
}

.compare-table .col-nano {
  background: #f7fbfc;
  color: var(--text-primary);
  border-left: 1px solid var(--hairline);
}

.compare-table thead .col-nano {
  background: var(--primary-soft);
}

@media (max-width: 600px) {
  .compare-table {
    font-size: 0.8rem;
  }

  .compare-table th,
  .compare-table td {
    padding: 11px 12px;
  }

  .compare-table tbody th {
    width: 36%;
    font-size: 0.78rem;
  }
}

/* ==========================================================================
   FINAL CTA
   ========================================================================== */
.section-cta {
  padding: 24px 0 72px;
}

.cta-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 32px;
  background: #f7fbfc;
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-lg);
}

@media (min-width: 860px) {
  .cta-card {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 40px;
    padding: 36px 40px;
  }
}

.cta-copy h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  margin-bottom: 8px;
}

.cta-copy p {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 46ch;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 859px) {
  .cta-actions {
    flex-direction: column;
  }

  .cta-actions .btn-primary,
  .cta-actions .btn-secondary {
    width: 100%;
  }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  margin-top: auto;
  background: var(--surface);
  border-top: 1px solid var(--hairline);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 760px) {
  .footer-inner {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
  }
}

.footer-logo {
  height: 28px;
  width: auto;
  margin-bottom: 8px;
}

.footer-brand p {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 30ch;
  line-height: 1.55;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (min-width: 760px) {
  .footer-meta {
    align-items: flex-end;
  }
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
}

.footer-link {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: var(--primary-dark);
}

.footer-copy {
  font-size: 0.76rem;
  color: var(--text-faint);
}

/* ==========================================================================
   AUTH MODAL
   ========================================================================== */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.5);
  animation: homeFadeIn 0.16s ease-out;
}

.auth-modal-card {
  position: relative;
  width: 100%;
  max-width: 410px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  animation: homeSlideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.auth-modal-close:hover {
  background: var(--subtle);
  color: var(--text-primary);
}

.auth-modal-close svg {
  width: 16px;
  height: 16px;
}

.auth-modal-header {
  text-align: center;
  margin-bottom: 20px;
  padding: 0 12px;
}

.auth-icon-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  background: var(--subtle);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.auth-icon-badge svg {
  width: 20px;
  height: 20px;
}

.auth-step-pill {
  display: inline-block;
  padding: 3px 9px;
  margin-bottom: 8px;
  background: var(--primary-soft);
  border-radius: var(--radius-xs);
  color: var(--primary-dark);
  font-size: 0.7rem;
  font-weight: 600;
}

.auth-modal-title {
  font-size: 1.18rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.auth-modal-subtitle {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.auth-strong {
  font-weight: 600;
  color: var(--text-primary);
}

.auth-error-banner {
  margin-bottom: 14px;
  padding: 9px 12px;
  background: var(--red-soft);
  border: 1px solid var(--red-border);
  border-radius: var(--radius-sm);
  color: var(--red-dark);
  font-size: 0.82rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.45;
}

.auth-otp-input-wrap {
  display: flex;
  justify-content: center;
  margin: 18px 0;
}

.auth-otp-input {
  width: 100%;
  max-width: 240px;
  height: 52px;
  padding: 0 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.45em;
  color: var(--text-primary);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-otp-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(54, 128, 152, 0.12);
}

.btn-auth-primary {
  width: 100%;
  height: 46px;
}

.auth-resend-row {
  margin-top: 14px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-link-resend {
  background: none;
  border: none;
  padding: 0;
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-form-field {
  margin-bottom: 14px;
  text-align: left;
}

.auth-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.auth-text-input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-text-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(54, 128, 152, 0.12);
}

.auth-lang-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.auth-lang-option {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.auth-lang-option:hover {
  background: var(--subtle);
}

.auth-lang-option.active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-dark);
  font-weight: 600;
}

.auth-same-otp {
  margin-bottom: 14px;
  padding: 10px 12px;
  background: var(--green-soft);
  border: 1px solid var(--green-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.auth-same-otp-label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 0.84rem;
  font-weight: 500;
  color: #14532d;
  line-height: 1.45;
  cursor: pointer;
}

.auth-same-otp-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.auth-phone-input-group {
  display: flex;
  align-items: stretch;
  height: 46px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-phone-input-group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(54, 128, 152, 0.12);
}

.auth-phone-prefix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: var(--subtle);
  border-right: 1px solid var(--hairline);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  user-select: none;
}

.auth-phone-input-field {
  flex: 1;
  min-width: 0;
  padding: 0 12px;
  border: none;
  outline: none;
  background: transparent;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

.otp-code {
  letter-spacing: 2px;
}

.btn-link-edit-phone {
  display: inline-block;
  margin-left: 4px;
  padding: 0;
  background: none;
  border: none;
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@keyframes homeFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes homeSlideUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Prevent iOS auto-zoom on focus */
@media (max-width: 768px) {
  .start-phone-input,
  .auth-text-input,
  .auth-otp-input,
  .auth-phone-input-field {
    font-size: 16px;
    height: 46px;
  }
}

/* ==========================================================================
   MOTION PREFERENCES
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ==========================================================================
   NANO AI section
   ========================================================================== */
.section-ai {
  padding: 72px 0;
  background: var(--surface);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.ai-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}
@media (min-width: 880px) {
  .ai-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 56px; }
}
.ai-copy .section-title,
.ai-copy .section-desc { text-align: left; }
.ai-copy .section-desc { max-width: 520px; }

.ai-points {
  list-style: none;
  display: grid;
  gap: 16px;
  margin: 26px 0 0;
}
.ai-points li { display: flex; gap: 12px; align-items: flex-start; }
.ai-points strong { display: block; font-size: 0.95rem; color: var(--text-primary); margin-bottom: 2px; }
.ai-points li span:not(.ai-point-icon) { font-size: 0.88rem; color: var(--text-muted); line-height: 1.55; }
.ai-point-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  color: var(--primary-dark);
  flex-shrink: 0;
}
.ai-point-icon svg { width: 17px; height: 17px; }

/* Demo chat, styled like the in-app Ask Nano panel */
.ai-demo {
  width: 100%;
  max-width: 400px;
  justify-self: center;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--canvas);
  box-shadow: 0 18px 45px -18px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}
.ai-demo-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--hairline);
}
.ai-demo-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.85rem;
}
.ai-demo-name { display: flex; flex-direction: column; line-height: 1.25; }
.ai-demo-name strong { font-size: 0.88rem; }
.ai-demo-status { font-size: 0.7rem; color: var(--green-dark); font-weight: 600; }
.ai-demo-status::before { content: "● "; }

.ai-demo-body { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.demo-msg {
  max-width: 88%;
  padding: 9px 12px;
  border-radius: 15px;
  font-size: 0.84rem;
  line-height: 1.5;
}
.demo-user {
  align-self: flex-end;
  background: var(--primary);
  color: #ffffff;
  border-bottom-right-radius: 5px;
}
.demo-bot {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-bottom-left-radius: 5px;
}
.demo-bot strong { color: var(--primary-dark); }
.demo-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.demo-chip {
  padding: 5px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--primary-border);
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.74rem;
  font-weight: 700;
}
.demo-chip.is-chosen { background: var(--primary); border-color: var(--primary); color: #ffffff; }

.demo-card {
  align-self: flex-start;
  width: 88%;
  padding: 11px 12px;
  border-radius: 15px;
  border-bottom-left-radius: 5px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-left: 3px solid #d97706;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.demo-card-title { font-weight: 800; font-size: 0.86rem; margin-bottom: 2px; }
.demo-row { display: flex; justify-content: space-between; gap: 10px; font-size: 0.8rem; }
.demo-row span { color: var(--text-secondary); }
.demo-actions { display: flex; gap: 8px; margin-top: 6px; }
.demo-btn {
  flex: 1;
  text-align: center;
  padding: 8px 10px;
  border-radius: 10px;
  background: #d97706;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
}
.demo-btn-ghost {
  flex: 0 0 auto;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--hairline);
}

@media (max-width: 600px) {
  .section-ai { padding: 52px 0; }
}

/* Note shown when an OTP login replaces the PIN */
.auth-pin-note {
  margin: 0 0 14px;
  padding: 9px 12px;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  background: #fffbeb;
  color: #92400e;
  font-size: 0.84rem;
  line-height: 1.45;
  text-align: left;
}
