/* ============================================================
   ARENDA VILLAS — Design System
   Archetype: Vivid Pop (light) | Surface: Tonal Layers | Shape: Soft
   Palette: Cobalt Paper | Font: Archivo + Figtree
   Layout: Side Rail | Hero: Object Stack
   ============================================================ */

/* --- Tokens ------------------------------------------------ */
:root {
  /* Tonal layers (cool blue-tinted whites) */
  --bg:         #EDF1F7;
  --bg-2:       #E2E9F2;
  --bg-3:       #D4DEE9;
  --surface:    #F5F8FC;
  --surface-2:  #ECF1F8;

  /* Text — deep ink navy */
  --text:       #0B1A2F;
  --text-2:     #2D4259;
  --text-3:     #6A7F98;

  /* Cobalt accent */
  --accent:       #2563EB;
  --accent-hover: #1D4ED8;
  --accent-light: #DBEAFE;
  --accent-tint:  #EFF6FF;

  /* Pop — punchy tangerine */
  --pop:       #F97316;
  --pop-light: #FED7AA;
  --pop-tint:  #FFF7ED;

  /* Whisper shadows (tonal-layers: no borders, subtle shadow) */
  --shadow-sm: 0 2px 8px rgba(11, 26, 47, 0.04);
  --shadow-md: 0 4px 16px rgba(11, 26, 47, 0.06);
  --shadow-lg: 0 8px 32px rgba(11, 26, 47, 0.08);

  /* Status */
  --error:   #DC2626;
  --success: #16A34A;

  /* Type */
  --display: 'Archivo', system-ui, sans-serif;
  --body:    'Figtree', system-ui, sans-serif;

  /* Geometry */
  --r-sm:  8px;
  --r-md:  10px;
  --r-lg:  14px;
  --rail-w: 240px;
  --maxw:  1100px;

  /* Motion */
  --ease:        cubic-bezier(.22, 1, .36, 1);
  --ease-out:    cubic-bezier(.23, 1, .32, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* --- Reset ------------------------------------------------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul, ol { list-style: none; }

/* --- Inline SVG icon guard --------------------------------- */
li > svg, p > svg, a > svg, button > svg, span > svg,
td > svg, label > svg, h1 > svg, h2 > svg, h3 > svg, h4 > svg {
  width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.15em;
}

/* --- Scroll progress bar ----------------------------------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; z-index: 200;
  background: linear-gradient(90deg, var(--accent), var(--pop));
  transform-origin: left;
  transform: scaleX(0);
  width: 100%;
  transition: none;
  pointer-events: none;
}

/* --- Typography -------------------------------------------- */
h1, h2, h3, h4, h5 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.08;
  color: var(--text);
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 5.5vw, 4.2rem); font-weight: 900; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.9rem, 3.8vw, 3rem); letter-spacing: -0.025em; }
h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); letter-spacing: -0.02em; }
h4 { font-size: 1.1rem; font-weight: 700; }
p  { text-wrap: pretty; max-width: 68ch; }
.text-muted  { color: var(--text-3); }
.text-2      { color: var(--text-2); }
.accent-text { color: var(--accent); }

/* Label / eyebrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: '';
  width: 24px; height: 3px;
  background: var(--pop);
  border-radius: 2px;
  flex: none;
}

/* --- Layout ------------------------------------------------ */
.main-content { margin-left: var(--rail-w); min-height: 100vh; }
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 32px;
}
section { padding-block: 96px; position: relative; }
.section-alt  { background: var(--surface); }
.section-deep { background: var(--bg-2); }

/* --- Side Rail Navigation (desktop) ------------------------ */
.rail {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  z-index: 100;
  transition: box-shadow 0.3s var(--ease);
}
.rail.scrolled {
  box-shadow: var(--shadow-md);
}
.rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.rail-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: -0.02em;
  transition: opacity 0.2s var(--ease);
}
.rail-logo:hover { opacity: 0.75; }
.rail-logo svg { width: 30px; height: 30px; flex: none; }
.rail-links {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 48px;
}
.rail-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-2);
  border-radius: var(--r-sm);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.rail-links a:hover {
  color: var(--accent);
  background: var(--accent-tint);
}
.rail-links a.active {
  color: var(--accent);
  background: var(--accent-tint);
  font-weight: 600;
}
.rail-cta {
  margin-top: auto;
  width: 100%;
  justify-content: center;
}

/* Hamburger toggle (hidden on desktop) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  padding: 6px;
  border-radius: var(--r-sm);
  transition: background 0.2s;
}
.nav-toggle:hover { background: var(--accent-tint); }
.nav-toggle span {
  display: block;
  width: 100%; height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.3s var(--ease), opacity 0.2s;
  transform-origin: center;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Full-screen mobile menu overlay */
.nav-menu {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--surface);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.nav-menu.open {
  pointer-events: auto;
  opacity: 1;
}
.nav-menu a {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), color 0.2s;
}
.nav-menu.open a { opacity: 1; transform: translateY(0); }
.nav-menu.open a:nth-child(1) { transition-delay: 0.04s; }
.nav-menu.open a:nth-child(2) { transition-delay: 0.08s; }
.nav-menu.open a:nth-child(3) { transition-delay: 0.12s; }
.nav-menu.open a:nth-child(4) { transition-delay: 0.16s; }
.nav-menu.open a:nth-child(5) { transition-delay: 0.20s; }
.nav-menu.open a:nth-child(6) { transition-delay: 0.24s; }
.nav-menu.open a:nth-child(7) { transition-delay: 0.28s; }
.nav-menu a:hover { color: var(--accent); }
.nav-menu .nav-menu-cta {
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 36px;
  margin-top: 8px;
}

/* --- Hero -------------------------------------------------- */
.hero {
  padding-top: 48px;
  padding-bottom: 96px;
  min-height: calc(100svh - 0px);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
/* Decorative cobalt blob */
.hero::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.07), transparent 70%);
  top: -120px; right: -80px;
  pointer-events: none;
  z-index: 0;
}
/* Decorative pop blob */
.hero::after {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.05), transparent 70%);
  bottom: -60px; left: 10%;
  pointer-events: none;
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero-copy { max-width: 520px; }
.hero h1 { margin-bottom: 20px; }
.hero-sub {
  font-size: 1.1rem;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 36px;
  max-width: 440px;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* --- Hero: Object Stack ------------------------------------ */
.hero-device {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  perspective: 1200px;
  overflow: hidden;
}
.stack-wrap {
  position: relative;
  width: 100%;
  height: 400px;
}
.stack-card {
  position: absolute;
  width: 240px;
  left: 50%;
  top: 50%;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  padding: 0;
  transition: transform 0.7s var(--ease-spring), box-shadow 0.4s var(--ease), z-index 0s;
  transform-origin: center center;
  /* Stacked default state */
  transform: translate(-50%, -50%) translateZ(0);
}
.stack-card:nth-child(1) { z-index: 4; transform: translate(-50%, -50%) rotate(-1deg); }
.stack-card:nth-child(2) { z-index: 3; transform: translate(-50%, -50%) translate(-6px, 6px) rotate(0.5deg); }
.stack-card:nth-child(3) { z-index: 2; transform: translate(-50%, -50%) translate(-12px, 12px) rotate(-0.5deg); }
.stack-card:nth-child(4) { z-index: 1; transform: translate(-50%, -50%) translate(-18px, 18px) rotate(1deg); }

/* Fanned state (triggered by JS) */
.stack-wrap.fanned .stack-card:nth-child(1) {
  transform: translate(calc(-50% - 100px), calc(-50% - 40px)) rotate(-8deg);
  z-index: 4;
  transition-delay: 0s;
}
.stack-wrap.fanned .stack-card:nth-child(2) {
  transform: translate(calc(-50% + 20px), calc(-50% - 20px)) rotate(-2deg);
  z-index: 3;
  transition-delay: 0.08s;
}
.stack-wrap.fanned .stack-card:nth-child(3) {
  transform: translate(calc(-50% + 100px), calc(-50% + 10px)) rotate(4deg);
  z-index: 2;
  transition-delay: 0.16s;
}
.stack-wrap.fanned .stack-card:nth-child(4) {
  transform: translate(calc(-50% - 30px), calc(-50% + 60px)) rotate(7deg);
  z-index: 1;
  transition-delay: 0.24s;
}

/* Selected card */
.stack-card.selected {
  z-index: 10 !important;
  box-shadow: var(--shadow-lg);
}
.stack-wrap.fanned .stack-card.selected {
  transform: translate(-50%, calc(-50% - 10px)) rotate(0deg) scale(1.06) !important;
  transition-delay: 0s !important;
}

.stack-card:hover { box-shadow: var(--shadow-lg); }
.stack-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.stack-card-img {
  width: 100%; height: 130px;
  overflow: hidden;
  position: relative;
}
.stack-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
}
/* Fallback gradient when image not yet generated */
.stack-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: inherit;
  z-index: 0;
}
.stack-card-img img { position: relative; z-index: 1; }

.stack-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stack-card-body h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.stack-card-loc {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stack-card-chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.stack-card-chips span {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-2);
  padding: 3px 8px;
  background: var(--bg);
  border-radius: 6px;
}

/* --- Hero Simple (inner pages) ----------------------------- */
.hero-simple {
  padding-top: 64px;
  padding-bottom: 52px;
}
.hero-simple h1 { margin-bottom: 14px; }
.hero-simple .hero-desc {
  color: var(--text-2);
  font-size: 1.05rem;
  max-width: 540px;
}

/* --- Buttons ----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--body);
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--r-sm);
  position: relative;
  overflow: hidden;
  transition:
    background 0.2s var(--ease),
    color 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    transform 0.15s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 16px; height: 16px; flex: none; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.2);
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.28);
}
/* Sheen sweep */
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -80%;
  width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: skewX(-18deg);
  transition: left 0.5s var(--ease);
}
.btn-primary:hover::before { left: 130%; }

.btn-secondary {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1.5px var(--bg-3);
}
.btn-secondary:hover {
  color: var(--accent);
  box-shadow: inset 0 0 0 1.5px var(--accent);
  background: var(--accent-tint);
}

.btn-large { font-size: 1rem; padding: 15px 32px; }
.btn-wide  { width: 100%; justify-content: center; }

/* Ripple */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: scale(0);
  animation: rippleOut 0.5s var(--ease-out);
  pointer-events: none;
}
@keyframes rippleOut { to { transform: scale(4); opacity: 0; } }

/* --- Cards (tonal layers: no borders, whisper shadow) ------ */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: var(--r-sm);
  background: var(--accent-tint);
  color: var(--accent);
  transition: transform 0.35s var(--ease-spring), background 0.2s;
  flex: none;
}
.card:hover .card-icon { transform: scale(1.12) rotate(3deg); background: var(--accent-light); }
.card-icon svg { width: 20px; height: 20px; }
.card h4 { color: var(--text); }
.card p  { font-size: 0.9rem; color: var(--text-2); line-height: 1.6; }

/* Pop-accent variant card */
.card[data-accent="pop"] .card-icon { background: var(--pop-tint); color: var(--pop); }
.card[data-accent="pop"]:hover .card-icon { background: var(--pop-light); }

/* --- Grid layouts ------------------------------------------ */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }

/* --- Section heading (centered) ---------------------------- */
.section-heading {
  text-align: center;
  margin-bottom: 56px;
}
.section-heading .eyebrow { justify-content: center; }
.section-heading h2 { margin-bottom: 12px; }
.section-heading p  { color: var(--text-2); margin-inline: auto; }

/* --- Feature Columns section ------------------------------- */
.features {
  position: relative;
  overflow: hidden;
}
/* Decorative blob behind features */
.features::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.04), transparent 70%);
  bottom: -100px; left: -80px;
  pointer-events: none;
}

/* --- Deep Dive (alternating rows + how-it-works) ----------- */
.deep-dive { position: relative; overflow: hidden; }

/* How it works steps */
.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 80px;
}
.how-step {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.how-step:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.how-step-num {
  font-family: var(--display);
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.03em;
}
.how-step-num::after {
  content: '';
  display: block;
  width: 28px; height: 3px;
  background: var(--pop);
  border-radius: 2px;
  margin-top: 10px;
}
.how-step h4 { color: var(--text); }
.how-step p  { font-size: 0.9rem; color: var(--text-2); line-height: 1.6; }

/* Alternating detail rows */
.dd-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding-block: 40px;
}
.dd-row.reverse .dd-copy  { order: 2; }
.dd-row.reverse .dd-visual { order: 1; }
.dd-copy { max-width: 480px; }
.dd-copy .eyebrow { margin-bottom: 10px; }
.dd-copy h3 { margin-bottom: 14px; }
.dd-copy p {
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 20px;
  max-width: 420px;
}
.dd-visual {
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
}
.dd-visual img {
  width: 100%; height: 100%;
  object-fit: cover;
  aspect-ratio: 4/3;
  transition: transform 0.7s var(--ease);
}
.dd-visual:hover img { transform: scale(1.04); }

/* --- FAQ Accordion ----------------------------------------- */
.faq-section { overflow: hidden; }
.faq { max-width: 700px; margin-inline: auto; }
.faq-item {
  border-bottom: 1px solid var(--bg-3);
}
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 20px 0;
  text-align: left;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  gap: 16px;
}
.faq-q svg {
  width: 18px; height: 18px; flex: none;
  color: var(--text-3);
  transition: transform 0.35s var(--ease), color 0.2s;
}
.faq-item.open .faq-q svg { transform: rotate(180deg); color: var(--accent); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease);
}
.faq-a-inner {
  padding-bottom: 22px;
  font-size: 0.93rem;
  color: var(--text-2);
  line-height: 1.65;
}

/* --- CTA Band ---------------------------------------------- */
.cta-band {
  background: var(--accent);
  padding-block: 96px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* Decorative circle */
.cta-band::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.06), transparent 60%);
  top: -200px; right: -100px;
  pointer-events: none;
}
.cta-band h2   { color: #fff; margin-bottom: 14px; }
.cta-band p    { color: rgba(255,255,255,0.78); margin-inline: auto; margin-bottom: 36px; max-width: 480px; }
.cta-band .btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 44px;
  background: #fff;
  color: var(--accent);
  font-family: var(--body);
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: var(--r-sm);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  transition: background 0.2s var(--ease), transform 0.15s var(--ease), box-shadow 0.2s;
}
.cta-band .btn-cta:hover {
  background: var(--accent-tint);
  box-shadow: 0 6px 28px rgba(0,0,0,0.16);
}
.cta-band .btn-cta:active { transform: scale(0.97); }
.cta-band .btn-cta::before {
  content: '';
  position: absolute;
  top: 0; left: -80%;
  width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(37,99,235,0.08), transparent);
  transform: skewX(-18deg);
  transition: left 0.5s var(--ease);
}
.cta-band .btn-cta:hover::before { left: 130%; }
.cta-band .btn-cta svg { width: 18px; height: 18px; }

/* --- Footer ------------------------------------------------ */
.footer {
  padding-block: 60px 28px;
  background: var(--surface);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 44px;
  margin-bottom: 48px;
}
.footer-brand { display: flex; flex-direction: column; gap: 14px; }
.footer-brand p {
  font-size: 0.87rem;
  color: var(--text-3);
  max-width: 260px;
  line-height: 1.6;
}
.footer-col h4 {
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 0.9rem;
  color: var(--text-2);
  padding-block: 6px;
  transition: color 0.2s var(--ease);
  position: relative;
  width: fit-content;
}
.footer-col a::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 0;
  width: 0; height: 1.5px;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.3s var(--ease);
}
.footer-col a:hover { color: var(--accent); }
.footer-col a:hover::after { width: 100%; }
.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid var(--bg-2);
  font-size: 0.82rem;
  color: var(--text-3);
}

/* --- Forms (fully themed by element) ----------------------- */
input, textarea, select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 13px 16px;
  font-family: var(--body);
  font-size: 0.92rem;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--bg-3);
  border-radius: var(--r-sm);
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  caret-color: var(--accent);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
input::placeholder, textarea::placeholder {
  color: var(--text-3);
  opacity: 1;
}
textarea { resize: vertical; min-height: 120px; line-height: 1.55; }
select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236A7F98' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-group { margin-bottom: 20px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-error {
  font-size: 0.8rem;
  color: var(--error);
  margin-top: 5px;
}

/* Form success state */
.form-success { display: none; }
.form-success.show {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  padding: 56px 24px;
}
.form-success-icon {
  width: 56px; height: 56px;
  border-radius: var(--r-md);
  background: var(--accent-tint);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.form-success-icon svg { width: 26px; height: 26px; }
.form-success h3 { color: var(--text); }
.form-success p  { color: var(--text-2); }

/* --- Slider (carousel) ------------------------------------- */
[data-slider] { position: relative; }
[data-slider-track] {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
  align-items: stretch;
}
[data-slider-track]::-webkit-scrollbar { display: none; }
[data-slider-track] > * {
  flex: 0 0 calc(33.333% - 14px);
  scroll-snap-align: start;
  grid-column: auto !important;
  height: 100%;
}
[data-slider-prev],
[data-slider-next] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s var(--ease), color 0.2s, transform 0.15s;
}
[data-slider-prev]:hover,
[data-slider-next]:hover { box-shadow: var(--shadow-md); color: var(--accent); }
[data-slider-prev]:active,
[data-slider-next]:active { transform: scale(0.95); }
[data-slider-prev]:disabled,
[data-slider-next]:disabled { opacity: 0.3; cursor: default; }
[data-slider-prev] svg,
[data-slider-next] svg { width: 16px; height: 16px; }
.slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.slider-arrows { display: flex; gap: 8px; align-items: center; }

/* --- Destination card -------------------------------------- */
.dest-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.dest-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.dest-card-img { aspect-ratio: 4/3; overflow: hidden; }
.dest-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.dest-card:hover .dest-card-img img { transform: scale(1.04); }
.dest-card-body {
  padding: 20px 22px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dest-card-body h3 { font-size: 1.15rem; }
.dest-card-body p  { font-size: 0.88rem; color: var(--text-2); line-height: 1.55; }
.dest-card-body .btn-secondary {
  align-self: flex-start;
  margin-top: auto;
  padding: 8px 18px;
  font-size: 0.83rem;
}

/* --- Contact section --------------------------------------- */
.contact-section { max-width: 560px; margin-inline: auto; }
.contact-email-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  transition: opacity 0.2s var(--ease);
}
.contact-email-link:hover { opacity: 0.7; }

/* --- Prose lists ------------------------------------------- */
.prose ul {
  list-style: none; display: flex; flex-direction: column;
  gap: 10px; margin-top: 16px;
}
.prose li { position: relative; padding-left: 20px; line-height: 1.55; color: var(--text-2); }
.prose li::before {
  content: ""; position: absolute;
  left: 0; top: 0.58em;
  width: 8px; height: 3px;
  border-radius: 2px;
  background: var(--accent);
}
.prose li strong { color: var(--text); }

/* --- Scroll reveal ----------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Staggered child reveals */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.reveal-stagger.visible > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0.04s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.12s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.16s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.2s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.24s; }

/* --- Focus visible ----------------------------------------- */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1000px) {
  :root { --rail-w: 0px; }
  .rail {
    position: fixed;
    left: 0; top: 0; right: 0;
    bottom: auto;
    width: 100%;
    height: 64px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
  }
  .rail-head { flex: 1; }
  .rail-links { display: none; }
  .rail-cta.desktop-only { display: none; }
  .nav-toggle { display: flex; }
  .main-content { margin-left: 0; padding-top: 64px; }

  .hero { min-height: auto; padding-top: 32px; padding-bottom: 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-copy { max-width: 100%; }
  .hero-device { min-height: 340px; }

  .dd-row,
  .dd-row.reverse { grid-template-columns: 1fr; gap: 32px; }
  .dd-row.reverse .dd-copy  { order: 1; }
  .dd-row.reverse .dd-visual { order: 2; }

  .how-steps { grid-template-columns: 1fr; gap: 16px; }

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

  [data-slider-track] > * { flex: 0 0 calc(50% - 10px); }

  .hero::before, .hero::after, .features::after { display: none; }
}

@media (max-width: 720px) {
  h1 { font-size: clamp(2rem, 8vw, 2.8rem); }
  section { padding-block: 64px; }
  .container { padding-inline: 20px; }
  .hero { padding-top: 24px; padding-bottom: 56px; }
  .hero-simple { padding-top: 40px; padding-bottom: 36px; }

  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }

  .hero-device { min-height: 300px; }
  .stack-card { width: 200px; }
  .stack-card-img { height: 100px; }
  .stack-wrap.fanned .stack-card:nth-child(1) { transform: translate(calc(-50% - 60px), calc(-50% - 30px)) rotate(-6deg); }
  .stack-wrap.fanned .stack-card:nth-child(2) { transform: translate(calc(-50% + 10px), calc(-50% - 10px)) rotate(-1deg); }
  .stack-wrap.fanned .stack-card:nth-child(3) { transform: translate(calc(-50% + 60px), calc(-50% + 10px)) rotate(3deg); }
  .stack-wrap.fanned .stack-card:nth-child(4) { transform: translate(calc(-50% - 10px), calc(-50% + 50px)) rotate(5deg); }

  [data-slider-track] > * { flex: 0 0 86%; }

  .cta-band { padding-block: 72px; }
  .cta-band .btn-cta { padding: 14px 32px; font-size: 0.95rem; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .reveal-stagger > * { opacity: 1; transform: none; }
  .scroll-progress { display: none; }
  .btn-primary::before { display: none; }
  .cta-band .btn-cta::before { display: none; }
  .stack-card { transition: none; }
  .stack-wrap.fanned .stack-card { transition: none; }
  .nav-menu a { opacity: 1; transform: none; }
}
