/* ==========================================================================
   CondenseBio — coming soon page
   Colors are sampled from the CondenseBio logo.
   ========================================================================== */

@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #0b3780;
  --teal: #147189;
  --aqua: #0c9cb4;
  --mint: #9cccb4;
  --ink: #1c2a44;
  --muted: #4f5f78;
  --bg: #f6f9f6;
  --card: #ffffff;

  --font-display: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html { color-scheme: light; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* ---------- Layout ---------- */

.page {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(36px, 7vh, 88px) clamp(16px, 4vw, 40px) 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(48px, 8vh, 88px);
}

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

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.logo {
  width: min(440px, 82vw);
  margin-bottom: clamp(28px, 5vh, 48px);
}

.headline {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 1rem + 3.4vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  /* Letter-spacing adds space after the last letter; nudge it back to true center */
  margin-right: -0.16em;
  color: var(--navy);
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .headline {
    background: linear-gradient(100deg, var(--navy) 0%, var(--teal) 55%, var(--aqua) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

.rule {
  display: block;
  width: 64px;
  height: 3px;
  margin: 22px auto 20px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--navy), var(--aqua), var(--mint));
}

.lede {
  margin: 0;
  max-width: 34rem;
  font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.25rem);
  line-height: 1.65;
  color: var(--muted);
}

/* ---------- Figure ---------- */

.science { width: 100%; }

.figure-card {
  margin: 0;
  padding: clamp(12px, 2.4vw, 28px);
  background: var(--card);
  border: 1px solid rgba(11, 55, 128, 0.07);
  border-radius: clamp(16px, 2vw, 24px);
  box-shadow:
    0 1px 2px rgba(16, 40, 80, 0.05),
    0 24px 60px -28px rgba(11, 55, 128, 0.30);
}

/* Side by side on larger screens: the two halves reassemble the original figure exactly. */
.figure-parts {
  display: flex;
  align-items: stretch;
}
.figure-parts img { min-width: 0; width: 0; }
.part-panel   { flex: 613 1 0; }
.part-diagram { flex: 828 1 0; }

/* Stacked on phones so each half stays readable. */
@media (max-width: 680px) {
  .figure-parts { flex-direction: column; gap: 14px; }
  .figure-parts img { width: 100%; flex: none; }
}

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

.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}

.contact h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem);
  color: var(--ink);
}

.email-pill {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 26px;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(11, 55, 128, 0.10);
  border-radius: 999px;
  box-shadow: 0 10px 30px -18px rgba(11, 55, 128, 0.35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.email-icon { flex: none; color: var(--aqua); }
.email-img { width: min(16.5rem, 62vw); }

/* ---------- 404 page ---------- */

.logo-small { width: min(300px, 70vw); }
.home-link {
  margin-top: 28px;
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
}
.home-link:hover,
.home-link:focus-visible { background: var(--teal); }

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

.footer {
  position: relative;
  z-index: 1;
  padding: 36px 16px 28px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  opacity: 0.85;
}

/* ==========================================================================
   Background: soft glows + slowly drifting condensate droplets
   ========================================================================== */

.droplets {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 45% at 50% 0%, #ffffff 0%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(ellipse 55% 45% at 0% 100%, rgba(156, 204, 180, 0.22) 0%, rgba(156, 204, 180, 0) 70%),
    radial-gradient(ellipse 45% 40% at 100% 55%, rgba(12, 156, 180, 0.09) 0%, rgba(12, 156, 180, 0) 70%);
}

.droplets span {
  position: absolute;
  display: block;
  border-radius: 50%;
  will-change: transform;
  animation: drift var(--dur, 36s) ease-in-out var(--wait, 0s) infinite alternate;
}

/* Large, blurred ambient color */
.glow { filter: blur(40px); opacity: 0.55; }
.glow-1 {
  width: 46vmax; height: 46vmax; top: -18vmax; left: -14vmax;
  background: radial-gradient(circle, rgba(12, 156, 180, 0.22), rgba(12, 156, 180, 0) 65%);
  --dx: 6vmax; --dy: 4vmax; --dur: 44s;
}
.glow-2 {
  width: 52vmax; height: 52vmax; bottom: -24vmax; right: -18vmax;
  background: radial-gradient(circle, rgba(156, 204, 180, 0.35), rgba(156, 204, 180, 0) 65%);
  --dx: -5vmax; --dy: -4vmax; --dur: 52s;
}

/* Glassy droplets, echoing the condensate in the figure */
.drop {
  background:
    radial-gradient(circle at 32% 28%,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(255, 255, 255, 0.0) 16%),
    radial-gradient(circle at 50% 50%,
      rgba(120, 214, 230, 0.28) 0%,
      rgba(12, 156, 180, 0.30) 48%,
      rgba(11, 55, 128, 0.34) 78%,
      rgba(11, 55, 128, 0.18) 100%);
  box-shadow:
    0 0 34px 6px rgba(12, 156, 180, 0.14),
    inset 0 -6px 18px rgba(11, 55, 128, 0.18);
  opacity: 0.55;
}
.drop-1 { width: clamp(90px, 13vmin, 160px); aspect-ratio: 1; top: 14%;  right: 7%;  --dx: -26px; --dy: 34px; --dur: 34s; }
.drop-2 { width: clamp(46px, 7vmin, 84px);   aspect-ratio: 1; top: 58%;  left: 4%;   --dx: 30px;  --dy: -28px; --dur: 29s; --wait: -6s; }
.drop-3 { width: clamp(22px, 3.4vmin, 40px); aspect-ratio: 1; top: 34%;  left: 13%;  --dx: 22px;  --dy: 26px; --dur: 23s; --wait: -3s; }
.drop-4 { width: clamp(56px, 8vmin, 100px);  aspect-ratio: 1; bottom: 10%; right: 12%; --dx: -34px; --dy: -22px; --dur: 38s; --wait: -12s; }
.drop-5 { width: clamp(14px, 2.2vmin, 26px); aspect-ratio: 1; top: 9%;   left: 27%;  --dx: 18px;  --dy: 20px; --dur: 21s; --wait: -8s; }
.drop-6 { width: clamp(18px, 2.8vmin, 32px); aspect-ratio: 1; top: 44%;  right: 20%; --dx: -20px; --dy: 24px; --dur: 26s; --wait: -15s; }

/* On phones, keep droplets to the edges so they never sit behind the text */
@media (max-width: 680px) {
  .drop { opacity: 0.42; }
  .droplets .drop-3, .droplets .drop-6 { display: none; }
  .drop-1 { top: 2%;  right: -34px; }
  .drop-2 { top: 64%; left: -22px; }
  .drop-4 { bottom: 4%; right: -18px; }
  .drop-5 { top: 5%;  left: 7%; }
}

@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(var(--dx), var(--dy), 0) scale(1.05); }
  100% { transform: translate3d(calc(var(--dx) * -0.6), calc(var(--dy) * 0.7), 0) scale(0.97); }
}

/* ---------- Entrance ---------- */

.reveal { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) var(--delay, 0ms) both; }
.delay-1 { --delay: 150ms; }
.delay-2 { --delay: 250ms; }
.delay-3 { --delay: 300ms; }
.delay-4 { --delay: 450ms; }
.delay-5 { --delay: 600ms; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* Respect visitors who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  .droplets span, .reveal { animation: none !important; }
}
