/* ==========================================================================
   Rediza — Page-specific sections
   ========================================================================== */

/* --- View transitions ----------------------------------------------------- */

@view-transition { navigation: auto; }

::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.32s; }

html { opacity: 1; }
html:not(.vt-ready) body { opacity: 0; }
html.vt-ready body { opacity: 1; transition: opacity 0.34s var(--e-out); }
html.vt-leaving body { opacity: 0; transition: opacity 0.26s var(--e-soft); }

/* ==========================================================================
   HOME
   ========================================================================== */

/* --- Hero ----------------------------------------------------------------- */

.hero {
  min-height: 100svh;
  /* Extra height gives the dissolve scrub room to play out. */
  padding-bottom: 4vh;
  display: flex;
  align-items: stretch;
  overflow: clip;
}

.hero .canvas-layer canvas {
  filter: blur(48px) saturate(1.25);
  transform: scale(1.25);          /* hide blur edges */
  opacity: 0.85;
}

/* Film grain knocks the digital cleanliness off the gradients. */
.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: var(--z-content);
  display: flex;
  align-items: center;
  width: 100%;
  padding-top: var(--nav-h);
}

.hero-title { max-width: 12ch; margin-top: var(--s-6); }
.hero-lead  { margin-top: var(--s-6); }
.hero-actions { margin-top: var(--s-7); }

.marquee-band { border-block: 1px solid var(--t-faint); }

/* --- Pillars --------------------------------------------------------------- */

.pillar { display: flex; flex-direction: column; gap: var(--s-4); min-height: 380px; }
.pillar .h3 { margin-top: var(--s-2); }
.pillar .link { margin-top: auto; padding-top: var(--s-4); }
.pillar--trip.card--glow::before {
  background: radial-gradient(
    340px circle at var(--mx, 50%) var(--my, 0%),
    color-mix(in oklab, var(--trip) 30%, transparent),
    transparent 70%
  );
}

.tag-list { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.tag-list li {
  font-size: var(--fs-micro);
  font-weight: 550;
  letter-spacing: 0.03em;
  padding: 0.32em 0.85em;
  border-radius: var(--radius-pill);
  background: color-mix(in oklab, var(--fg) 7%, transparent);
  color: var(--fg-mid);
}

/* --- Pinned statement ------------------------------------------------------ */

.statement { height: 260svh; }
.statement-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  align-items: center;
}
.statement-copy {
  font-size: clamp(1.75rem, 3.6vw, 3.4rem);
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: var(--tr-head);
  text-wrap: balance;
}

/* --- Infra ----------------------------------------------------------------- */

.infra { min-height: 100svh; display: flex; align-items: center; }
.infra .canvas-layer { opacity: 0.8; }
.infra .canvas-layer canvas { pointer-events: auto; }

.spec-list { border-top: 1px solid var(--rule); max-width: 980px; }
.spec {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: var(--s-4) var(--s-6);
  padding: var(--s-5) 0;
  border-bottom: 1px solid var(--rule);
}
.spec-k {
  font-size: var(--fs-micro);
  font-weight: 590;
  letter-spacing: var(--tr-micro);
  text-transform: uppercase;
  color: var(--fg-lo);
  padding-top: 0.35em;
}
.spec-v { font-size: var(--fs-h4); line-height: 1.4; letter-spacing: -0.015em; }
@media (max-width: 640px) { .spec { grid-template-columns: 1fr; gap: var(--s-2); } }

/* --- Product teaser -------------------------------------------------------- */

.product { overflow: clip; }
.product-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: var(--s-8);
  align-items: center;
}
@media (max-width: 980px) {
  .product-grid { grid-template-columns: 1fr; }
  .product-visual { order: -1; }
}
.product-visual {
  aspect-ratio: 1;
  max-height: 78svh;
  margin-inline: auto;
  width: min(100%, 78svh);
}
.product-visual canvas { width: 100%; height: 100%; }

.feat-list { display: flex; flex-direction: column; gap: var(--s-4); max-width: 52ch; }
.feat-list li {
  color: var(--fg-mid);
  padding-left: var(--s-5);
  position: relative;
}
.feat-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--trip), var(--trip-2));
}
.feat-list strong { color: var(--fg); font-weight: 590; }

.metric-sep { color: var(--fg-lo); }

/* --- Steps ----------------------------------------------------------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-6);
  counter-reset: step;
}
@media (max-width: 1000px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px)  { .steps { grid-template-columns: 1fr; } }

.step {
  border-top: 1px solid var(--fg);
  padding-top: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.step-n {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--fg-lo);
  letter-spacing: 0.1em;
}

/* --- CTA band --------------------------------------------------------------- */

.cta-band {
  padding-block: clamp(8rem, 16vw, 16rem);
  overflow: clip;
}
.cta-band .canvas-layer canvas {
  filter: blur(52px) saturate(1.2);
  transform: scale(1.3);
  opacity: 0.7;
}
.cta-band .lead { max-width: 44ch; }

/* ==========================================================================
   PLANNER
   ========================================================================== */

.pl-hero {
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: clip;
  padding-top: var(--nav-h);
}
.pl-hero-globe {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.pl-hero-globe canvas {
  width: min(120vw, 118svh);
  height: min(120vw, 118svh);
  opacity: calc(0.9 - var(--p, 0) * 0.5);
  transform: translateY(calc(var(--p, 0) * 8vh)) scale(calc(1 + var(--p, 0) * 0.1));
}
.pl-hero-copy { position: relative; z-index: var(--z-content); }
.pl-hero-copy .display { max-width: 14ch; margin-inline: auto; }

.pl-kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  padding: 0.5em 1.1em;
  border-radius: var(--radius-pill);
  background: color-mix(in oklab, var(--trip) 12%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--trip) 30%, transparent);
  color: var(--trip);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: var(--tr-micro);
  text-transform: uppercase;
}
.pl-kicker::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse-dot 2s var(--e-inout) infinite;
}
@keyframes pulse-dot { 50% { opacity: 0.35; } }

/* Feature scroll-snap band */
.pl-features { position: relative; }
.pl-feature {
  min-height: 92svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s-8);
  align-items: center;
  padding-block: var(--s-8);
}
@media (max-width: 900px) { .pl-feature { grid-template-columns: 1fr; min-height: 0; } }
.pl-feature:nth-child(even) .pl-feature-visual { order: -1; }
@media (max-width: 900px) { .pl-feature:nth-child(even) .pl-feature-visual { order: 0; } }

.pl-feature-visual {
  border-radius: var(--radius-xl);
  background: var(--ink-soft);
  box-shadow: inset 0 0 0 1px var(--t-faint), var(--shadow-deep);
  aspect-ratio: 4 / 3.1;
  overflow: hidden;
  position: relative;
}

/* Constraint chips floating in the feature visual */
.visual-chips {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  padding: var(--s-6);
}
.vchip {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.02em;
  color: var(--t-mid);
  background: color-mix(in oklab, #fff 6%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, #fff 10%, transparent);
  border-radius: var(--radius-pill);
  padding: 0.5em 1.05em;
  backdrop-filter: blur(8px);
  animation: drift calc(11s + var(--i) * 1.7s) var(--e-inout) infinite;
  animation-delay: calc(var(--i) * -2.2s);
}
.vchip--ok {
  color: var(--mint);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--mint) 40%, transparent);
  background: color-mix(in oklab, var(--mint) 9%, transparent);
}

/* --- Itinerary demo -------------------------------------------------------- */

.demo {
  background: var(--ink-raised);
  border-radius: var(--radius-xl);
  box-shadow: inset 0 0 0 1px var(--t-faint), var(--shadow-deep);
  overflow: hidden;
  max-width: 900px;
  margin-inline: auto;
}
.demo-bar {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--t-faint);
}
.demo-dots { display: flex; gap: 6px; }
.demo-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--t-faint); }
.demo-query {
  flex: 1;
  font-size: var(--fs-small);
  color: var(--t-mid);
  background: color-mix(in oklab, #fff 5%, transparent);
  border-radius: var(--radius-pill);
  padding: 0.55em 1.1em;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.demo-query .mono { color: var(--trip); }

.demo-tabs {
  display: flex;
  gap: var(--s-2);
  padding: var(--s-4) var(--s-5) 0;
}
.demo-tab {
  padding: 0.5em 1.15em;
  border-radius: var(--radius-pill);
  font-size: var(--fs-small);
  font-weight: 550;
  color: var(--t-mid);
  transition: background var(--d-fast) var(--e-soft), color var(--d-fast) var(--e-soft);
}
.demo-tab:hover { color: var(--t-hi); }
.demo-tab[aria-selected="true"] {
  background: linear-gradient(100deg, var(--trip), var(--trip-2));
  color: #241008;
}

.demo-days { padding: var(--s-5); display: none; flex-direction: column; gap: var(--s-3); }
.demo-days.is-active { display: flex; }

.demo-item {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  gap: var(--s-4);
  align-items: center;
  padding: var(--s-4);
  border-radius: var(--radius-m);
  background: color-mix(in oklab, #fff 4%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, #fff 6%, transparent);
  opacity: 0;
  transform: translateY(12px);
  animation: demo-in 0.55s var(--e-out) forwards;
  animation-delay: calc(var(--i) * 70ms);
}
@keyframes demo-in { to { opacity: 1; transform: none; } }

.demo-time {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--trip);
  letter-spacing: 0.05em;
}
.demo-what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.demo-what strong { font-size: var(--fs-small); font-weight: 590; color: var(--t-hi); }
.demo-what span { font-size: var(--fs-micro); color: var(--t-lo); }
.demo-badge {
  font-size: var(--fs-micro);
  font-weight: 600;
  padding: 0.3em 0.8em;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.demo-badge--walk { background: rgba(94,230,192,.12); color: var(--mint); }
.demo-badge--transit { background: rgba(110,142,255,.14); color: #9ab2ff; }
.demo-badge--book { background: rgba(255,180,143,.14); color: var(--trip); }

.demo-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  border-top: 1px solid var(--t-faint);
  font-size: var(--fs-small);
  color: var(--t-mid);
  flex-wrap: wrap;
}

@media (max-width: 560px) {
  .demo-item { grid-template-columns: 1fr; gap: var(--s-2); }
}

/* Spec grid (Tesla-style) */
.pl-specs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-6);
  text-align: center;
}
@media (max-width: 900px) { .pl-specs { grid-template-columns: 1fr 1fr; } }
.pl-spec { display: flex; flex-direction: column; gap: var(--s-2); }
.pl-spec b {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 600;
  letter-spacing: var(--tr-display);
  line-height: 1;
}
.pl-spec span { font-size: var(--fs-small); color: var(--fg-mid); }

/* ==========================================================================
   SERVICES
   ========================================================================== */

.sv-hero {
  min-height: 86svh;
  display: flex;
  align-items: flex-end;
  padding-block: var(--nav-h) var(--s-9);
  overflow: clip;
}
.sv-hero .canvas-layer { opacity: 0.55; }
.sv-hero-copy { position: relative; z-index: var(--z-content); }
.sv-hero-copy .display { max-width: 11ch; }

/* Horizontal pin rail */
.rail { position: relative; }
.rail-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: clip;
}
.rail-head { padding-bottom: var(--s-6); }
.rail-track {
  display: flex;
  gap: var(--s-5);
  padding-inline: var(--gutter);
  width: max-content;
  will-change: transform;
}
.rail-card {
  width: min(430px, 82vw);
  flex: none;
  min-height: 400px;
}
@media (max-width: 700px) {
  .rail { height: auto !important; }
  .rail-sticky { position: static; height: auto; }
  .rail-track { flex-direction: column; width: auto; transform: none !important; }
  .rail-card { width: auto; min-height: 0; }
}

/* Practice sections */
.sv-practice {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: var(--s-7) var(--s-9);
  padding-block: var(--s-9);
  border-top: 1px solid var(--rule);
}
@media (max-width: 900px) { .sv-practice { grid-template-columns: 1fr; } }
.sv-practice-side { position: sticky; top: calc(var(--nav-h) + var(--s-6)); align-self: start; }
@media (max-width: 900px) { .sv-practice-side { position: static; } }

.sv-list { display: flex; flex-direction: column; }
.sv-item {
  padding: var(--s-5) 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.sv-item h4 { font-size: var(--fs-h4); }

/* Timeline */
.timeline { position: relative; max-width: 760px; margin-inline: auto; }
.timeline-svg {
  position: absolute;
  top: 0; left: 26px;
  height: 100%;
  width: 2px;
  overflow: visible;
}
.timeline-svg line {
  stroke: color-mix(in oklab, var(--fg) 55%, transparent);
  stroke-width: 2;
  pathLength: 1;
}
.tl-step {
  position: relative;
  padding: 0 0 var(--s-8) 76px;
}
.tl-step::before {
  content: "";
  position: absolute;
  left: 18px; top: 4px;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid color-mix(in oklab, var(--fg) 60%, transparent);
}
.tl-step h3 { margin-bottom: var(--s-2); }

/* ==========================================================================
   CONTACT
   ========================================================================== */

.ct-wrap {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  padding-top: var(--nav-h);
}
@media (max-width: 900px) { .ct-wrap { grid-template-columns: 1fr; } }

.ct-side {
  padding: var(--s-9) var(--gutter);
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
  position: relative;
  overflow: clip;
}
.ct-side .canvas-layer { opacity: 0.5; }
.ct-side .canvas-layer canvas { filter: blur(46px); transform: scale(1.3); }

.ct-form-wrap {
  padding: var(--s-9) var(--gutter);
  background: var(--paper);
  color: var(--d-hi);
}

.field { display: flex; flex-direction: column; gap: var(--s-2); margin-bottom: var(--s-5); }
.field label {
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: var(--tr-micro);
  text-transform: uppercase;
  color: var(--d-mid);
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.9em 1em;
  border-radius: var(--radius-s);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--d-faint);
  transition: box-shadow var(--d-fast) var(--e-soft);
}
.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--ai-1);
}
.field textarea { min-height: 140px; resize: vertical; }

.ct-meta { display: flex; flex-direction: column; gap: var(--s-4); margin-top: auto; }
.ct-meta a { color: var(--t-hi); }
.ct-note { font-size: var(--fs-small); color: var(--d-mid); margin-top: var(--s-4); }
