/* =========================================================
   Crazy Good Enterprises — homepage
   Palette sampled directly from assets/logo.png
   ========================================================= */

:root {
  /* Navy family (background is deeper than the logo fill for contrast) */
  --navy-900: #0a1420; /* page background */
  --navy-850: #0d1b2a;
  --navy-800: #14212f; /* raised surfaces */
  --navy-700: #1d2c3a; /* logo fill tone, borders */
  --navy-600: #2a3d50;

  /* Accents sampled from the logo strokes */
  --cyan: #37daed;
  --cyan-glow: #73feff;
  --magenta: #e33273;
  --magenta-glow: #fe83e4;

  /* Text */
  --text: #eaf1f7;
  --text-dim: #9fb2c4;
  --text-faint: #6d8298;

  /* Shape + motion */
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1120px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --shadow-cyan: 0 0 0 1px rgba(55, 218, 237, 0.5),
    0 8px 40px -8px rgba(55, 218, 237, 0.45);
  --shadow-magenta: 0 0 0 1px rgba(227, 50, 115, 0.5),
    0 8px 40px -8px rgba(227, 50, 115, 0.45);
}

/* ---------- Reset-ish ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial,
    sans-serif;
  color: var(--text);
  background: var(--navy-900);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute;
  left: 50%;
  top: -60px;
  transform: translateX(-50%);
  background: var(--cyan);
  color: var(--navy-900);
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 700;
  z-index: 200;
  transition: top 0.2s var(--ease);
}
.skip-link:focus {
  top: 0;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Ambient background ---------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(29, 44, 58, 0.9), transparent 70%),
    var(--navy-900);
}
.ambient__blob {
  position: absolute;
  width: 46vmax;
  height: 46vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.22;
  will-change: transform;
}
.ambient__blob--cyan {
  background: radial-gradient(circle, var(--cyan) 0%, transparent 65%);
  top: -12vmax;
  left: -10vmax;
  animation: drift-a 26s ease-in-out infinite alternate;
}
.ambient__blob--magenta {
  background: radial-gradient(circle, var(--magenta) 0%, transparent 65%);
  bottom: -14vmax;
  right: -10vmax;
  animation: drift-b 32s ease-in-out infinite alternate;
}

@keyframes drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(8vmax, 6vmax, 0) scale(1.15); }
}
@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.1); }
  to   { transform: translate3d(-7vmax, -5vmax, 0) scale(1); }
}

/* ---------- Layout primitives ---------- */
.site-header,
.hero,
.ventures,
.site-footer {
  padding-left: clamp(1.25rem, 5vw, 3rem);
  padding-right: clamp(1.25rem, 5vw, 3rem);
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
}
.brand__mark {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 0 10px rgba(55, 218, 237, 0.35));
}
.brand__name {
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.site-header__tagline {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  text-align: center;
  padding-top: clamp(2.5rem, 8vw, 6rem);
  padding-bottom: clamp(3rem, 9vw, 7rem);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero__logo {
  width: clamp(150px, 34vw, 260px);
  height: auto;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  filter: drop-shadow(0 0 24px rgba(55, 218, 237, 0.28))
    drop-shadow(0 0 40px rgba(227, 50, 115, 0.22));
  animation: float 7s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.hero__headline {
  font-size: clamp(2.1rem, 6.2vw, 4.2rem);
  font-weight: 800;
  max-width: 16ch;
}
.grad-text {
  background: linear-gradient(100deg, var(--cyan) 0%, var(--magenta) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 34px rgba(55, 218, 237, 0.25);
}
.hero__subhead {
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  color: var(--text-dim);
  margin: 1.1rem 0 0;
}
.hero__scroll {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: clamp(2rem, 5vw, 3rem);
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--navy-600);
  border-radius: 999px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.98rem;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease),
    box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.hero__scroll:hover,
.hero__scroll:focus-visible {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 24px -6px rgba(55, 218, 237, 0.6);
  transform: translateY(-2px);
}
.hero__scroll-icon {
  animation: nudge 1.8s ease-in-out infinite;
}
@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ---------- Section head ---------- */
.ventures {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-bottom: clamp(3.5rem, 9vw, 7rem);
}
.section-head {
  text-align: center;
  margin-bottom: clamp(2rem, 5vw, 3.25rem);
}
.section-head__title {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 800;
}
.section-head__lead {
  color: var(--text-dim);
  margin: 0.6rem 0 0;
  font-size: clamp(1rem, 2vw, 1.15rem);
}

/* ---------- Tiles ---------- */
.tiles {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .tiles {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: clamp(1.4rem, 3vw, 2rem);
  background: linear-gradient(180deg, var(--navy-800), var(--navy-850));
  border: 1px solid var(--navy-700);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}
/* Neon accent bar echoing the logo strokes */
.tile::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  opacity: 0.65;
  transition: opacity 0.3s var(--ease);
}
.tile:hover,
.tile:focus-within {
  transform: translateY(-6px);
}
.tile:hover::before,
.tile:focus-within::before {
  opacity: 1;
}
/* Per-venture glow accent */
.tile--threads:hover,
.tile--threads:focus-within {
  border-color: var(--cyan);
  box-shadow: var(--shadow-cyan);
}
.tile--life:hover,
.tile--life:focus-within {
  border-color: var(--magenta);
  box-shadow: var(--shadow-magenta);
}
.tile--art:hover,
.tile--art:focus-within {
  border-color: var(--cyan-glow);
  box-shadow: 0 0 0 1px rgba(115, 254, 255, 0.5),
    0 8px 40px -8px rgba(227, 50, 115, 0.4);
}

.tile__body {
  flex: 1;
}
.tile__name {
  font-size: 1.4rem;
  font-weight: 700;
}
.tile__desc {
  color: var(--text-dim);
  margin: 0.6rem 0 0;
  font-size: 0.98rem;
}

.tile__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.1rem;
  padding: 0.65rem 1.15rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy-900);
  background: linear-gradient(100deg, var(--cyan), var(--cyan-glow));
  border-radius: 999px;
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease),
    filter 0.25s var(--ease);
}
.tile__cta:hover,
.tile__cta:focus-visible {
  box-shadow: 0 0 26px -4px rgba(55, 218, 237, 0.75);
  transform: translateY(-2px);
  filter: brightness(1.05);
}

/* Social links row */
.tile__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.tile__links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--navy-600);
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 0.88rem;
  font-weight: 600;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease),
    background 0.25s var(--ease), transform 0.2s var(--ease);
}
.tile__links a:hover,
.tile__links a:focus-visible {
  color: var(--text);
  border-color: var(--cyan);
  background: rgba(55, 218, 237, 0.08);
  transform: translateY(-2px);
}
.tile--life .tile__links a:hover,
.tile--life .tile__links a:focus-visible {
  border-color: var(--magenta);
  background: rgba(227, 50, 115, 0.1);
}
.icon {
  flex-shrink: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  text-align: center;
  padding-top: clamp(2rem, 5vw, 3rem);
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
  border-top: 1px solid var(--navy-700);
}
.site-footer__mark {
  width: 40px;
  height: 40px;
  margin: 0 auto 0.9rem;
  opacity: 0.85;
}
.site-footer__tagline {
  margin: 0;
  font-weight: 600;
  color: var(--text);
}
.site-footer__legal {
  margin: 0.5rem 0 0;
  color: var(--text-faint);
  font-size: 0.85rem;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
