/* Layout & responsive rules for the Vistora Digital homepage.
   Design tokens (colors, fonts, buttons, inputs, cards) live in tokens.css —
   this file only handles page structure and breakpoints. */

html { scroll-behavior: smooth; }
/* Ensure the native `hidden` attribute always actually hides an element,
   even if a more specific/later CSS rule (like .field-error's display:block)
   would otherwise fight it. Without this, elements marked hidden in the
   HTML can incorrectly render as visible. */
[hidden] { display: none !important; }

.wrap { background: var(--color-bg); }

/* — Nav — */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(24px, 4vw, 64px);
  border-bottom: 1px solid var(--color-neutral-200);
  position: relative;
}
.brand {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 22px;
  color: var(--color-text);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-links a {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--color-text);
  text-decoration: none;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  display: block;
}

/* — Hero — */
.hero {
  position: relative;
  padding: clamp(64px, 8vw, 104px) clamp(24px, 4vw, 64px) clamp(56px, 7vw, 88px);
  overflow: hidden;
}
.hero-blob {
  position: absolute;
  right: -160px;
  top: -200px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: var(--color-accent-2-200);
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 64ch;
}
.hero h1 {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: clamp(38px, 4.4vw, 60px);
  line-height: 1.08;
  margin: 20px 0 0;
  color: var(--color-text);
}
.hero p {
  font-size: 18px;
  line-height: 1.6;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
  max-width: 56ch;
  margin: 24px 0 0;
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}

/* — Two-column split sections (Services / Apply), stacks on mobile — */
.split {
  padding: clamp(48px, 6vw, 72px) clamp(24px, 4vw, 64px);
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: start;
}
.split.bordered { border-top: 1px solid var(--color-neutral-200); }

/* — Services accordion — */
.acc-item { border-bottom: 1px solid var(--color-neutral-200); }
.acc-trigger {
  all: unset;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 20px 4px;
  box-sizing: border-box;
}
.acc-trigger span:first-child {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 19px;
  color: var(--color-text);
}
.acc-marker {
  font-size: 22px;
  color: var(--color-accent-700);
  line-height: 1;
}
.acc-panel { padding: 0 4px 22px; display: none; }
.acc-item.open .acc-panel { display: block; }
.acc-panel p {
  font-size: 15px;
  line-height: 1.6;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
  margin: 0 0 14px;
  max-width: 48ch;
}
.acc-panel ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.acc-panel li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.5; color: var(--color-text); }
.acc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-accent-2); margin-top: 6px; flex: none; }

/* — Process timeline — */
.process { padding: clamp(48px, 6vw, 72px) clamp(24px, 4vw, 64px); background: var(--color-accent-100); }
.process h2 { max-width: 64ch; }
.process-list { max-width: 64ch; }
.process-step { display: grid; grid-template-columns: 56px 1fr; gap: 20px; position: relative; padding-bottom: 36px; }
.process-num {
  width: 44px; height: 44px; border-radius: 50%; background: var(--color-bg);
  border: 2px solid var(--color-accent-600); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight); font-size: 16px;
  color: var(--color-accent-700); flex: none;
}
.process-line { width: 2px; flex: 1; background: var(--color-accent-300); margin-top: 4px; }
.process-col { display: flex; flex-direction: column; align-items: center; }
.process-step h3 { font-family: var(--font-heading); font-weight: var(--font-heading-weight); font-size: 20px; margin: 6px 0 8px; color: var(--color-text); }
.process-step p { font-size: 15px; line-height: 1.6; color: color-mix(in srgb, var(--color-text) 78%, transparent); margin: 0; max-width: 52ch; }

/* — Apply form — */
.apply-card { padding: 32px 36px; }
.apply-fields { display: flex; flex-direction: column; gap: 18px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--color-text); margin-bottom: 6px; }
.field-error { font-size: 13px; color: var(--color-accent-700); display: block; margin-top: 6px; }
.form-success { font-size: 14px; color: var(--color-accent-2-800); margin: 0; }

footer {
  padding: 24px clamp(24px, 4vw, 64px);
  font-size: 13px;
  color: color-mix(in srgb, var(--color-text) 65%, transparent);
  border-top: 1px solid var(--color-neutral-200);
}

/* ═══════════════ Responsive breakpoints ═══════════════ */

/* Tablet: stack the two-column sections */
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
  .apply-card { padding: 28px; }
}

/* Mobile: collapsible nav menu */
@media (max-width: 680px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-neutral-200);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px clamp(24px, 4vw, 64px) 20px;
    display: none;
    z-index: 20;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 0; width: 100%; }
  .nav-links .btn { width: 100%; margin-top: 8px; }

  .hero-blob { width: 260px; height: 260px; right: -110px; top: -130px; }
  .hero-actions .btn { flex: 1 1 auto; }

  .apply-card { padding: 22px; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 32px; }
  .brand { font-size: 19px; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
