/* ==========================================================================
   Pluvius Labs
   A single screen. Light, quiet, editorial: one typeface family (Geist),
   hairline rules, no italics. Mission and Contact open as side panels so
   the page itself never scrolls.
   ========================================================================== */

:root {
  --bg: #fbfcfd;
  --ink: #0e1726;
  --ink-2: #485669;
  --ink-3: #8a96a6;
  --line: rgba(14, 23, 38, 0.08);
  --line-2: rgba(14, 23, 38, 0.14);
  --accent: #2e6cdf;

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --pad: clamp(24px, 5vw, 72px);
}

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

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

em,
i {
  font-style: normal;
}

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

button {
  font: inherit;
  color: inherit;
}

::selection {
  background: rgba(46, 108, 223, 0.15);
}

.label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-dark {
  background: var(--ink);
  color: #fff;
}

.btn-dark:hover {
  background: #23314a;
}

.btn-line {
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-line:hover {
  border-color: var(--ink);
}

.btn .arrow {
  transition: transform 0.2s;
}

.btn:hover .arrow {
  transform: translateX(3px);
}

/* ==========================================================================
   Stage: the one and only screen
   ========================================================================== */

.stage {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
}

/* Sky layers crossfade between rain and clear */
.sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  transition: opacity 2.4s ease;
}

.sky-base {
  background: linear-gradient(180deg, #eef3f8 0%, #f7f9fb 60%, var(--bg) 100%);
}

.sky-rain {
  background:
    radial-gradient(90% 60% at 30% 0%, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #cfd9e4 0%, #e3e9f0 55%, #f3f5f8 100%);
  opacity: 0;
}

.sky-clear {
  background:
    radial-gradient(65% 80% at 84% -10%, rgba(255, 228, 178, 1) 0%, rgba(255, 240, 212, 0.6) 34%, rgba(255, 255, 255, 0) 68%),
    radial-gradient(80% 60% at 20% 0%, #ffffff 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #f3f8fd 0%, #fbfcfe 60%, #ffffff 100%);
  opacity: 0;
}

/* Soft light rays that rise when the rain stops */
.sky-rays {
  background: conic-gradient(
    from 200deg at 84% -10%,
    rgba(255, 233, 190, 0) 0deg,
    rgba(255, 233, 190, 0.35) 8deg,
    rgba(255, 233, 190, 0) 16deg,
    rgba(255, 233, 190, 0) 24deg,
    rgba(255, 233, 190, 0.25) 31deg,
    rgba(255, 233, 190, 0) 38deg,
    rgba(255, 233, 190, 0) 50deg,
    rgba(255, 233, 190, 0.2) 56deg,
    rgba(255, 233, 190, 0) 62deg
  );
  mix-blend-mode: soft-light;
  opacity: 0;
  transform: translateY(-4%);
  transition: opacity 2.8s ease, transform 4s ease;
}

.stage[data-mode="rain"] .sky-rain {
  opacity: 1;
}

.stage[data-mode="clear"] .sky-clear {
  opacity: 1;
}

.stage[data-mode="clear"] .sky-rays {
  opacity: 1;
  transform: none;
}

#rain-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

/* ---------- Top bar ---------- */

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  padding: 0 var(--pad);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.brand img {
  width: 22px;
  height: 22px;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  color: var(--ink-2);
}

.topnav button:not(.btn) {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

.topnav button:not(.btn):hover {
  color: var(--ink);
}

.topnav .btn {
  height: 38px;
  padding: 0 16px;
  font-size: 14px;
  color: var(--ink);
}

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

.hero {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 76px var(--pad) 72px;
}

.hero-title {
  margin: 22px 0 0;
  font-size: min(15.5vw, 24vh, 15rem);
  font-weight: 300;
  line-height: 0.92;
  letter-spacing: -0.06em;
  color: var(--ink);
}

.title-line {
  display: block;
  white-space: nowrap;
}

.word {
  --base: linear-gradient(var(--ink), var(--ink));
  display: inline-block;
  /* Tight tracking pushes ink past the box; pad it so the clipped
     background covers every glyph, then cancel the padding in layout */
  padding: 0 0.1em 0.08em 0;
  margin-right: -0.1em;
  margin-bottom: -0.08em;
  /* Two layers clipped to the letters: a moving light band over a fixed
     base color. The band sweeps across when the phrase changes. */
  background-image:
    linear-gradient(100deg, rgba(255, 255, 255, 0) 40%, rgba(196, 218, 255, 0.95) 50%, rgba(255, 255, 255, 0) 60%),
    var(--base);
  background-size: 260% 100%, 100% 100%;
  background-position: 100% 0, 0 0;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition:
    opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
    filter 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.word + .word {
  margin-left: 0.2em;
}

/* "rain." is water-toned */
.word-rain {
  --base: linear-gradient(100deg, #2b5fc4 0%, #3f7be0 45%, #6a66dc 100%);
}

.word.is-sheen {
  animation: sheen 1.7s cubic-bezier(0.3, 0.6, 0.2, 1) both;
}

@keyframes sheen {
  from { background-position: 100% 0, 0 0; }
  to   { background-position: 0% 0, 0 0; }
}

.word.is-hidden {
  opacity: 0;
  transform: translateY(0.16em);
  filter: blur(12px);
}

.word.is-leaving {
  opacity: 0;
  transform: translateY(-0.1em);
  filter: blur(12px);
}

.hero-lead {
  max-width: 30rem;
  margin: 34px 0 0;
  font-size: clamp(1.02rem, 1.3vw, 1.2rem);
  line-height: 1.55;
  color: var(--ink-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* ---------- Bottom bar ---------- */

.bottombar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
  padding: 0 var(--pad);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(46, 108, 223, 0.14);
  transition: background 0.8s, box-shadow 0.8s;
}

.stage[data-mode="clear"] .status-dot {
  background: #e0a33e;
  box-shadow: 0 0 0 4px rgba(224, 163, 62, 0.18);
}

.bottombar a:hover {
  color: var(--ink);
}

/* ==========================================================================
   Side panels (Mission, Contact)
   ========================================================================== */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(240, 244, 248, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.scrim.is-open {
  opacity: 1;
  pointer-events: auto;
}

.panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 21;
  width: min(600px, 100%);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: -30px 0 80px rgba(14, 23, 38, 0.08);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s linear 0.55s;
}

.panel.is-open {
  transform: none;
  visibility: visible;
  transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.panel-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  padding: 0 40px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.panel-close {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.panel-close:hover {
  border-color: var(--ink);
}

.panel-body {
  padding: 48px 40px 64px;
}

.panel h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.panel h2 .muted {
  color: var(--ink-3);
}

.panel h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.panel p {
  margin: 0;
  color: var(--ink-2);
}

.panel .block {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.panel .block > .label {
  display: block;
  margin-bottom: 14px;
}

.mission-text {
  font-size: 1.5rem !important;
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--ink) !important;
}

.gods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gods li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.gods li:nth-child(odd) {
  padding-right: 18px;
}

.gods li:nth-child(even) {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.gods strong {
  font-weight: 400;
}

.gods span {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.gods p {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.5;
}

.principles {
  display: grid;
  gap: 22px;
}

.principles .num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
}

.principles h3 {
  margin-top: 6px;
}

.principles p {
  margin-top: 4px;
  font-size: 15px;
}

.contact-email {
  display: inline-block;
  margin-top: 28px;
  padding-bottom: 4px;
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--line-2);
  transition: border-color 0.2s;
}

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

.form {
  display: grid;
  gap: 20px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.input {
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  border-radius: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}

.input:focus {
  border-bottom-color: var(--ink);
}

.input[aria-invalid="true"] {
  border-bottom-color: #b5482f;
}

textarea.input {
  min-height: 110px;
  resize: vertical;
}

select.input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238a96a6' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  cursor: pointer;
}

.field-error {
  min-height: 1em;
  font-size: 13px;
  color: #b5482f;
}

.form .btn {
  justify-self: start;
}

.form-success {
  padding: 14px 16px;
  border: 1px solid rgba(35, 130, 79, 0.25);
  border-radius: 12px;
  background: rgba(35, 130, 79, 0.06);
  color: #1d6b42 !important;
  font-size: 15px;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .topnav {
    gap: 18px;
  }

  .topnav .hide-sm,
  .bottombar .hide-sm {
    display: none;
  }

  .hero-title {
    font-size: min(19vw, 20vh);
  }

  .hero-lead {
    margin-top: 26px;
  }

  .hero-actions .btn {
    height: 46px;
    padding: 0 18px;
  }

  .panel-head,
  .panel-body {
    padding-left: 24px;
    padding-right: 24px;
  }

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

  .gods li:nth-child(n) {
    padding: 14px 0;
    border-left: 0;
  }
}

@media (max-height: 640px) {
  .hero-lead {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sky,
  .panel,
  .scrim {
    transition-duration: 0.01s;
  }

  .word {
    transition: opacity 0.3s;
    filter: none !important;
    transform: none !important;
  }

  .word.is-sheen {
    animation: none;
  }
}
