/* CloudHaven.works — single stylesheet, no build step. */

:root {
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --background: oklch(0.16 0.026 254);
  --foreground: oklch(0.96 0.008 240);
  --primary: oklch(0.82 0.15 196);
  --primary-foreground: oklch(0.16 0.04 250);
  --secondary: oklch(0.26 0.035 254);
  --muted-foreground: oklch(0.68 0.025 245);
  --destructive: oklch(0.62 0.22 22);
  --surface: oklch(0.19 0.028 254);
  --hairline: oklch(0.98 0.01 240 / 8%);

  --gradient-aurora: linear-gradient(120deg, oklch(0.82 0.15 196) 0%, oklch(0.76 0.13 220) 45%, oklch(0.7 0.17 300) 100%);
  --gradient-veil: radial-gradient(120% 80% at 50% 0%, oklch(0.82 0.15 196 / 18%) 0%, transparent 60%);
  --shadow-panel: 0 40px 120px -40px oklch(0.1 0.03 254 / 90%);
}

/* ---------- Base ---------- */

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

html { scroll-behavior: smooth; }

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; }
h1, h2 { text-wrap: balance; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }

.container { max-width: 72rem; margin-inline: auto; padding-inline: 1.5rem; }
.muted { color: var(--muted-foreground); }
.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.text-aurora {
  background-image: var(--gradient-aurora);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.panel {
  background-color: color-mix(in oklab, var(--surface) 82%, transparent);
  border: 1px solid var(--hairline);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-panel);
}

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--primary);
}
.eyebrow--muted { color: var(--muted-foreground); }

.lead { font-size: 1.125rem; line-height: 1.625; color: var(--muted-foreground); }
.small { font-size: 0.875rem; line-height: 1.625; color: var(--muted-foreground); }

/* ---------- Backdrop ---------- */

.backdrop { position: absolute; inset-inline: 0; top: 0; height: 720px; pointer-events: none; }
.veil { background-image: var(--gradient-veil); }
.grid-lines {
  opacity: 0.4;
  background-image:
    linear-gradient(to right, var(--hairline) 1px, transparent 1px),
    linear-gradient(to bottom, var(--hairline) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: linear-gradient(to bottom, black, transparent);
  mask-image: linear-gradient(to bottom, black, transparent);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 500 0.875rem/1.25rem var(--font-sans);
  cursor: pointer;
  transition: transform 0.15s, color 0.15s, border-color 0.15s;
}
.btn--primary { background-image: var(--gradient-aurora); color: var(--primary-foreground); }
.btn--primary:hover { transform: translateY(-2px); }
.btn--primary:disabled { opacity: 0.5; transform: none; cursor: default; }
.btn--ghost { background: transparent; border-color: var(--hairline); color: var(--muted-foreground); }
.btn--ghost:hover { border-color: oklch(0.82 0.15 196 / 40%); color: var(--foreground); }
.btn--block { width: 100%; padding-block: 1rem; font-size: 1rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--hairline);
  background: color-mix(in oklab, var(--background) 70%, transparent);
  backdrop-filter: blur(24px);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 4rem; }

.brand { display: flex; align-items: center; gap: 0.75rem; }
/* The wordmark is inlined so it inherits `color`; it follows the theme
   automatically, including a light mode added later. */
.brand__logo {
  height: 1.375rem;
  width: auto;
  flex: none;                 /* never let the flex row stretch or squash it */
  color: var(--foreground);
}
.brand__logo--small { height: 0.875rem; color: var(--muted-foreground); }

.nav {
  display: none;
  align-items: center;
  gap: 2rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.nav a { transition: color 0.15s, background-color 0.15s; }
.nav a:hover { color: var(--primary); }
.nav .nav__cta {
  padding: 0.5rem 1rem;
  border: 1px solid oklch(0.82 0.15 196 / 40%);
  border-radius: 999px;
  color: var(--primary);
}
.nav .nav__cta:hover { background: oklch(0.82 0.15 196 / 10%); }

/* ---------- Hero ---------- */

.hero { position: relative; padding-top: 6rem; padding-bottom: 5rem; }
.hero__copy { max-width: 48rem; }
.hero h1 { margin-top: 2rem; font-size: 3rem; line-height: 0.95; font-weight: 600; }
.hero .lead { margin-top: 2rem; max-width: 36rem; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 2.5rem; }
.hero__figure {
  position: relative;
  margin-top: 4rem;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 1.5rem;
}
.hero__figure img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }
.hero__figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--background), color-mix(in oklab, var(--background) 20%, transparent), transparent);
}

/* ---------- Vision ---------- */

.vision { border-block: 1px solid var(--hairline); padding-block: 6rem; }
.vision__grid { display: grid; gap: 4rem; }
.vision__title { margin-top: 2rem; font-size: 1.875rem; line-height: 1.25; font-weight: 500; }
.vision__side { display: grid; gap: 2.5rem; }
.vision__side .lead, .vision__side .small { margin-top: 1.5rem; }
.rule { height: 1px; background: var(--hairline); }

/* ---------- Sections ---------- */

.section { padding-block: 6rem; }
.section__head { margin-bottom: 4rem; }
.section__head h2 { margin-top: 1.5rem; font-size: 2.25rem; font-weight: 600; }
.section__head p { margin-top: 1.5rem; max-width: 42rem; font-size: 1.125rem; color: var(--muted-foreground); }

.pillars { display: grid; gap: 1.5rem; }
.card { display: grid; gap: 1rem; padding: 2rem; border-radius: 1.25rem; transition: background-color 0.15s; }
.card:hover, .value:hover { background-color: color-mix(in oklab, var(--secondary) 50%, transparent); }
.card__bar { width: 3rem; height: 0.25rem; margin-bottom: 1rem; border-radius: 999px; background-image: var(--gradient-aurora); }
.card h3 { font-size: 1.25rem; font-weight: 500; }
.card p { line-height: 1.625; color: var(--muted-foreground); }

.values {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 1.25rem;
  background: var(--hairline);
}
.value { display: grid; align-content: start; gap: 1rem; padding: 2rem; border: 0; transition: background-color 0.15s; }
.value__index { font: 0.75rem var(--font-mono); color: var(--primary); }
.value h3 { font-size: 1.125rem; font-weight: 500; }
.value p { font-size: 0.875rem; line-height: 1.625; color: var(--muted-foreground); }

/* ---------- Contact ---------- */

.contact { position: relative; overflow: hidden; border-top: 1px solid var(--hairline); }
.contact > .veil { position: absolute; inset: 0; pointer-events: none; }
.contact__inner { position: relative; padding-block: 7rem; }
.contact__head { margin-bottom: 4rem; text-align: center; }
.contact__head h2 { font-size: 2.25rem; font-weight: 600; }
.contact__head p { max-width: 36rem; margin: 1.5rem auto 0; font-size: 1.125rem; color: var(--muted-foreground); }

.form { display: grid; gap: 1.5rem; max-width: 36rem; margin-inline: auto; padding: 2rem; border-radius: 1.25rem; }
.form__row { display: grid; gap: 1.5rem; }
.field { display: grid; gap: 0.5rem; font-size: 0.875rem; font-weight: 500; }
.field input, .field textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--hairline);
  border-radius: 1rem;
  background: transparent;
  color: var(--foreground);
  font: 400 1rem var(--font-sans);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted-foreground); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.form__error { font-size: 0.875rem; color: var(--destructive); }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form--sent { justify-items: center; gap: 0; padding: 2.5rem; text-align: center; }
.form__dot { width: 3rem; height: 3rem; margin-bottom: 1.5rem; border-radius: 999px; background-image: var(--gradient-aurora); }
.form--sent h3 { font-size: 1.5rem; font-weight: 600; }
.form--sent p { margin-top: 0.75rem; color: var(--muted-foreground); }
.form--sent .btn { margin-top: 1.5rem; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--hairline); padding-block: 3rem; }
.site-footer__inner { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 1.5rem; }

/* ---------- Motion ---------- */

.fade-up { animation: fade-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) both; }
.drift { animation: drift 18s ease-in-out infinite; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.55; }
  50% { transform: translate3d(2%, -3%, 0) scale(1.08); opacity: 0.8; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-up, .drift { animation: none; }
}

/* ---------- ≥ 768px ---------- */

@media (min-width: 768px) {
  .nav { display: flex; }
  .hero { padding-top: 9rem; padding-bottom: 7rem; }
  .hero h1 { font-size: 4.5rem; }
  .hero .lead, .vision__side > div:first-child .lead { font-size: 1.25rem; }
  .hero__figure { margin-top: 6rem; }
  .vision { padding-block: 9rem; }
  .vision__grid { grid-template-columns: 1fr 1fr; gap: 6rem; }
  .vision__title { font-size: 3rem; }
  .section { padding-block: 9rem; }
  .section__head { margin-bottom: 6rem; }
  .section__head h2 { font-size: 3rem; }
  .pillars { grid-template-columns: 1fr 1fr; }
  .values { grid-template-columns: repeat(5, 1fr); }
  .contact__inner { padding-block: 10rem; }
  .contact__head { margin-bottom: 5rem; }
  .contact__head h2 { font-size: 3.75rem; }
  .form { padding: 2.5rem; }
  .form__row { grid-template-columns: 1fr 1fr; }
  .field input, .field textarea { font-size: 0.875rem; }
  .site-footer__inner { flex-direction: row; }
}
