/* =========================================================================
   MEKANO — Landing page · "Mekano Coming Soon" design system
   ========================================================================= */

:root {
  --mekano-orange:      #E2492A;
  --mekano-orange-deep: #B8361D;
  --mekano-orange-soft: #FCE9E2;
  --ink-900: #14110F;
  --ink-700: #2B2724;
  --ink-500: #6B6560;
  --ink-400: #9A938D;
  --ink-300: #C7C1BB;
  --ink-200: #E6E2DD;
  --ink-100: #F1EEEA;
  --ink-50:  #F7F5F2;
  --paper:   #FBFAF8;
  --steel-blue: #4A5560;
  --warm-brown: #8A6F4E;

  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink-900);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; }

/* =========================================================================
   Layout shell
   ========================================================================= */

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

/* =========================================================================
   BRAND PANE (dark left side on desktop · hero top on mobile)
   ========================================================================= */

.brand-pane {
  position: relative;
  overflow: hidden;
  background: var(--ink-900);
  color: #fff;
  min-height: 100vh;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Decorative flange — half-clipped right */
.flange-deco {
  position: absolute;
  right: -180px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.18;
  pointer-events: none;
  animation: spinSlow 80s linear infinite;
}

/* Grid pattern overlay */
.grid-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at top left, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at top left, #000 30%, transparent 80%);
}

/* Bottom gradient fade (mobile only — hidden on desktop) */
.hero-fade { display: none; }

/* Top: logo + meta */
.brand-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  display: block;
  height: 72px;
  width: auto;
  max-width: 280px;
  user-select: none;
  -webkit-user-drag: none;
}

.brand-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #8a847e;
  line-height: 1.4;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  text-transform: uppercase;
}

/* Counter bubble (mobile only) */
.counter-bubble {
  display: none;
  align-items: center;
  gap: 7px;
  padding: 6px 10px 6px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  margin-left: auto;
}

.counter-avatars { display: flex; }

.avatar {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-900);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 7px;
  font-weight: 800;
  color: #fff;
  margin-left: -6px;
}
.avatar:first-child { margin-left: 0; }
.avatar-1 { background: var(--mekano-orange); }
.avatar-2 { background: var(--steel-blue); }
.avatar-3 { background: var(--warm-brown); }
.avatar-4 { background: var(--ink-400); }

.counter-avatars-lg .avatar {
  width: 26px; height: 26px;
  border-width: 2px;
  font-size: 10px;
  margin-left: -8px;
}
.counter-avatars-lg .avatar:first-child { margin-left: 0; }

.counter-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-100);
}

/* Hero text */
.brand-hero {
  position: relative;
  max-width: 540px;
  margin-top: auto;
  animation: fadeUp 0.6s ease-out 0.05s both;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--mekano-orange);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(226, 73, 42, 0.12);
  border: 1px solid rgba(226, 73, 42, 0.32);
  margin-bottom: 24px;
  text-transform: uppercase;
}

.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--mekano-orange);
  animation: pulse 2s ease-in-out infinite;
}

.hero-title {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 0.98;
  margin: 0 0 20px;
}

.hero-accent { color: var(--mekano-orange); }

.hero-desc {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-300);
  margin: 0 0 28px;
  max-width: 460px;
}

.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-100);
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
}

.feature-pill svg { color: var(--mekano-orange); flex-shrink: 0; }

/* Brand footer (desktop) */
.brand-footer {
  position: relative;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.waitlist {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #8A847E;
}

.waitlist-text strong {
  color: var(--ink-100);
  font-weight: 700;
}

.copyright {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.6px;
  color: var(--ink-500);
  text-transform: uppercase;
}

/* =========================================================================
   FORM PANE (light right side on desktop · bottom-sheet on mobile)
   ========================================================================= */

.form-pane {
  position: relative;
  background: var(--paper);
  padding: 48px 56px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.drag-handle { display: none; }

/* Top-right chip */
.form-chip {
  position: absolute;
  top: 32px;
  right: 56px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--ink-500);
  text-transform: uppercase;
}

.chip-icon { color: var(--ink-500); }

.form-inner {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  animation: fadeUp 0.55s ease-out 0.1s both;
}

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--mekano-orange);
  margin-bottom: 14px;
  text-transform: uppercase;
}

.form-title {
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.1;
  margin: 0 0 14px;
  color: var(--ink-900);
}

.form-desc {
  font-size: 15px;
  color: var(--ink-500);
  line-height: 1.55;
  margin: 0 0 32px;
  max-width: 400px;
}

.form-desc strong { color: var(--ink-900); font-weight: 700; }

.form { animation: fadeUp 0.5s ease-out both; }

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-700);
  margin-bottom: 8px;
  letter-spacing: 0.1px;
}

.field-wrap {
  position: relative;
  margin-bottom: 16px;
}

.field-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-400);
  display: flex;
  pointer-events: none;
  transition: color 0.18s ease;
}

.field-input {
  width: 100%;
  height: 56px;
  padding: 0 16px 0 48px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-900);
  background: #fff;
  border: 1.5px solid var(--ink-200);
  border-radius: 14px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field-input::placeholder { color: var(--ink-400); }

.field-input:focus {
  border-color: var(--ink-900);
  box-shadow: 0 0 0 4px rgba(20, 17, 15, 0.06);
}

.field-wrap:has(.field-input.is-error) .field-icon,
.field-wrap.is-error .field-icon { color: var(--mekano-orange); }

.field-input.is-error {
  border-color: var(--mekano-orange);
  box-shadow: 0 0 0 4px rgba(226, 73, 42, 0.10);
}

.error {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--mekano-orange);
  font-weight: 600;
  margin: -6px 0 14px;
  animation: fadeIn 0.2s ease-out;
}

/* =========================================================================
   Buttons
   ========================================================================= */

.buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 56px;
  padding: 0 18px;
  border: 1.5px solid transparent;
  border-radius: 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}

.btn:focus-visible {
  outline: 3px solid rgba(226, 73, 42, 0.45);
  outline-offset: 2px;
}

.btn:active { transform: scale(0.985); }

.btn-primary {
  background: var(--mekano-orange);
  color: #fff;
}

.btn-primary:hover { background: var(--mekano-orange-deep); }

.btn-secondary {
  background: transparent;
  color: var(--ink-900);
  border-color: var(--ink-900);
}

.btn-secondary:hover {
  background: var(--ink-900);
  color: #fff;
}

.btn-icon { flex-shrink: 0; }

.btn-arrow {
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.btn:hover .btn-arrow { transform: translateX(3px); }

/* CTA (Continua) full width with shimmer */
.btn-cta {
  margin-top: 4px;
}

.btn-spinner {
  display: none;
  align-items: center;
}

.btn-spinner svg { animation: spinSlow 0.9s linear infinite; }

.btn.is-loading {
  background: var(--mekano-orange-deep);
  cursor: progress;
  pointer-events: none;
}
.btn.is-loading .btn-arrow { display: none; }
.btn.is-loading .btn-spinner { display: inline-flex; }
.btn.is-loading .btn-shimmer { display: none; }

.btn-shimmer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.18) 50%, transparent 70%);
  animation: shimmer 3s ease-in-out infinite;
}

.btn-link {
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-500);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  margin-top: 4px;
  transition: color 0.18s ease;
}

.btn-link:hover { color: var(--ink-900); }

.legal {
  margin: 18px 0 0;
  font-size: 11px;
  color: var(--ink-400);
  line-height: 1.55;
}

.legal a {
  color: var(--ink-500);
  font-weight: 600;
  text-decoration: none;
}

.legal a:hover { text-decoration: underline; }

/* =========================================================================
   Done state
   ========================================================================= */

.check-mark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--mekano-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 28px;
  box-shadow: 0 12px 32px rgba(226, 73, 42, 0.32);
  animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.email-chip {
  background: #fff;
  border: 1.5px solid var(--ink-200);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.email-chip-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--ink-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-900);
  flex-shrink: 0;
}

.email-chip-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.email-chip-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-400);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.email-chip-addr {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-900);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}

.timeline-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--ink-500);
  text-transform: uppercase;
  margin-bottom: 0;
}

.timeline-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.timeline-bullet {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  color: var(--ink-400);
  background: var(--ink-100);
  border: 1.5px solid var(--ink-200);
}

.timeline-step.is-done .timeline-bullet {
  background: var(--mekano-orange);
  color: #fff;
  border-color: var(--mekano-orange);
}

.timeline-step.is-active .timeline-bullet {
  background: var(--ink-900);
  color: #fff;
  border-color: var(--ink-900);
}

.bullet-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--ink-900);
  opacity: 0.2;
  animation: pulse 2s ease-in-out infinite;
}

.timeline-step > div {
  flex: 1;
  padding-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.timeline-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-900);
}

.timeline-desc {
  font-size: 12px;
  color: var(--ink-500);
  line-height: 1.45;
}

/* =========================================================================
   Form footer
   ========================================================================= */

.form-foot {
  position: absolute;
  left: 56px;
  right: 56px;
  bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--ink-400);
}

/* =========================================================================
   Steps visibility
   ========================================================================= */

.step { display: block; }
.step.hidden { display: none !important; }

/* =========================================================================
   Keyframes
   ========================================================================= */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes spinSlow {
  from { transform: rotate(0deg); } to { transform: rotate(360deg); }
}
@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.08); }
}
@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .flange-deco,
  .badge-dot,
  .bullet-pulse,
  .btn-shimmer,
  .btn-spinner svg,
  .brand-hero,
  .form-inner,
  .check-mark,
  .form { animation: none !important; }
}

/* =========================================================================
   Language switch (fixed top-right pill, readable on dark + light)
   ========================================================================= */

.lang-switch {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 50;
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(20, 17, 15, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lang-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  padding: 5px 11px;
  border-radius: 999px;
  background: transparent;
  color: #f1eeea;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.lang-btn:hover { color: #fff; }

.lang-btn.is-active {
  background: var(--mekano-orange);
  color: #fff;
}

.lang-btn:focus-visible {
  outline: 2px solid var(--mekano-orange);
  outline-offset: 2px;
}

/* =========================================================================
   RESPONSIVE — mobile (single column with bottom-sheet)
   ========================================================================= */

@media (max-width: 960px) {
  .shell {
    grid-template-columns: 1fr;
    min-height: 100vh;
  }

  .brand-pane {
    min-height: 60vh;
    padding: 64px 28px 80px;
  }

  .grid-overlay {
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse at top, #000 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at top, #000 20%, transparent 70%);
  }

  .flange-deco {
    top: -120px;
    right: -180px;
    transform: none;
    opacity: 0.16;
    animation: spinSlow 90s linear infinite;
  }
  .flange-deco svg { width: 480px; height: 480px; }

  .hero-fade {
    display: block;
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 40%;
    background: linear-gradient(to top, var(--ink-900) 0%, var(--ink-900) 30%, transparent 100%);
    pointer-events: none;
  }

  .brand-top {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .brand-meta { display: none; }

  /* Hidden on mobile to avoid collision with the fixed language pill
     (decorative only — waitlist count still shows in the desktop footer). */
  .counter-bubble { display: none; }

  .brand-logo { height: 52px; max-width: 220px; }

  .hero-title { font-size: 40px; letter-spacing: -1.4px; }
  .hero-desc { font-size: 15px; max-width: 320px; }
  .feature-pill { font-size: 11px; padding: 5px 10px; }
  .feature-pill svg { width: 12px; height: 12px; }

  .brand-footer { display: none; }

  /* Form pane becomes the bottom-sheet card */
  .form-pane {
    background: var(--paper);
    border-radius: 28px 28px 0 0;
    padding: 24px 24px 28px;
    min-height: auto;
    margin-top: -32px;
    position: relative;
    z-index: 2;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.3);
    animation: fadeUp 0.5s ease-out 0.1s both;
  }

  .drag-handle {
    display: block;
    width: 40px; height: 4px;
    background: var(--ink-200);
    border-radius: 2px;
    margin: 0 auto 18px;
  }

  .form-chip {
    position: relative;
    top: auto;
    right: auto;
    margin-bottom: 14px;
  }

  .form-inner { padding-top: 0; }

  .eyebrow { font-size: 10px; letter-spacing: 0.7px; margin-bottom: 6px; }
  .form-title { font-size: 22px; letter-spacing: -0.5px; line-height: 1.15; }
  .form-desc { font-size: 13px; line-height: 1.45; margin-bottom: 16px; }

  .field-input { height: 52px; padding: 0 14px 0 42px; border-radius: 12px; }
  .field-icon { left: 14px; }

  .btn { height: 54px; border-radius: 13px; font-size: 15px; }

  .check-mark { width: 72px; height: 72px; margin-bottom: 22px; }
  .check-mark svg { width: 34px; height: 34px; }

  .form-title br { display: none; } /* keep titles on a single visual stack */

  .form-foot {
    position: relative;
    left: auto; right: auto; bottom: auto;
    margin-top: 24px;
    text-align: center;
    justify-content: center;
    font-size: 10.5px;
    color: var(--ink-400);
  }
}

@media (max-width: 480px) {
  .brand-pane { padding: 56px 22px 64px; }
  .form-pane  { padding: 22px 22px 26px; }
}
