:root {
  --black: #050505;
  --white: #ffffff;
  --off: #f4f2ed;
  --muted: #777777;
  --line: #d8d5cd;
  --teal-900: #0a7472;
  --teal-700: #23908b;
  --teal-500: #45b5aa;
  --yellow: #f5da4f;
  --grey: #d3d3d3;
  --text-main: #0a7472;
  --text-strong: #063f3e;
  --text-soft: #23908b;
  --text-muted: #6f7776;
  --space-page: clamp(24px, 4vw, 64px);
  --space-section: clamp(48px, 7vw, 96px);
  --space-gap: clamp(28px, 5vw, 72px);
  --type-caption: 0.75rem;
  --type-small: 0.875rem;
  --type-body: 1rem;
  --type-form: 1rem;
  --type-statement: clamp(1.65rem, 2.6vw, 3rem);
  --type-intro: clamp(1.75rem, 3.1vw, 3.75rem);
  --type-heading: clamp(2.5rem, 5vw, 5.5rem);
  --leading-tight: 1.02;
  --leading-title: 0.94;
  --leading-body: 1.35;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text-main);
  background: var(--off);
  font-family: Arial, Helvetica, sans-serif;
  font-size: var(--type-body);
  line-height: var(--leading-body);
}

body[data-active-section="download"] {
  background: var(--yellow);
}

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

.page-shell {
  width: 100%;
  margin: 0;
  padding: 0;
}

.page-block {
  width: 100%;
  margin: 0;
}

.cover {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  padding: var(--space-page);
  color: var(--text-strong);
  background: var(--teal-500);
}

.cover-art {
  position: absolute;
  inset: clamp(10px, 1.6vw, 22px);
  opacity: 1;
}

.cover-content,
.manifesto,
.download-section {
  position: relative;
  z-index: 1;
}

.cover-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.kicker,
.meta,
.site-footer,
button,
label span {
  font-size: var(--type-caption);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.kicker {
  position: absolute;
  right: var(--space-page);
  bottom: var(--space-page);
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(1rem, 1.6vw, 1.55rem);
  line-height: 1.05;
  letter-spacing: 0.14em;
  text-align: left;
}

h2,
p {
  margin-top: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.cover-logo {
  position: absolute;
  z-index: 2;
  display: block;
  left: var(--space-page);
  top: 50%;
  width: min(74vw, 860px);
  height: auto;
  aspect-ratio: 574 / 153;
  margin: 0;
  padding: 0;
  background: transparent;
  transform: translateY(-50%);
}

.cover-xw-link {
  position: absolute;
  z-index: 3;
  left: var(--space-page);
  top: var(--space-page);
  display: block;
  pointer-events: auto;
}

.cover-xw-logo {
  display: block;
  width: clamp(94px, 10.4vw, 172px);
  height: auto;
}

.cover-site-link {
  position: absolute;
  left: var(--space-page);
  bottom: var(--space-page);
  color: var(--text-strong);
  font-size: var(--type-caption);
  font-weight: 700;
  line-height: 1;
  pointer-events: auto;
  text-transform: uppercase;
}

.cover-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: default;
  touch-action: manipulation;
}

.manifesto,
.download-section {
  padding: var(--space-section) var(--space-page);
  background: var(--off);
}

.manifesto {
  display: grid;
  min-height: 100svh;
  align-content: center;
  gap: var(--space-gap);
}

.meta {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--text-soft);
}

.manifesto p {
  max-width: none;
  margin-bottom: 0;
  color: var(--text-main);
  font-size: var(--type-intro);
  font-weight: 700;
  line-height: 1.6;
}

.manifesto p[data-reveal] {
  opacity: 1;
  transform: none;
}

.word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.22em);
  transition:
    opacity 460ms ease,
    transform 460ms cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: var(--word-delay);
}

.manifesto p.is-visible .word {
  opacity: 1;
  transform: translateY(0);
}

.download-section {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(300px, 1fr);
  gap: var(--space-gap);
  min-height: auto;
  background: var(--yellow);
}

.form-head {
  display: grid;
  align-content: start;
  gap: clamp(24px, 4vw, 48px);
}

.download-section h2 {
  color: var(--text-strong);
}

.form-logo {
  display: block;
  width: min(100%, 230px);
  height: auto;
  margin-bottom: calc(clamp(24px, 4vw, 48px) / -2);
}

h2 {
  margin-bottom: 0;
  color: var(--text-strong);
  font-size: var(--type-heading);
  font-weight: 700;
  line-height: var(--leading-title);
  letter-spacing: 0;
  text-transform: uppercase;
}

.lead-form {
  display: grid;
  gap: 18px;
  width: 100%;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

label {
  display: grid;
  gap: 9px;
}

input,
select {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-bottom: 1px solid var(--teal-700);
  border-radius: 0;
  padding: 0;
  color: var(--text-strong);
  background: transparent;
  font: inherit;
  font-size: var(--type-form);
}

select {
  appearance: none;
  padding-right: 24px;
  cursor: pointer;
}

input:focus,
select:focus {
  outline: 0;
  border-bottom-width: 2px;
}

input::placeholder {
  color: #9c9581;
}

.required-label::after {
  content: " *";
}

.phone-field {
  display: grid;
  grid-template-columns: minmax(120px, 0.34fr) minmax(0, 1fr);
  gap: 18px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 24px;
  color: var(--text-soft);
  font-size: var(--type-small);
  line-height: 1.35;
}

.checkbox-row input {
  width: 18px;
  min-width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--teal-900);
}

.hp-field {
  position: absolute;
  left: -100vw;
}

button {
  min-height: 58px;
  width: fit-content;
  border: 1px solid var(--teal-900);
  padding: 0 24px;
  color: var(--white);
  background: var(--teal-700);
  cursor: pointer;
  transition: background 180ms ease;
}

button:hover,
button:focus-visible {
  color: var(--white);
  background: var(--text-strong);
}

button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.form-note,
.form-message {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--type-small);
}

.form-message a {
  color: var(--teal-900);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.form-note a {
  color: var(--teal-900);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.success-dialog {
  width: min(92vw, 520px);
  border: 0;
  padding: 0;
  color: var(--text-main);
  background: transparent;
}

.success-dialog::backdrop,
.form-dialog::backdrop {
  background: rgba(5, 5, 5, 0.48);
}

.form-dialog::backdrop {
  opacity: 0;
  transition:
    opacity 360ms ease,
    overlay 360ms ease allow-discrete,
    display 360ms ease allow-discrete;
}

.form-dialog[open]::backdrop {
  opacity: 1;
}

@starting-style {
  .form-dialog[open]::backdrop {
    opacity: 0;
  }
}

.success-dialog__panel {
  position: relative;
  display: grid;
  gap: 18px;
  padding: clamp(28px, 5vw, 44px);
  background: var(--off);
}

.success-dialog__eyebrow {
  margin: 0;
  color: var(--text-soft);
  font-size: var(--type-caption);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.success-dialog h2 {
  font-size: clamp(2.25rem, 5vw, 4.25rem);
}

.success-dialog p {
  margin: 0;
  color: var(--text-muted);
}

.success-dialog__link {
  display: inline-flex;
  min-height: 54px;
  width: fit-content;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--teal-900);
  padding: 0 22px;
  color: var(--white);
  background: var(--teal-900);
  font-size: var(--type-caption);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.success-dialog__link:hover,
.success-dialog__link:focus-visible {
  color: var(--teal-900);
  background: transparent;
}

.success-dialog__close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  min-height: 40px;
  width: 40px;
  place-items: center;
  border: 0;
  padding: 0;
  color: var(--text-strong);
  background: transparent;
  font-size: 1.75rem;
  line-height: 1;
}

.form-dialog {
  width: min(94vw, 780px);
  max-height: 96vh;
  border: 0;
  padding: 0;
  color: var(--text-main);
  background: transparent;
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  transition:
    opacity 360ms ease,
    transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1),
    overlay 360ms ease allow-discrete,
    display 360ms ease allow-discrete;
}

.form-dialog__panel {
  position: relative;
  display: grid;
  gap: 16px;
  max-height: 96vh;
  overflow: auto;
  padding: clamp(22px, 4vw, 34px);
  background: var(--yellow);
}

.form-dialog h2 {
  color: var(--text-strong);
  font-size: clamp(2rem, 4.6vw, 4.25rem);
}

.lead-form--dialog {
  gap: 10px;
}

.lead-form--dialog input,
.lead-form--dialog select {
  min-height: 50px;
}

.lead-form--dialog .checkbox-row {
  padding-block: 14px;
}

.form-dialog[open] {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@starting-style {
  .form-dialog[open] {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 24px var(--space-page);
  color: var(--text-soft);
  background: var(--off);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 180ms ease, transform 180ms ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--teal-900);
  transform: translateY(-1px);
}

.footer-links svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 700ms ease,
    transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.manifesto .meta.is-visible {
  transition-delay: 80ms;
}

.manifesto p.is-visible {
  transition-delay: 180ms;
}

.form-head.is-visible {
  transition-delay: 0ms;
}

.lead-form.is-visible {
  transition-delay: 600ms;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .word {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 840px) {
  .download-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .page-shell {
    padding: 0;
  }

  .page-block {
    margin-bottom: 0;
  }

  .cover {
    min-height: 100svh;
    padding: 18px;
  }

  .cover-art {
    inset: 10px;
  }

  .cover-logo {
    left: 18px;
    top: 52%;
    width: calc(100% - 36px);
    transform: translateY(-50%);
  }

  .cover-xw-link {
    left: 18px;
    top: 18px;
  }

  .cover-xw-logo {
    width: 94px;
  }

  .cover-site-link {
    left: 18px;
    bottom: 18px;
  }

  .kicker {
    right: 18px;
    bottom: 18px;
    font-size: 0.9rem;
  }

  .manifesto,
  .download-section {
    padding: 24px 18px;
  }

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

  .phone-field {
    grid-template-columns: 1fr;
  }

  .form-dialog {
    width: 100vw;
    max-height: 100dvh;
  }

  .form-dialog__panel {
    max-height: 100dvh;
    padding: 22px 18px;
  }

  .form-dialog h2 {
    padding-right: 44px;
    font-size: 2rem;
  }

  .lead-form--dialog {
    gap: 8px;
  }

  .lead-form--dialog input,
  .lead-form--dialog select {
    min-height: 46px;
  }

  .lead-form--dialog .checkbox-row {
    padding-block: 10px;
  }

  button {
    width: 100%;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    padding-inline: 18px;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}
