/* ─────────────────────────────────────────────────────────────────────────────
   Forge — Marketing Landing Page
   pages/landing.html
───────────────────────────────────────────────────────────────────────────── */

html, body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--dark);
  color: var(--text);
  font-family: var(--font-body);
  scroll-behavior: smooth;
}

.landing { position: relative; overflow-x: hidden; }

/* Text for screen readers only (landing doesn't load css/components.css). */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ── Background glow (same treatment as auth pages) ──────────────────────── */
.lnd-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.lnd-glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.3; }
.lnd-glow--1 {
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(200,150,62,0.4), transparent 70%);
  top: -160px; right: -180px;
}
.lnd-glow--2 {
  width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(232,184,109,0.16), transparent 70%);
  bottom: 5%; left: -200px;
}
@media (prefers-reduced-motion: no-preference) {
  .lnd-glow--1 { animation: lndGlowDrift 14s ease-in-out infinite alternate; }
  .lnd-glow--2 { animation: lndGlowDrift 18s ease-in-out infinite alternate-reverse; }
}
@keyframes lndGlowDrift {
  from { transform: translate(0, 0); }
  to   { transform: translate(30px, 24px); }
}
.lnd-sparks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.lnd-grain {
  position: absolute;
  inset: -10%;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Nav ──────────────────────────────────────────────────────────────────── */
.lnd-nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px clamp(24px, 5vw, 72px);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(14,14,15,0.6);
  border-bottom: 0.5px solid var(--border);
}
.lnd-logo { display: flex; align-items: center; gap: clamp(8px, 2vw, 14px); font-family: var(--font-display); font-size: clamp(22px, 5vw, 38px); letter-spacing: 2px; }
.lnd-logo img { width: clamp(68px, 9vw, 88px); height: clamp(68px, 9vw, 88px); }

.lnd-nav-actions { position: relative; display: flex; align-items: center; gap: clamp(8px, 2vw, 14px); }

.lnd-nav-cta {
  padding: clamp(10px, 2vw, 16px) clamp(18px, 4vw, 34px); border-radius: 8px;
  border: 0.5px solid var(--border);
  color: var(--text);
  font-family: var(--font-condensed); font-size: clamp(13px, 2vw, 16px); font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, transform 0.25s var(--ease-precise);
}
.lnd-nav-cta:hover { border-color: var(--gold-border); background: var(--gold-dim); transform: translateY(-2px); }

/* ── Hamburger + nav menu ─────────────────────────────────────────────────── */
.lnd-hamburger {
  width: clamp(36px, 8vw, 44px); height: clamp(36px, 8vw, 44px); border-radius: 8px;
  border: 0.5px solid var(--border); background: transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  transition: border-color 0.2s, background 0.2s;
}
.lnd-hamburger:hover { border-color: var(--gold-border); background: var(--gold-dim); }
.lnd-hamburger span {
  display: block; width: 20px; height: 2px; background: var(--text);
  transition: transform 0.3s var(--ease-precise), opacity 0.2s;
}
.lnd-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.lnd-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.lnd-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.lnd-nav-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 5;
  min-width: 220px;
  background: var(--card-raised); border: 0.5px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  padding: 8px;
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity 0.2s var(--ease-precise), transform 0.2s var(--ease-precise);
}
.lnd-nav-menu.is-open { opacity: 1; transform: none; pointer-events: auto; }
.lnd-nav-menu a {
  display: block; padding: 12px 14px; border-radius: 8px;
  color: var(--text); font-family: var(--font-condensed); font-size: 14px; letter-spacing: 0.5px; text-transform: uppercase;
  text-decoration: none; transition: background 0.2s, color 0.2s;
}
.lnd-nav-menu a:hover { background: var(--gold-dim); color: var(--gold); }
@media (prefers-reduced-motion: reduce) {
  .lnd-hamburger span { transition: none; }
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.lnd-hero { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; padding: clamp(72px, 13vw, 140px) 24px 64px; text-align: center; }
.lnd-h1 {
  font-family: var(--font-display); font-size: clamp(56px, 10vw, 96px); line-height: 0.95; letter-spacing: 1px;
  text-wrap: balance; margin-bottom: 28px;
}
.lnd-h1 span { color: var(--gold); }
.lnd-sub {
  font-size: clamp(18px, 2.6vw, 24px); color: var(--muted); line-height: 1.65;
  max-width: 640px; margin: 0 auto 42px; text-wrap: pretty;
}
.lnd-cta-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.lnd-btn-primary, .lnd-btn-secondary {
  padding: 22px 44px; border-radius: 8px;
  font-family: var(--font-condensed); font-size: 18px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
  transition: transform 0.3s var(--ease-precise), opacity 0.2s, background 0.2s, border-color 0.2s;
}
.lnd-btn-primary { background: var(--gold); color: #0E0E0F; }
.lnd-btn-primary:hover { transform: translateY(-4px); opacity: 0.92; }
.lnd-btn-primary:active { transform: scale(0.98); }
.lnd-btn-secondary { border: 0.5px solid var(--border); color: var(--text); }
.lnd-btn-secondary:hover { border-color: rgba(255,255,255,0.2); transform: translateY(-4px); }

/* ── Phone showcase ───────────────────────────────────────────────────────── */
.lnd-showcase { position: relative; z-index: 1; padding: 20px 20px 0; display: flex; flex-direction: column; align-items: center; }

.lnd-stage {
  position: relative;
  width: 100%; max-width: 1240px;
  height: clamp(640px, 90vw, 960px);
  touch-action: pan-y;
  cursor: grab;
  -webkit-user-select: none; user-select: none;
  outline: none;
}
.lnd-stage:active { cursor: grabbing; }
.lnd-stage:focus-visible { box-shadow: var(--shadow-focus); border-radius: 20px; }

.lnd-phone-canvas {
  display: block;
  width: 100%; height: 100%;
  touch-action: pan-y;
}

.lnd-phone-label {
  margin-top: 18px; text-align: center;
  font-family: var(--font-condensed); font-size: clamp(20px, 2.4vw, 28px); letter-spacing: 1px; text-transform: uppercase;
  color: var(--muted);
  transition: opacity 0.25s;
}

.lnd-hint {
  margin-top: 22px; font-size: 15px; color: var(--muted);
  display: flex; align-items: center; gap: 8px;
  transition: opacity 0.4s;
}
.lnd-hint svg { width: 17px; height: 17px; }
.lnd-hint.is-hidden { opacity: 0; }

/* ── Features ─────────────────────────────────────────────────────────────── */
.lnd-features {
  position: relative; z-index: 1; max-width: 1360px; margin: 160px auto 0; padding: 0 24px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.lnd-feature {
  padding: 40px; border-radius: 16px;
  background: var(--card); border: 0.5px solid var(--border);
  transition: border-color 0.25s, transform 0.3s var(--ease-precise);
}
.lnd-feature:hover { border-color: var(--gold-border); transform: translateY(-4px); }

/* First feature reads as a lead banner, not just a stretched identical
   card — full-width span alone left it sparse (short copy, lots of empty
   space), so it gets its own horizontal layout instead of the 3-up grid. */
.lnd-feature:first-child { grid-column: span 3; }
@media (min-width: 721px) {
  .lnd-feature:first-child { display: flex; align-items: center; gap: 32px; text-align: left; }
  .lnd-feature:first-child .lnd-feature-icon { margin-bottom: 0; flex-shrink: 0; }
  .lnd-feature:first-child h3 { flex-shrink: 0; width: 260px; margin-bottom: 0; }
  .lnd-feature:first-child p { max-width: none; }
}
.lnd-feature-icon {
  width: 68px; height: 68px; margin-bottom: 20px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
}
.lnd-feature-icon svg { width: 44px; height: 44px; }
.lnd-feature h3 { font-family: var(--font-condensed); font-size: 24px; font-weight: 700; margin-bottom: 12px; }
.lnd-feature p { color: var(--muted); font-size: 17px; line-height: 1.65; max-width: 46ch; }

@media (max-width: 720px) {
  .lnd-features { grid-template-columns: 1fr; }
  .lnd-feature:first-child { grid-column: span 1; }
}

/* ── Pricing ──────────────────────────────────────────────────────────────── */
.lnd-pricing { position: relative; z-index: 1; max-width: 1120px; margin: 160px auto 0; padding: 0 24px; }
.lnd-pricing-head { text-align: center; margin-bottom: 52px; }
.lnd-pricing-head h2 { font-family: var(--font-display); font-size: clamp(40px, 6.5vw, 56px); letter-spacing: 1px; margin-bottom: 14px; }
.lnd-pricing-head p { color: var(--muted); font-size: 17px; }

.lnd-pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.lnd-price-card {
  position: relative;
  padding: 44px 38px; border-radius: 16px;
  background: var(--card); border: 0.5px solid var(--border);
  display: flex; flex-direction: column;
}
.lnd-price-card--pro { background: var(--card-raised); border-color: var(--gold-border); box-shadow: var(--shadow-molten); }
.lnd-price-badge {
  position: absolute; top: -13px; right: 26px;
  background: var(--gold); color: #0E0E0F;
  font-family: var(--font-condensed); font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  padding: 6px 13px; border-radius: 20px;
}
.lnd-price-tier { font-family: var(--font-condensed); font-size: 15px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.lnd-price-amount { font-family: var(--font-display); font-size: 58px; letter-spacing: 0.5px; margin-bottom: 8px; }
.lnd-price-amount span { font-size: 16px; color: var(--muted); font-family: var(--font-body); letter-spacing: normal; }
.lnd-price-note { font-size: 14px; color: var(--muted); margin-bottom: 26px; min-height: 16px; }
.lnd-price-list { list-style: none; display: flex; flex-direction: column; gap: 13px; margin-bottom: 30px; flex: 1; }
.lnd-price-list li { font-size: 16px; color: var(--text); display: flex; gap: 10px; align-items: flex-start; line-height: 1.4; }
.lnd-price-list li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); margin-top: 7px; flex-shrink: 0; }

@media (max-width: 640px) { .lnd-pricing-grid { grid-template-columns: 1fr; } }

/* ── Contact / Feedback ───────────────────────────────────────────────────── */
.lnd-contact { position: relative; z-index: 1; max-width: 640px; margin: 160px auto 0; padding: 0 24px; }
.lnd-contact-head { text-align: center; margin-bottom: 40px; }
.lnd-contact-head h2 { font-family: var(--font-display); font-size: clamp(34px, 5.5vw, 48px); letter-spacing: 1px; margin-bottom: 12px; }
.lnd-contact-head p { color: var(--muted); font-size: 16px; }

.lnd-contact-form { display: flex; flex-direction: column; gap: 20px; }
.lnd-field { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.lnd-field label {
  font-family: var(--font-condensed); font-size: 13px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--muted);
}
.lnd-field input, .lnd-field textarea {
  padding: 14px 16px; border-radius: 8px;
  background: var(--card); border: 1px solid var(--input-border); color: var(--text);
  font-family: var(--font-body); font-size: 15px;
  transition: border-color 0.2s;
  resize: vertical;
}
.lnd-field input:focus, .lnd-field textarea:focus { outline: none; border-color: var(--gold-border); box-shadow: var(--shadow-focus); }
.lnd-contact-form .lnd-btn-primary { align-self: center; border: none; cursor: pointer; margin-top: 4px; }
.lnd-contact-form .lnd-btn-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.lnd-contact-status { text-align: center; font-size: 14px; min-height: 20px; color: var(--muted); }
.lnd-contact-status.is-error { color: var(--red-text); }
.lnd-contact-status.is-success { color: var(--green); }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.lnd-footer-close { text-align: center; padding: 0 24px 76px; }
.lnd-footer-mark {
  font-family: var(--font-display); font-size: clamp(44px, 8.5vw, 80px); letter-spacing: 2px;
  margin-bottom: 20px;
}
.lnd-footer-mark span { color: var(--gold); }
.lnd-footer-close p { color: var(--muted); font-size: 18px; margin-bottom: 32px; }

.lnd-footer { position: relative; z-index: 1; margin-top: 84px; padding: 0 24px 60px; text-align: center; }
.lnd-footer-links {
  display: flex; gap: 22px; justify-content: center; flex-wrap: wrap;
  padding-top: 32px; margin-bottom: 14px; border-top: 0.5px solid var(--border);
}
.lnd-footer-links a { color: var(--muted); font-size: 14px; text-decoration: none; transition: color 0.2s; }
.lnd-footer-links a:hover { color: var(--gold); }
.lnd-footer-copy { font-size: 13px; color: var(--muted); }

/* ── Scroll reveal ────────────────────────────────────────────────────────── */
.lnd-reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease-precise), transform 0.7s var(--ease-precise); }
.lnd-reveal.is-visible { opacity: 1; transform: none; }

/* ── Install modal (iOS "Add to Home Screen" instructions) ──────────────────── */
.lnd-install-modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0,0,0,0.6);
  opacity: 0; transition: opacity 0.2s;
}
/* `display: flex` above beats the UA [hidden]{display:none} rule (same
   specificity, author sheet wins) — restore hiding while `hidden` is set. */
.lnd-install-modal[hidden] { display: none; }
.lnd-install-modal.is-open { opacity: 1; }
.lnd-install-card {
  position: relative;
  width: 100%; max-width: 400px;
  padding: 28px 24px calc(28px + env(safe-area-inset-bottom));
  border-radius: 20px 20px 0 0;
  background: var(--card-raised);
  border: 0.5px solid var(--border);
  border-bottom: none;
  text-align: center;
  transform: translateY(16px);
  transition: transform 0.25s var(--ease-precise);
}
.lnd-install-modal.is-open .lnd-install-card { transform: translateY(0); }
@media (min-width: 640px) {
  .lnd-install-modal { align-items: center; }
  .lnd-install-card { border-radius: 20px; border-bottom: 0.5px solid var(--border); margin-bottom: 40px; }
}
.lnd-install-icon { width: 56px; height: 56px; border-radius: 12px; margin-bottom: 14px; }
.lnd-install-card h2 { font-family: var(--font-display); font-size: 22px; letter-spacing: 0.5px; margin-bottom: 16px; }
.lnd-install-card ol { text-align: left; display: flex; flex-direction: column; gap: 12px; list-style: none; counter-reset: step; }
.lnd-install-card li { counter-increment: step; font-size: 14px; color: var(--muted); line-height: 1.5; display: flex; gap: 12px; align-items: flex-start; }
.lnd-install-card li::before {
  content: counter(step); flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--gold-dim); color: var(--gold);
  font-family: var(--font-condensed); font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.lnd-install-card strong { color: var(--text); font-weight: 600; }
.lnd-install-card .fi-share-icon { display: inline-flex; vertical-align: middle; margin: 0 2px; color: var(--gold); }
.lnd-install-card .fi-share-icon svg { width: 16px; height: 16px; }
.lnd-install-card .fi-lead { font-size: 14px; color: var(--text); line-height: 1.5; margin-bottom: 14px; }
.lnd-install-card .fi-note { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 12px 0 0; }
.lnd-install-card .fi-qr { width: 168px; margin: 0 auto; padding: 8px; background: #fff; border-radius: 12px; }
.lnd-install-card .fi-qr svg { display: block; width: 100%; height: auto; }
.lnd-install-card .fi-divider { display: flex; align-items: center; gap: 10px; margin: 20px 0 14px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.lnd-install-card .fi-divider::before,
.lnd-install-card .fi-divider::after { content: ''; flex: 1; height: 0.5px; background: var(--border); }
.lnd-install-close {
  position: absolute; top: 14px; right: 14px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.06); border: none; color: var(--muted);
  font-size: 18px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.lnd-install-close:hover { background: rgba(255,255,255,0.12); color: var(--text); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .lnd-nav { padding: 16px 18px; }
  .lnd-price-card { padding: 34px 24px; }
}

/* ── Carousel buttons, motion switch, contact notice (IMP-15) ─────────────── */
.lnd-carousel-controls { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 18px; }
.lnd-carousel-controls .lnd-phone-label { margin-top: 0; min-width: 8ch; }
.lnd-carousel-btn {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 0.5px solid var(--gold-border); background: transparent; color: var(--text); transition: color 0.2s, border-color 0.2s;
}
.lnd-carousel-btn svg { width: 20px; height: 20px; }
.lnd-carousel-btn:hover { color: var(--gold); border-color: var(--gold); }
.lnd-motion-toggle {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--muted); font: inherit; font-size: 14px; text-decoration: underline;
}
.lnd-motion-toggle:hover { color: var(--gold); }
.lnd-contact-notice { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.lnd-contact-notice a { color: var(--gold-light); }
.lnd-contact-form [aria-invalid="true"] { border-color: var(--red, #E05252); }
.lnd-motion-off .lnd-glow--1, .lnd-motion-off .lnd-glow--2 { animation: none; }
.lnd-carousel-btn:focus-visible, .lnd-motion-toggle:focus-visible, .lnd-contact-notice a:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: 6px; }
.lnd-carousel-btn:focus-visible { border-radius: 50%; }
