/* ============================================
   SteadyLayer — Global Styles
   Palette: Warm neutrals + Sage accent
   Font: DM Sans
   ============================================ */

/* ---- Custom Properties ---- */
:root {
  /* Colors */
  --color-bg: #fafaf9;
  --color-white: #ffffff;
  --color-text: #1a1a19;
  --color-text-secondary: #4a4a47;
  --color-text-muted: #8a8a85;
  --color-border: #e8e8e4;
  --color-border-light: #f0f0ec;
  --color-accent: #5b7f6e;
  --color-accent-dark: #3d5c4e;
  --color-accent-light: #e8f0ec;
  --color-accent-glow: rgba(91, 127, 110, 0.15);

  /* Spacing (4px base) */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: 0.18s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

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

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

/* ============================================
   Navigation
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 249, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.nav.scrolled {
  box-shadow: 0 1px 0 var(--color-border);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}

.nav-logo-mark {
  width: 24px;
  height: auto;
  color: var(--color-accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--color-text);
}

/* Mobile toggle */
.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all 0.25s ease;
}

.nav-mobile-toggle.active span:first-child {
  transform: rotate(45deg) translate(2.5px, 2.5px);
}

.nav-mobile-toggle.active span:last-child {
  transform: rotate(-45deg) translate(2.5px, -2.5px);
}

.nav-mobile {
  display: none;
  flex-direction: column;
  padding: var(--space-sm) var(--space-md) var(--space-md);
  gap: 2px;
}

.nav-mobile a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  padding: var(--space-sm) 0;
  transition: color var(--transition);
}

.nav-mobile a:hover {
  color: var(--color-text);
}

/* ============================================
   Hero
   ============================================ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl) var(--space-md);
  text-align: center;
  background: var(--color-bg);
}

.hero-inner {
  max-width: 740px;
}

.hero-logo-large {
  width: 48px;
  margin: 0 auto var(--space-xl);
  color: var(--color-accent);
}

.hero-headline-wrap {
  overflow: hidden;
}

.hero-headline {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--color-text);
  margin-bottom: var(--space-md);
  animation: clipReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.3s;
  opacity: 0;
}

@keyframes clipReveal {
  from {
    opacity: 0;
    clip-path: inset(0 0 100% 0);
  }
  to {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
}

.hero-sub {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-xl);
  animation: fadeInUp 0.7s ease forwards;
  animation-delay: 0.7s;
  opacity: 0;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-accent-dark);
  padding: 12px 28px;
  border: 1.5px solid var(--color-accent);
  border-radius: var(--radius-full);
  transition: all var(--transition);
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: 0.9s;
  opacity: 0;
}

.hero-cta:hover {
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
}

.cta-arrow {
  font-size: 1.1em;
  transition: transform 0.25s ease;
}

.hero-cta:hover .cta-arrow {
  transform: translateY(2px);
}

/* Hero bar stagger animation */
.hero-bar {
  opacity: 0;
  animation: barStagger 0.5s var(--ease-out-expo) forwards;
}

.hero-bar-bottom {
  animation-delay: 0s;
}

.hero-bar-middle {
  animation-delay: 0.12s;
}

.hero-bar-top {
  animation-delay: 0.24s;
}

@keyframes barStagger {
  from {
    opacity: 0;
    transform: scaleX(0.3);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

/* ============================================
   Shared Section Styles
   ============================================ */

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.section-heading {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.section-sub {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin-bottom: var(--space-xl);
}

/* ============================================
   Products — Radial Hub & Spoke
   ============================================ */

.products {
  padding: var(--space-3xl) var(--space-md);
  background: var(--color-bg);
}

.products-inner {
  max-width: 1120px;
  margin: 0 auto;
}

/* --- Radial Layout --- */
.hub-spoke-radial {
  position: relative;
  width: 100%;
  max-width: 800px;
  aspect-ratio: 1;
  margin: var(--space-2xl) auto 0;
}

/* SVG spoke lines */
.spoke-lines-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.spoke-line {
  stroke: var(--color-border);
  stroke-width: 1;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
}

/* Center Hub */
.hub-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  z-index: 10;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.hub-logo-mark {
  width: 26px;
  height: auto;
  color: var(--color-accent);
}

.hub-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

.hub-pulse-ring {
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 1.5px solid var(--color-accent);
  opacity: 0;
  pointer-events: none;
}

.hub-pulse-ring.pulse-active {
  animation: pulseRing 2.5s ease-out infinite;
}

@keyframes pulseRing {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

/* Spoke Cards (radial positioning) */
.spoke-card {
  position: absolute;
  width: 160px;
  padding: 16px 16px 20px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-align: center;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo), box-shadow 0.18s ease;
  z-index: 5;
}

.spoke-card.card-visible {
  opacity: 1;
  transform: scale(1);
}

.spoke-soon.card-visible {
  opacity: 0.55;
}

.spoke-live {
  cursor: pointer;
}

.spoke-live:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transform: scale(1) translateY(-3px);
}

/* Spoke positions (6 evenly spaced at 60° intervals) */
.spoke-card[data-spoke="0"] {
  top: 3%;
  left: 50%;
  transform: translateX(-50%) scale(0.85);
}
.spoke-card[data-spoke="0"].card-visible {
  transform: translateX(-50%) scale(1);
}
.spoke-live[data-spoke="0"]:hover {
  transform: translateX(-50%) scale(1) translateY(-3px);
}

.spoke-card[data-spoke="1"] {
  top: 18%;
  right: 2%;
  transform: scale(0.85);
}

.spoke-card[data-spoke="2"] {
  bottom: 18%;
  right: 2%;
  transform: scale(0.85);
}

.spoke-card[data-spoke="3"] {
  bottom: 3%;
  left: 50%;
  transform: translateX(-50%) scale(0.85);
}
.spoke-card[data-spoke="3"].card-visible {
  transform: translateX(-50%) scale(1);
}

.spoke-card[data-spoke="4"] {
  bottom: 18%;
  left: 2%;
  transform: scale(0.85);
}

.spoke-card[data-spoke="5"] {
  top: 18%;
  left: 2%;
  transform: scale(0.85);
}

.spoke-icon {
  width: 28px;
  height: 28px;
  margin: 0 auto 8px;
  color: var(--color-accent);
}

.spoke-name {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
  line-height: 1.2;
}

.spoke-name strong {
  font-weight: 700;
}

.spoke-vertical {
  color: var(--color-accent-dark);
}

.spoke-audience {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.spoke-tagline {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  line-height: 1.35;
}

.spoke-badge {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  margin-top: 8px;
}

.spoke-badge-live {
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
}

.spoke-badge-live.glow-active {
  box-shadow: 0 0 0 4px var(--color-accent-glow);
  animation: badgeGlow 2s ease-in-out infinite alternate;
}

@keyframes badgeGlow {
  from { box-shadow: 0 0 0 4px var(--color-accent-glow); }
  to { box-shadow: 0 0 0 8px rgba(91, 127, 110, 0.05); }
}

.spoke-badge-soon {
  background: var(--color-border-light);
  color: var(--color-text-muted);
}

/* Ghost circles for expansion hint */
.ghost-circle {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px dashed var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--color-border);
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hub-spoke-radial.revealed .ghost-circle {
  opacity: 0.5;
}

/* Ghost positions (between spokes) */
.ghost-1 { top: 8%; right: 18%; }
.ghost-2 { bottom: 8%; right: 18%; }
.ghost-3 { bottom: 8%; left: 18%; }
.ghost-4 { top: 8%; left: 18%; }

/* "More coming" text */
.more-coming {
  text-align: center;
  margin-top: var(--space-2xl);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s var(--ease-out-expo);
}

.more-coming.visible {
  opacity: 1;
  transform: translateY(0);
}

.more-coming-text {
  font-size: 1.0625rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* ============================================
   Why SteadyLayer
   ============================================ */

.why {
  padding: var(--space-3xl) var(--space-md);
  background: var(--color-white);
}

.why-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.value-card {
  padding: var(--space-lg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
  transition: all 0.5s var(--ease-out-expo);
}

/* Value card hidden states */
.value-card.anim-hidden-left {
  opacity: 0;
  transform: translateX(-40px);
}

.value-card.anim-hidden-right {
  opacity: 0;
  transform: translateX(40px);
}

.value-card.anim-visible {
  opacity: 1;
  transform: translateX(0);
}

.value-number {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.value-title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-xs);
}

.value-desc {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

/* ============================================
   Blog
   ============================================ */

.blog {
  padding: var(--space-3xl) var(--space-md);
  background: var(--color-bg);
}

.blog-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.blog-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all 0.5s var(--ease-out-expo);
}

/* Blog card hidden state */
.blog-card.anim-hidden {
  opacity: 0;
  transform: translateY(24px);
}

.blog-card.anim-visible {
  opacity: 1;
  transform: translateY(0);
}

.blog-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  transform: translateY(-2px);
}

.blog-date {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.blog-title {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-xs);
  line-height: 1.3;
}

.blog-excerpt {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}

.blog-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-accent-dark);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.blog-link::after {
  content: '\2192';
  transition: transform var(--transition);
}

.blog-link:hover {
  color: var(--color-accent-dark);
}

.blog-link:hover::after {
  transform: translateX(3px);
}

/* ============================================
   Contact
   ============================================ */

.contact {
  padding: var(--space-3xl) var(--space-md);
  background: var(--color-bg);
  text-align: center;
}

.contact-inner {
  max-width: 640px;
  margin: 0 auto;
}

.contact-text {
  font-size: 1.0625rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-top: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.contact-email {
  display: inline-block;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-accent-dark);
  letter-spacing: -0.01em;
  transition: color var(--transition);
}

.contact-email:hover {
  color: var(--color-accent);
}

/* ============================================
   Footer
   ============================================ */

.footer {
  padding: var(--space-2xl) var(--space-md) var(--space-lg);
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.footer-brand {
  margin-bottom: var(--space-xl);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.footer-logo svg {
  width: 22px;
  height: auto;
  color: var(--color-accent);
}

.footer-tagline {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.footer-links {
  display: flex;
  gap: var(--space-3xl);
  margin-bottom: var(--space-xl);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.footer-col a {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--color-text);
}

.footer-muted {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.footer-bottom {
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border-light);
}

.footer-bottom p {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.footer-bottom a {
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.footer-bottom a:hover {
  color: var(--color-text);
}

/* ============================================
   Animations — shared keyframes
   ============================================ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   Responsive
   ============================================ */

/* ---- Tablet: 2x3 grid, no radial ---- */
@media (max-width: 1024px) {
  .hub-spoke-radial {
    aspect-ratio: auto;
    max-width: 640px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    padding: 0;
  }

  .spoke-lines-svg {
    display: none;
  }

  .ghost-circle {
    display: none;
  }

  .hub-center {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    grid-column: 1 / -1;
    width: 90px;
    height: 90px;
    margin: 0 auto var(--space-sm);
  }

  .hub-pulse-ring {
    width: 90px;
    height: 90px;
  }

  .spoke-card {
    position: relative;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100%;
    transform: none !important;
    opacity: 0;
  }

  .spoke-card.card-visible {
    opacity: 1 !important;
    transform: none !important;
  }

  .spoke-soon.card-visible {
    opacity: 0.55 !important;
  }

  .spoke-live:hover {
    transform: translateY(-3px) !important;
  }

  .more-coming {
    margin-top: var(--space-xl);
  }
}

/* ---- Mobile: single column ---- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-mobile-toggle {
    display: flex;
  }

  .nav-mobile.open {
    display: flex;
  }

  .hero {
    min-height: 100vh;
    min-height: 100dvh; /* dynamic viewport height for mobile browser chrome */
    padding: calc(64px + var(--space-xl)) var(--space-md) var(--space-xl);
  }

  .hero-headline br {
    display: none;
  }

  .hub-spoke-radial {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .value-grid {
    grid-template-columns: 1fr;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .footer-links {
    flex-direction: column;
    gap: var(--space-lg);
  }

  .section-heading br {
    display: none;
  }

  /* On mobile the value-cards just fade-up instead of slide-left/right */
  .value-card.anim-hidden-left,
  .value-card.anim-hidden-right {
    transform: translateY(24px);
  }
}

@media (max-width: 480px) {
  .hero-headline {
    font-size: 2rem;
  }

  .section-heading {
    font-size: 1.5rem;
  }

  .value-card,
  .blog-card {
    padding: var(--space-md);
  }

  .spoke-card {
    padding: 14px 14px 16px;
  }
}

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

  .hero-bar {
    opacity: 1;
    transform: none;
  }

  .hero-headline {
    opacity: 1;
    transform: none;
  }

  .hero-sub {
    opacity: 1;
    transform: none;
  }

  .hero-cta {
    opacity: 1;
    transform: none;
  }

  .spoke-card {
    opacity: 1;
    transform: none;
  }

  .spoke-soon {
    opacity: 0.55;
  }

  .spoke-line {
    stroke-dashoffset: 0 !important;
  }

  .ghost-circle {
    opacity: 0.5;
  }

  .more-coming {
    opacity: 1;
    transform: none;
  }

  .value-card,
  .blog-card {
    opacity: 1;
    transform: none;
  }
}
