/* Grove Software — coming soon
   Palette sampled from the brand mark: #49B4B1 primary, #20777D shadow. */

:root {
  --ink:        #060A0B;
  --ink-raise:  #0C1314;
  --teal:       #49B4B1;
  --teal-deep:  #20777D;
  --teal-lift:  #7FDDD9;
  --bone:       #E7EFEE;
  --bone-dim:   #8FA3A2;

  --pad-x: clamp(1.5rem, 6vw, 6.5rem);
  --pad-y: clamp(1.75rem, 5vh, 3.5rem);

  --font-display: "Sora", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-display);
  font-weight: 300;
  /* Only the horizontal axis is locked. Vertical scrolling has to stay
     available or a short viewport buries the footer with no way to reach it. */
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- backdrop ---------- */

.canopy {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Keeps the mesh off the type without dimming the whole canvas. */
.veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(70% 55% at 74% 96%, rgba(32, 119, 125, 0.30) 0%, rgba(6, 10, 11, 0) 70%),
    linear-gradient(97deg,
      var(--ink) 0%,
      rgba(6, 10, 11, 0.94) 26%,
      rgba(6, 10, 11, 0.62) 48%,
      rgba(6, 10, 11, 0.10) 76%,
      rgba(6, 10, 11, 0.34) 100%);
}

/* ---------- layout ---------- */

.shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  max-width: 90rem;
  margin-inline: auto;
  padding: var(--pad-y) var(--pad-x);
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 2rem;
}

.stage {
  display: flex;
  align-items: center;
}

.block {
  width: 100%;
  max-width: 34rem;
}

/* ---------- identity ---------- */

.mark {
  margin: 0;
  line-height: 0;
}

.mark img {
  width: clamp(13rem, 26vw, 20rem);
  height: auto;
}

.rule {
  border: 0;
  height: 1px;
  margin: clamp(1.6rem, 3.6vh, 2.6rem) 0 clamp(1.1rem, 2.4vh, 1.6rem);
  background: linear-gradient(90deg, var(--teal) 0%, rgba(73, 180, 177, 0.55) 42%, rgba(32, 119, 125, 0.22) 74%, rgba(32, 119, 125, 0) 100%);
  transform-origin: left center;
}

.eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(0.66rem, 1.05vw, 0.78rem);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--teal);
}

/* ---------- message ---------- */

.headline {
  margin: clamp(0.9rem, 2.4vh, 1.5rem) 0 0;
  font-weight: 200;
  font-size: clamp(2.9rem, 7.4vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.028em;
  color: var(--bone);
}

.lede {
  margin: clamp(1.05rem, 2.6vh, 1.6rem) 0 0;
  max-width: 27rem;
  font-size: clamp(1rem, 1.35vw, 1.12rem);
  line-height: 1.62;
  color: var(--bone-dim);
}

/* ---------- action ---------- */

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: clamp(1.7rem, 4vh, 2.6rem);
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  padding: 0.72rem 1.2rem;
  border: 1px solid rgba(73, 180, 177, 0.34);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: clamp(0.78rem, 1.1vw, 0.88rem);
  letter-spacing: 0.07em;
  color: var(--teal-lift);
  text-decoration: none;
  background: rgba(32, 119, 125, 0.08);
  transition: border-color 240ms ease, background-color 240ms ease,
              color 240ms ease, transform 240ms cubic-bezier(0.2, 0.7, 0.25, 1);
}

.link:hover,
.link:focus-visible {
  border-color: var(--teal);
  background: rgba(73, 180, 177, 0.14);
  color: #FFFFFF;
  transform: translateY(-2px);
}

.link-icon {
  flex: none;
  opacity: 0.82;
  transition: opacity 240ms ease;
}

.link:hover .link-icon,
.link:focus-visible .link-icon { opacity: 1; }

:focus-visible {
  outline: 2px solid var(--teal-lift);
  outline-offset: 3px;
}

/* ---------- footer ---------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: clamp(0.62rem, 0.9vw, 0.72rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(143, 163, 162, 0.62);
}

.foot-where { color: rgba(73, 180, 177, 0.72); }

/* ---------- entrance ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

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

/* Scoped so the hidden start state only ever applies where the animation will
   actually run. Anything that cannot honour the query renders visible. */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    animation: rise 820ms cubic-bezier(0.2, 0.7, 0.25, 1) var(--d, 0ms) both;
  }

  .rule[data-reveal] {
    animation-name: draw;
    animation-duration: 700ms;
  }

  /* The mesh is already growing behind this; the block assembles on top of it,
     identity first, then the message, then the way to reach us. */
  .mark     { --d: 240ms; }
  .rule     { --d: 560ms; }
  .eyebrow  { --d: 700ms; }
  .headline { --d: 840ms; }
  .lede     { --d: 1040ms; }
  .links    { --d: 1240ms; }
  .foot     { --d: 1440ms; }
}

/* ---------- narrow screens ---------- */

@media (max-width: 860px) {
  .veil {
    background:
      radial-gradient(78% 46% at 50% 100%, rgba(32, 119, 125, 0.32) 0%, rgba(6, 10, 11, 0) 72%),
      linear-gradient(180deg,
        rgba(6, 10, 11, 0.92) 0%,
        rgba(6, 10, 11, 0.80) 46%,
        rgba(6, 10, 11, 0.42) 78%,
        rgba(6, 10, 11, 0.72) 100%);
  }
  .block { max-width: 30rem; }
  .lede { max-width: 24rem; }
}

/* Landscape phones and short windows. Declared after the narrow-screen block
   so these win where both apply. The lede is given more width here, not less:
   at 740px a wider measure costs one fewer line, which buys back more height
   than shrinking the type does. */
@media (max-height: 620px) {
  .shell { padding-block: 1.25rem; gap: 1.25rem; }
  .mark img { width: clamp(10rem, 20vw, 15rem); }
  .rule { margin-block: 1.1rem 0.85rem; }
  .headline {
    margin-top: 0.7rem;
    font-size: clamp(2.1rem, 5.4vw, 3.6rem);
  }
  .block { max-width: 44rem; }
  .lede {
    margin-top: 0.85rem;
    max-width: 40rem;
    font-size: 0.95rem;
    line-height: 1.5;
  }
  .links { margin-top: 1.25rem; }
  .link { padding-block: 0.6rem; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .link, .link-icon { transition: none; }
  .link:hover, .link:focus-visible { transform: none; }
}
