/* ==========================================================================
   SellQ.pl - Design Taste Architecture (Luminous Light System)
   Strictly adheres to Leonxlnx/taste-skill directives:
   - Anti-default palette: Clean Titanium & Electric Cobalt (No AI-purple)
   - Layout discipline: Hero fits initial viewport, single-line desktop nav
   - Eyebrow restraint: Exactly 1 eyebrow on entire page
   - Double-bezel tactile containers with concentric radii
   - Hardware-accelerated GPU transitions & reduced-motion parity
   ========================================================================== */

:root {
  /* Chromatic Foundation */
  --bg-core: #FBFBFD;
  --bg-subtle: #F3F4F6;
  --bg-card-outer: rgba(255, 255, 255, 0.75);
  --bg-card-inner: rgba(255, 255, 255, 0.94);
  
  /* Text & Contrast (WCAG AA Compliant) */
  --text-headline: #090D1A;
  --text-body: #475569;
  --text-muted: #64748B;
  --text-crisp: #0F172A;

  /* Singular Accent (Electric Royal Cobalt) */
  --color-cobalt: #1D4ED8;
  --color-cobalt-hover: #1E40AF;
  --color-cobalt-subtle: rgba(29, 78, 216, 0.08);
  --color-cobalt-glow: rgba(29, 78, 216, 0.22);
  --color-emerald: #059669;
  --color-emerald-subtle: rgba(5, 150, 105, 0.1);

  /* Borders & Specular Refraction */
  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-inner: rgba(255, 255, 255, 0.95);
  --border-focus: rgba(29, 78, 216, 0.35);
  --specular-rim: inset 0 1px 1px 0 rgba(255, 255, 255, 1);

  /* Diffused Ambient Shadows (Tinted to Slate Background) */
  --shadow-island: 0 12px 32px -4px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
  --shadow-card: 0 16px 36px -8px rgba(15, 23, 42, 0.05), 0 2px 8px -2px rgba(15, 23, 42, 0.02);
  --shadow-cta: 0 4px 16px 0 rgba(29, 78, 216, 0.28);

  /* Typography Stacks */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', var(--font-sans);

  /* Fluid Motion Physics */
  --ease-fluid: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-restrained: cubic-bezier(0.23, 1, 0.32, 1);
}

/* ==========================================================================
   Base Foundations & Accessibility
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-core);
  color: var(--text-headline);
  transition: background-color 0.25s var(--ease-restrained), color 0.25s var(--ease-restrained);
}

body {
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% 0%, #FFFFFF 0%, var(--bg-core) 65%, var(--bg-subtle) 100%);
  transition: background 0.3s var(--ease-restrained);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Viewport Background & Motion Simulation Chamber
   ========================================================================== */
.viewport-backdrop {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

#motion-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  opacity: 0.88;
}

/* Diffused Luminous Ambient Orbs */
.luminous-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(95px);
  will-change: transform;
  z-index: 1;
}

.orb-primary {
  width: clamp(380px, 45vw, 680px);
  height: clamp(380px, 45vw, 680px);
  top: -12%;
  left: 18%;
  background: radial-gradient(circle, rgba(29, 78, 216, 0.11) 0%, rgba(2, 132, 199, 0.04) 55%, transparent 75%);
  animation: orbDrift1 26s ease-in-out infinite alternate;
}

.orb-secondary {
  width: clamp(320px, 38vw, 560px);
  height: clamp(320px, 38vw, 560px);
  top: 28%;
  right: -6%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.09) 0%, rgba(99, 102, 241, 0.03) 60%, transparent 80%);
  animation: orbDrift2 24s ease-in-out infinite alternate;
}

.orb-tertiary {
  width: clamp(280px, 32vw, 480px);
  height: clamp(280px, 32vw, 480px);
  bottom: 4%;
  left: 6%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.07) 0%, transparent 70%);
  animation: orbDrift3 20s ease-in-out infinite alternate;
}

@keyframes orbDrift1 {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(50px, 35px, 0) scale(1.06); }
  100% { transform: translate3d(-35px, 65px, 0) scale(0.96); }
}

@keyframes orbDrift2 {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-40px, -50px, 0) scale(1.08); }
  100% { transform: translate3d(25px, 40px, 0) scale(0.94); }
}

@keyframes orbDrift3 {
  0% { transform: translate3d(0, 0, 0) scale(0.96); }
  100% { transform: translate3d(30px, -25px, 0) scale(1.04); }
}

/* Micro Subtle Grid Overlay */
.fine-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(15, 23, 42, 0.024) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.024) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(circle at 50% 35%, black 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(circle at 50% 35%, black 40%, transparent 85%);
  z-index: 3;
}

.film-grain {
  position: fixed;
  inset: 0;
  z-index: 4;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Application Stage Layout
   ========================================================================== */
.site-shell {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

/* ==========================================================================
   Island Navigation Bar (Single Line Desktop, Height ≤ 68px)
   ========================================================================== */
.nav-island-container {
  position: sticky;
  top: 1rem;
  z-index: 50;
  display: flex;
  justify-content: center;
  width: 100%;
  padding-top: 0.75rem;
}

.nav-island {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 920px;
  height: 60px;
  padding: 0 0.85rem 0 1.25rem;
  background: var(--bg-card-inner);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  box-shadow: var(--shadow-island), var(--specular-rim);
}

.brand-monogram {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-headline);
}

.brand-symbol {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-headline);
}

.brand-symbol svg {
  width: 100%;
  height: 100%;
}

.brand-wordmark {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-headline);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.nav-inquiry-link {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-cobalt);
  text-decoration: none;
  padding: 0.35rem 0.85rem;
  background: rgba(29, 78, 216, 0.06);
  border-radius: 9999px;
  border: 1px solid rgba(29, 78, 216, 0.12);
  transition: all 0.2s var(--ease-restrained);
}

.nav-inquiry-link:hover {
  background: var(--color-cobalt);
  color: #FFFFFF;
  border-color: var(--color-cobalt);
}

/* ==========================================================================
   Hero Stage (Vertically Centered, Pristine Spacing)
   ========================================================================== */
.main-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 0 3rem;
  width: 100%;
}

.hero-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 860px;
  margin: 0 auto;
}

/* Headline: Max 2 lines desktop, under 8 words */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.5vw, 4.4rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: var(--text-headline);
  width: 100%;
  max-width: 860px;
  margin-bottom: 1.4rem;
}

.title-gradient {
  background: linear-gradient(135deg, #090D1A 0%, #1E3A8A 55%, #1D4ED8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Subtext: Max 20 words, max 3 lines */
.hero-lede {
  font-size: clamp(1.05rem, 1.8vw, 1.22rem);
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-body);
  width: 100%;
  max-width: 640px;
  margin-bottom: 2.5rem;
}

/* Action Dock (Double-Bezel Architecture) */
.action-dock {
  width: 100%;
  max-width: 540px;
  margin: 0 auto 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dock-shell {
  width: 100%;
  background: var(--bg-card-outer);
  padding: 5px;
  border-radius: 30px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card), var(--specular-rim);
  transition: border-color 0.25s var(--ease-restrained), box-shadow 0.25s var(--ease-restrained);
  box-sizing: border-box;
}

.dock-shell:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 20px 42px -10px rgba(29, 78, 216, 0.12), var(--specular-rim);
}

.dock-shell.is-invalid {
  border-color: #EF4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15), var(--specular-rim) !important;
  animation: dockShake 0.38s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes dockShake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

.dock-core {
  width: 100%;
  background: #FFFFFF;
  border-radius: 25px;
  border: 1px solid var(--border-inner);
  padding: 0.35rem 0.35rem 0.35rem 0.85rem;
  box-sizing: border-box;
}

.whitelist-form {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-sizing: border-box;
}

.field-container {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  padding-left: 0;
}

.field-icon {
  width: 19px;
  height: 19px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-right: 0.4rem;
  transition: color 0.2s ease;
}

.dock-shell:focus-within .field-icon {
  color: var(--color-cobalt);
}

.email-field {
  width: 100%;
  min-width: 0;
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 0.78rem 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-headline);
}

.email-field::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

/* Submit Pill (Button-in-Button Trailing Glyph, No Wrap Desktop) */
.submit-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  background: var(--color-cobalt);
  color: #FFFFFF;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 0.45rem 0.45rem 0.45rem 1.35rem;
  border-radius: 9999px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: var(--shadow-cta);
  transition: 
    background-color 0.2s var(--ease-restrained),
    transform 0.15s var(--ease-spring),
    box-shadow 0.2s var(--ease-restrained);
}

.submit-pill:hover {
  background: var(--color-cobalt-hover);
  box-shadow: 0 6px 20px 0 rgba(29, 78, 216, 0.36);
  transform: translateY(-1px);
}

.submit-pill:active {
  transform: scale(0.98) translateY(0);
}

.icon-ring {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s var(--ease-spring), background-color 0.2s ease;
}

.arrow-glyph {
  width: 13px;
  height: 13px;
  stroke: #FFFFFF;
}

.submit-pill:hover .icon-ring {
  background: rgba(255, 255, 255, 0.28);
  transform: translateX(2px);
}

/* Locked Form State (Prevents duplicate entries, allows in-place editing) */
.dock-shell.is-locked .field-icon {
  color: var(--color-emerald);
}

.email-field:read-only {
  cursor: default;
  user-select: all;
  opacity: 0.92;
}

.submit-pill.is-locked-btn {
  background: rgba(29, 78, 216, 0.08);
  color: var(--color-cobalt);
  border: 1px solid rgba(29, 78, 216, 0.22);
  box-shadow: none;
  padding: 0.42rem 0.45rem 0.42rem 1.15rem;
}

.submit-pill.is-locked-btn:hover {
  background: rgba(29, 78, 216, 0.14);
  border-color: var(--color-cobalt);
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.12);
  transform: translateY(-1px);
}

.submit-pill.is-locked-btn .icon-ring {
  background: rgba(29, 78, 216, 0.12);
}

.submit-pill.is-locked-btn .arrow-glyph {
  stroke: var(--color-cobalt);
}


/* Feedback Status Message */
.action-feedback {
  font-size: 0.84rem;
  font-weight: 500;
  text-align: left;
  padding: 0 1rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--ease-fluid), opacity 0.3s ease, margin-top 0.3s ease;
}

.action-feedback.status-ok {
  max-height: 48px;
  opacity: 1;
  margin-top: 0.6rem;
  margin-bottom: 0.2rem;
  color: var(--color-emerald);
}

.action-feedback.status-err {
  max-height: 48px;
  opacity: 1;
  margin-top: 0.6rem;
  margin-bottom: 0.2rem;
  color: #DC2626;
}

.action-feedback.status-info {
  max-height: 48px;
  opacity: 1;
  margin-top: 0.6rem;
  margin-bottom: 0.2rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Structural Dock Footer
   ========================================================================== */
.dock-footer {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2.25rem 0 2.5rem;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  margin-top: 2.5rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.footer-segment {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.footer-title {
  font-weight: 600;
  color: var(--text-crisp);
}

.footer-dot {
  opacity: 0.35;
}

/* Contact email copy button */
.inquiry-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.email-copy-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 0.3rem 0.7rem;
  border-radius: 7px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-cobalt);
  transition: all 0.2s var(--ease-restrained);
}

.email-copy-pill:hover {
  background: #FFFFFF;
  border-color: var(--color-cobalt);
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.12);
}

.copy-glyph {
  width: 13px;
  height: 13px;
  opacity: 0.75;
}

.copy-balloon {
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--text-headline);
  color: #FFFFFF;
  padding: 0.28rem 0.6rem;
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.2s var(--ease-spring), opacity 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}

.copy-balloon.show-balloon {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   Responsive Adaptations (< 768px Mobile Collapse)
   ========================================================================== */
@media (max-width: 768px) {
  .site-shell {
    padding: 0 1rem;
  }

  .nav-island {
    padding: 0 0.75rem 0 1rem;
  }

  .main-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.25rem 0 1rem;
  }

  .hero-title {
    font-size: 2.1rem;
    letter-spacing: -0.025em;
    margin-bottom: 0.85rem;
  }

  .hero-lede {
    font-size: 0.95rem;
    margin-bottom: 1.35rem;
    line-height: 1.5;
  }

  .action-dock {
    max-width: 100%;
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .dock-shell {
    width: 100%;
    border-radius: 9999px;
    padding: 3px;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
    box-sizing: border-box;
  }

  .dock-core {
    width: 100%;
    border-radius: 9999px;
    padding: 3px 3px 3px 10px;
    box-sizing: border-box;
  }

  .whitelist-form {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    flex-wrap: nowrap;
    box-sizing: border-box;
  }

  .field-container {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    height: auto;
    padding: 0;
    background: transparent;
    border: none;
  }

  .field-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-right: 0.25rem;
  }

  .email-field {
    /* 16px font-size is essential to prevent iOS Safari auto-zoom on tap */
    font-size: 16px;
    padding: 0.65rem 0.25rem;
    min-width: 0;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
  }

  .email-field::placeholder {
    font-size: 0.9rem;
  }

  .submit-pill {
    flex-shrink: 0;
    height: 44px;
    border-radius: 9999px;
    padding: 0 0.35rem 0 0.85rem;
    font-size: 0.82rem;
    white-space: nowrap;
    gap: 0.35rem;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .icon-ring {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
  }

  .arrow-glyph {
    width: 12px;
    height: 12px;
  }

  .action-feedback {
    text-align: center;
    font-size: 0.82rem;
    padding: 0.35rem 0.5rem 0;
  }

  .dock-footer {
    margin-top: auto;
    padding: 1.25rem 0 max(1.25rem, env(safe-area-inset-bottom));
    gap: 0.75rem;
    text-align: center;
    font-size: 0.8rem;
    flex-direction: column;
  }

  .segment-left, .segment-right {
    justify-content: center;
  }
}

@media (max-width: 360px) {
  .site-shell {
    padding: 0 0.75rem;
  }

  .dock-core {
    padding: 2px 2px 2px 6px;
  }

  .field-icon {
    width: 15px;
    height: 15px;
    margin-right: 0.2rem;
  }

  .email-field {
    font-size: 16px;
    padding: 0.6rem 0.15rem;
  }

  .email-field::placeholder {
    font-size: 0.82rem;
  }

  .submit-pill {
    height: 42px;
    padding: 0 0.25rem 0 0.65rem;
    font-size: 0.76rem;
    gap: 0.25rem;
  }

  .icon-ring {
    width: 24px;
    height: 24px;
  }
}

/* ==========================================================================
   Accessibility: Reduced Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .luminous-orb {
    animation: none !important;
  }
}
