/* ============================================
   UMOYA — Coming Soon
   Brand-Aligned Stylesheet
   "The Warm Systems Architect"
   ============================================ */

/* --- Brand Tokens --- */
:root {
  /* Primary: Burnt Terracotta */
  --clr-primary: #C44A14;
  --clr-primary-light: #D4612E;
  --clr-primary-dark: #A33A0A;
  --clr-primary-glow: rgba(196, 74, 20, 0.25);
  --clr-primary-subtle: rgba(196, 74, 20, 0.08);

  /* Secondary: Deep Midnight */
  --clr-secondary: #1A1A2E;

  /* Backgrounds */
  --clr-bg: #0B0B16;
  --clr-bg-elevated: #111122;
  --clr-surface: #161630;
  --clr-surface-hover: #1C1C3A;

  /* Accent: Mineral Teal */
  --clr-accent: #0D4F4F;
  --clr-accent-light: #1A8A7A;
  --clr-accent-glow: rgba(13, 79, 79, 0.25);

  /* Text */
  --clr-text: #F5F1EB;
  --clr-text-secondary: #9B9BB0;
  --clr-text-dim: #5C5C74;

  /* Functional */
  --clr-border: rgba(255, 255, 255, 0.06);
  --clr-border-hover: rgba(255, 255, 255, 0.12);
  --clr-error: #E5484D;
  --clr-success: #30A46C;

  /* Typography */
  --ff-display: 'Space Grotesk', system-ui, sans-serif;
  --ff-body: 'DM Sans', system-ui, sans-serif;

  /* Spacing Scale */
  --sp-2xs: 0.125rem;
  --sp-xs: 0.25rem;
  --sp-sm: 0.5rem;
  --sp-md: 1rem;
  --sp-lg: 1.5rem;
  --sp-xl: 2rem;
  --sp-2xl: 3rem;
  --sp-3xl: 4rem;
  --sp-4xl: 6rem;
  --sp-5xl: 8rem;

  /* Radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 9999px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 150ms;
  --dur-normal: 300ms;
  --dur-slow: 600ms;
}

/* --- Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--ff-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--clr-text);
  background: var(--clr-bg);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input {
  font: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
}

/* --- Accessibility: Screen Reader Only --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Accessibility: Skip Link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-md);
  padding: var(--sp-sm) var(--sp-lg);
  background: var(--clr-primary);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--r-md);
  z-index: 9999;
  transition: top var(--dur-fast) var(--ease-out);
}

.skip-link:focus {
  top: var(--sp-md);
  outline: 2px solid var(--clr-primary-light);
  outline-offset: 2px;
}

/* --- Canvas Background --- */
#particle-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* --- Texture Overlay --- */
.texture-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.025;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 1px,
      rgba(255,255,255,0.03) 1px,
      rgba(255,255,255,0.03) 2px
    );
  background-size: 100% 3px;
}

/* --- Vignette --- */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 70% 60% at 50% 50%,
    transparent 0%,
    rgba(11, 11, 22, 0.4) 70%,
    rgba(11, 11, 22, 0.85) 100%
  );
}

/* --- Structural Framing Lines --- */
.frame-line {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--clr-border);
  z-index: 2;
  pointer-events: none;
}

.frame-line::before,
.frame-line::after {
  content: '';
  position: absolute;
  left: -3px;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: var(--clr-bg);
}

.frame-line::before { top: 10%; }
.frame-line::after { bottom: 10%; }

.frame-line--left { left: 2.5rem; }
.frame-line--right { right: 2.5rem; }

@media (max-width: 900px) {
  .frame-line { display: none; }
}

/* --- Page Layout --- */
.page {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: var(--sp-lg) var(--sp-xl);
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 600px) {
  .page {
    padding: var(--sp-md);
  }
}

/* --- Navigation --- */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-sm) 0;
  margin-bottom: var(--sp-lg);
  opacity: 0;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  cursor: default;
}

.nav__bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
  padding-bottom: 2px;
}

.nav__bar {
  width: 2.5px;
  border-radius: 2px;
  background: var(--clr-primary);
  transition: height var(--dur-slow) var(--ease-spring);
}

.nav__bar:nth-child(1) { height: 35%; }
.nav__bar:nth-child(2) { height: 55%; }
.nav__bar:nth-child(3) { height: 80%; }
.nav__bar:nth-child(4) { height: 100%; }
.nav__bar:nth-child(5) { height: 85%; }
.nav__bar:nth-child(6) { height: 60%; }
.nav__bar:nth-child(7) { height: 40%; }

.nav__brand:hover .nav__bar:nth-child(1) { height: 55%; }
.nav__brand:hover .nav__bar:nth-child(2) { height: 75%; }
.nav__brand:hover .nav__bar:nth-child(3) { height: 95%; }
.nav__brand:hover .nav__bar:nth-child(4) { height: 85%; }
.nav__brand:hover .nav__bar:nth-child(5) { height: 100%; }
.nav__brand:hover .nav__bar:nth-child(6) { height: 80%; }
.nav__brand:hover .nav__bar:nth-child(7) { height: 60%; }

.nav__wordmark {
  font-family: var(--ff-display);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clr-text);
}

.nav__status {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-xs) var(--sp-md);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-full);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clr-text-secondary);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav__pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--clr-primary);
  position: relative;
}

.nav__pulse::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--clr-primary);
  opacity: 0;
  animation: pulse-ring 2.5s ease-out infinite;
}

@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* --- Hero --- */
.hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-xl);
  max-width: 760px;
  width: 100%;
}

.hero__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--clr-primary);
  box-shadow: 0 0 20px var(--clr-primary-glow), 0 0 40px var(--clr-primary-glow);
  opacity: 0;
}

.hero__headline {
  font-family: var(--ff-display);
  font-size: clamp(2.5rem, 7vw, 5.25rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--clr-text);
}

.hero__headline em {
  font-style: normal;
  color: var(--clr-primary);
}

.hero__body {
  font-size: clamp(0.9375rem, 1.8vw, 1.125rem);
  font-weight: 300;
  line-height: 1.75;
  color: var(--clr-text-secondary);
  max-width: 540px;
  opacity: 0;
}

/* --- Countdown --- */
.countdown {
  display: flex;
  align-items: center;
  gap: var(--sp-lg);
  padding: var(--sp-lg) var(--sp-2xl);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-xl);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
}

.countdown__segment {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2xs);
  min-width: 60px;
}

.countdown__value {
  font-family: var(--ff-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 400;
  line-height: 1;
  color: var(--clr-text);
  font-variant-numeric: tabular-nums;
  min-width: 2ch;
  text-align: center;
}

.countdown__label {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--clr-text-dim);
}

.countdown__sep {
  font-family: var(--ff-display);
  font-size: 1.5rem;
  color: var(--clr-text-dim);
  margin-top: -1.25rem;
  user-select: none;
}

/* --- Subscribe Form --- */
.subscribe {
  width: 100%;
  max-width: 520px;
  opacity: 0;
}

.subscribe__row {
  display: flex;
  gap: var(--sp-sm);
  padding: var(--sp-xs);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-lg);
  transition:
    border-color var(--dur-normal) var(--ease-out),
    box-shadow var(--dur-normal) var(--ease-out);
}

.subscribe__row:focus-within {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px var(--clr-primary-glow), 0 4px 24px rgba(0,0,0,0.3);
}

.subscribe__row.has-error {
  border-color: var(--clr-error);
  box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.15);
}

.subscribe__row.is-success {
  border-color: var(--clr-success);
  box-shadow: 0 0 0 3px rgba(48, 164, 108, 0.15);
}

.subscribe__input {
  flex: 1;
  padding: var(--sp-md) var(--sp-lg);
  font-size: 0.9375rem;
  background: transparent;
  color: var(--clr-text);
  min-width: 0;
}

.subscribe__input::placeholder {
  color: var(--clr-text-dim);
}

.subscribe__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-md) var(--sp-xl);
  background: var(--clr-primary);
  border-radius: var(--r-md);
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  transition:
    background var(--dur-normal) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-normal) var(--ease-out);
  box-shadow: 0 2px 8px rgba(196, 74, 20, 0.2);
}

.subscribe__btn:hover {
  background: var(--clr-primary-light);
  box-shadow: 0 4px 16px rgba(196, 74, 20, 0.3);
}

.subscribe__btn:active {
  transform: scale(0.97);
}

.subscribe__btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.subscribe__btn-icon {
  width: 16px;
  height: 16px;
  transition: transform var(--dur-normal) var(--ease-out);
}

.subscribe__btn:hover .subscribe__btn-icon {
  transform: translateX(3px);
}

.subscribe__msg {
  margin-top: var(--sp-sm);
  padding: 0 var(--sp-sm);
  font-size: 0.8125rem;
  min-height: 1.4em;
  line-height: 1.4;
}

.subscribe__msg--error {
  color: var(--clr-error);
}

.subscribe__msg--success {
  color: var(--clr-success);
}

/* --- Footer --- */
.footer {
  padding: var(--sp-xl) 0 var(--sp-sm);
  margin-top: auto;
  opacity: 0;
}

.footer__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-lg);
}

.footer__info {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  font-size: 0.8125rem;
  color: var(--clr-text-dim);
}

.footer__sep {
  opacity: 0.4;
}

.footer__tagline {
  font-style: italic;
}

.footer__social {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--clr-border);
  border-radius: var(--r-md);
  color: var(--clr-text-dim);
  transition:
    color var(--dur-normal) var(--ease-out),
    border-color var(--dur-normal) var(--ease-out),
    background var(--dur-normal) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}

.footer__social-link svg {
  width: 16px;
  height: 16px;
}

.footer__social-link:hover {
  color: var(--clr-primary);
  border-color: var(--clr-primary);
  background: var(--clr-primary-subtle);
  transform: translateY(-2px);
}

.footer__social-link:focus-visible {
  outline: 2px solid var(--clr-primary);
  outline-offset: 2px;
}

/* --- Contact Link --- */
.footer__contact {
  display: flex;
  align-items: center;
}

.footer__contact-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-xs) var(--sp-md);
  font-size: 0.8125rem;
  color: var(--clr-text-dim);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-full);
  transition: all var(--dur-normal) var(--ease-out);
}

.footer__contact-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.footer__contact-link:hover {
  color: var(--clr-primary);
  border-color: var(--clr-primary);
  background: var(--clr-primary-subtle);
}

.footer__contact-link:focus-visible {
  outline: 2px solid var(--clr-primary);
  outline-offset: 2px;
}

/* --- Focus Visible --- */
:focus-visible {
  outline: 2px solid var(--clr-primary);
  outline-offset: 2px;
}

/* --- Selection --- */
::selection {
  background: rgba(196, 74, 20, 0.3);
  color: var(--clr-text);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--clr-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--clr-surface);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--clr-text-dim);
}

/* --- 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;
  }
}

/* --- Responsive Fine-Tuning --- */
@media (max-width: 600px) {
  .countdown {
    gap: var(--sp-md);
    padding: var(--sp-md) var(--sp-lg);
  }

  .countdown__segment {
    min-width: 48px;
  }

  .countdown__value {
    font-size: 1.5rem;
  }

  .subscribe__row {
    flex-direction: column;
  }

  .subscribe__btn {
    justify-content: center;
    padding: var(--sp-md);
  }

  .hero__headline {
    letter-spacing: -0.02em;
  }

  .nav {
    margin-bottom: var(--sp-lg);
  }

  .footer__row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-md);
  }
}

@media (min-width: 601px) and (max-width: 900px) {
  .hero__headline {
    font-size: clamp(2.5rem, 6vw, 4rem);
  }
}
