/* /windee: the software WindReserve runs on and sells. Inside <main> the page
   takes the product's own look (after atlan-innovation.com/windee); header and
   footer stay WindReserve's. pageCss loads windee-sections and the two
   walkthrough sheets after this one, which defines their custom properties. */

@font-face {
  font-family: "Merriweather";
  src: url("/fonts/merriweather-300-normal.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* Georgia resized to Merriweather's metrics, so the swap does not reflow the
   hero and move the demo button. Values from the product page. */
@font-face {
  font-family: "Merriweather Fallback";
  src: local("Georgia");
  size-adjust: 106.5%;
  ascent-override: 92%;
  descent-override: 25%;
  line-gap-override: 0%;
}

/* ---------- Palette ----------
   Scoped to <main>, and this file loads only on /windee, so the header and
   footer keep WindReserve's tokens. The site's semantic names are redefined
   so shared components inside main follow along. */

main {
  --windee-night: #05100d;
  --windee-storm: #001f17;
  --windee-forest: #014230;
  --windee-pine: #016647;
  --windee-green: #01ae70;
  --windee-green-hover: #26cc9b;
  --windee-green-wash: #e6f9f2;
  --windee-paper: #fff6ef;
  --windee-white: #ffffff;
  --windee-ink: #10241c;
  --windee-mist: #5b6a63;
  --windee-line: rgba(16, 36, 28, 0.14);
  --windee-line-soft: rgba(16, 36, 28, 0.08);
  --windee-on-dark: rgba(255, 255, 255, 0.92);
  --windee-on-dark-muted: rgba(255, 255, 255, 0.64);
  --windee-on-dark-line: rgba(255, 255, 255, 0.24);
  --windee-fault: #c2410c;
  --windee-fault-wash: #fff1e8;
  --windee-leave: #92400e;
  --windee-leave-wash: #fef3c7;
  --windee-glow-core: rgba(1, 174, 112, 0.3);
  --windee-glow-halo: rgba(1, 174, 112, 0.1);
  --windee-glow-none: rgba(1, 174, 112, 0);
  --windee-shadow-tint: rgba(0, 31, 23, 0.06);
  --windee-shadow-tint-deep: rgba(0, 31, 23, 0.28);

  --color-ground: var(--windee-paper);
  --color-surface: var(--windee-white);
  --color-surface-sunk: var(--windee-paper);
  --color-ink: var(--windee-ink);
  --color-ink-soft: var(--windee-mist);
  --color-ink-faint: var(--windee-mist);
  --color-border: var(--windee-line);
  /* The focus ring (base.css) is drawn in --color-accent. The product green
     is 2.7:1 on paper, under the 3:1 a ring needs, so the ring takes pine
     (6.6:1) and the green is kept for fills, where the dark ink on it is 6:1. */
  --color-accent: var(--windee-pine);
  --color-accent-text: var(--windee-pine);
  --color-accent-wash: var(--windee-green-wash);
  --color-accent-ink: var(--windee-storm);

  --windee-fill: var(--windee-green);
  --windee-fill-hover: var(--windee-green-hover);
  --windee-rule-soft: var(--windee-line-soft);
  /* Avatars, the PDF badge and the question bubble in the mock app. */
  --windee-chrome: var(--windee-forest);
  --windee-chrome-ink: var(--windee-white);
  --windee-alert: var(--windee-fault);
  --windee-alert-wash: var(--windee-fault-wash);
  --windee-away: var(--windee-leave);
  --windee-away-wash: var(--windee-leave-wash);
  --windee-shadow-window:
    0 1px 2px var(--windee-shadow-tint),
    0 24px 48px -24px var(--windee-shadow-tint-deep);

  --windee-font-serif: "Merriweather", "Merriweather Fallback", Georgia, serif;
  --windee-text-2xs: 0.6875rem;
  --windee-text-step: 1.25rem;
  --windee-text-lead: clamp(1.0625rem, 1.2vw + 0.8rem, 1.3125rem);
  --windee-text-statement: clamp(2.125rem, 3.6vw + 1.25rem, 4rem);
  --windee-text-figure: clamp(2.75rem, 4vw + 1.5rem, 4.5rem);
  --windee-text-hero: clamp(2rem, 6.4vw + 0.75rem, 5.5rem);
  --windee-leading-hero: 1.06;
  --windee-leading-step: 1.3;
  --windee-leading-serif: 1.7;
  --windee-tracking-hero: -0.02em;
  --windee-tracking-statement: -0.015em;
  --windee-weight-light: 300;

  --windee-space-section: clamp(5rem, 10vw, 9rem);
  --windee-width-text: 38rem;
  --windee-width-hero: 52rem;
  --windee-width-window: 36rem;
  --windee-radius-window: 1rem;
  --windee-radius-tail: 0.1875rem;

  background: var(--color-ground);
  color: var(--color-ink);
}

/* The product page is light between a dark opener and close; in a dark
   scheme the same hues are carried down to its night ground. Pairs measured:
   ink 16:1, soft ink 8:1 on night; light green text 8.4:1 on the window. */
@media (prefers-color-scheme: dark) {
  main {
    --windee-on-dark-rule: rgba(255, 255, 255, 0.14);
    --windee-on-dark-rule-soft: rgba(255, 255, 255, 0.08);
    --windee-fault-on-dark: #ff9a62;
    --windee-fault-wash-on-dark: rgba(194, 65, 12, 0.22);
    --windee-leave-on-dark: #fcd34d;
    --windee-leave-wash-on-dark: rgba(146, 64, 14, 0.3);
    --windee-green-wash-on-dark: rgba(1, 174, 112, 0.16);

    --color-ground: var(--windee-night);
    --color-surface: var(--windee-storm);
    --color-surface-sunk: var(--windee-night);
    --color-ink: var(--windee-on-dark);
    --color-ink-soft: var(--windee-on-dark-muted);
    --color-ink-faint: var(--windee-on-dark-muted);
    --color-border: var(--windee-on-dark-rule);
    --color-accent: var(--windee-green);
    --color-accent-text: var(--windee-green-hover);
    --color-accent-wash: var(--windee-green-wash-on-dark);

    --windee-rule-soft: var(--windee-on-dark-rule-soft);
    /* Forest is 1.5:1 against the storm window; pine still carries white at 7:1. */
    --windee-chrome: var(--windee-pine);
    --windee-alert: var(--windee-fault-on-dark);
    --windee-alert-wash: var(--windee-fault-wash-on-dark);
    --windee-away: var(--windee-leave-on-dark);
    --windee-away-wash: var(--windee-leave-wash-on-dark);
  }
}

/* The opener and the close are dark in either scheme. Restating ground and
   accent here puts the focus ring's inner gap on storm and its ring in green
   (6:1) instead of a paper halo on a dark band. */
.wr-windee-hero,
.wr-windee-close {
  --color-ground: var(--windee-storm);
  --color-accent: var(--windee-green);
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

/* base.css hyphenates body copy, which split the brand names into "Win-dee"
   and "WindRe-serve". Words under twelve letters stay whole. */
main p,
main li,
main dd {
  hyphenate-limit-chars: 12;
}

/* ---------- Isobars ---------- */

.wr-windee-isobars {
  --windee-isobars-overscan: -6%;
  --windee-isobars-opacity: 0.16;
  position: absolute;
  inset: var(--windee-isobars-overscan);
  z-index: -1;
  inline-size: calc(100% - 2 * var(--windee-isobars-overscan));
  block-size: calc(100% - 2 * var(--windee-isobars-overscan));
  max-inline-size: none;
  object-fit: cover;
  opacity: var(--windee-isobars-opacity);
  pointer-events: none;
}

/* Mirrored and fainter, so the close is not a repeat of the opener. */
.wr-windee-isobars--close {
  --windee-isobars-opacity: 0.08;
  transform: scaleX(-1);
}

/* ---------- Opener ---------- */

.wr-windee-hero {
  --windee-hero-min: auto;
  --windee-bloom-size: 90vmax;
  --windee-bloom-right: -20%;
  --windee-bloom-bottom: -45%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-block-size: var(--windee-hero-min);
  background: linear-gradient(
    180deg,
    var(--windee-night) 0%,
    var(--windee-storm) 45%,
    var(--windee-forest) 100%);
  color: var(--windee-on-dark);
}

.wr-windee-hero__bloom {
  position: absolute;
  inset-inline-end: var(--windee-bloom-right);
  inset-block-end: var(--windee-bloom-bottom);
  z-index: -1;
  inline-size: var(--windee-bloom-size);
  block-size: var(--windee-bloom-size);
  background: radial-gradient(
    circle,
    var(--windee-glow-core) 0%,
    var(--windee-glow-halo) 40%,
    var(--windee-glow-none) 70%);
  pointer-events: none;
}

/* Tight on a phone: title, lede and the demo button have to fit one 640px
   screen under a two-row header, so the hero only takes a minimum height
   where there is room for it. */
.wr-windee-hero__body {
  padding-block: var(--space-6) var(--space-7);
}

@media (min-width: 40rem) {
  .wr-windee-hero {
    --windee-hero-min: min(88svh, 56rem);
  }

  .wr-windee-hero__body {
    padding-block: var(--space-8) clamp(var(--space-7), 10vh, 7rem);
  }
}

.wr-windee-hero__brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-block-end: var(--space-4);
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  color: var(--windee-white);
}

.wr-windee-hero__mark {
  inline-size: var(--space-5);
  block-size: var(--space-5);
}

.wr-windee-hero__title {
  max-inline-size: var(--windee-width-hero);
  font-family: var(--windee-font-serif);
  font-size: var(--windee-text-hero);
  font-weight: var(--windee-weight-light);
  line-height: var(--windee-leading-hero);
  letter-spacing: var(--windee-tracking-hero);
  color: var(--windee-white);
}

/* Not the product's muted .64 white: over the green bloom and an isobar line
   that measures 3:1. The .92 white keeps 4.6:1 at that worst spot. */
.wr-windee-hero__lede {
  max-inline-size: var(--windee-width-text);
  margin-block-start: var(--space-4);
  font-size: var(--windee-text-lead);
  line-height: var(--leading-normal);
  color: var(--windee-on-dark);
}

.wr-windee-hero__secondary {
  font-weight: var(--weight-medium);
  color: var(--windee-on-dark);
  text-decoration: underline;
  text-decoration-color: var(--windee-on-dark-line);
  text-underline-offset: 0.3em;
  transition: color var(--motion-fast) var(--ease);
}

.wr-windee-hero__secondary:hover {
  color: var(--windee-white);
}

@media (min-width: 40rem) {
  .wr-windee-hero__lede {
    margin-block-start: var(--space-5);
  }
}

/* ---------- The demo button ---------- */

.wr-windee-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4) var(--space-6);
  margin-block-start: var(--space-5);
}

@media (min-width: 40rem) {
  .wr-windee-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    margin-block-start: var(--space-6);
  }
}

/* No shadow of its own, so the site's focus ring (a box-shadow, base.css)
   applies unchanged. Storm on green is 6:1. */
.wr-windee-action {
  --windee-action-height: 3.25rem;
  display: inline-flex;
  align-items: center;
  min-block-size: var(--windee-action-height);
  padding-inline: var(--space-6);
  border-radius: var(--radius-full);
  background: var(--windee-fill);
  color: var(--color-accent-ink);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  transition: background-color var(--motion-base) var(--ease);
}

.wr-windee-action:hover {
  background: var(--windee-fill-hover);
}

/* ---------- Section openers ---------- */

.wr-windee-heading {
  max-inline-size: var(--windee-width-hero);
  font-family: var(--windee-font-serif);
  font-size: var(--windee-text-statement);
  font-weight: var(--windee-weight-light);
  line-height: var(--leading-tight);
  letter-spacing: var(--windee-tracking-statement);
  color: var(--color-ink);
}

.wr-windee-aside {
  max-inline-size: var(--windee-width-text);
  margin-block-start: var(--space-4);
  font-size: var(--windee-text-lead);
  line-height: var(--leading-normal);
  color: var(--color-ink-soft);
}
