:root {
  color-scheme: dark;
  --page: #261a14;
  --surface: #302119;
  --surface-strong: #39271f;
  --text: #fff8f3;
  --muted: #fff8f3;
  --lede: #fff8f3;
  --line: rgba(255, 248, 243, 0.18);
  --accent: #c47a33;
  --accent-hover: #d9904a;
  --accent-text: #fff8f3;
  --focus: #e8b16f;
  --input: rgba(255, 248, 243, 0.06);
  --error: #e8b16f;
  --success: #c4e3bd;
  --shadow: rgba(38, 26, 20, 0.5);
  --radius-panel: 18px;
  --radius-control: 10px;
  --header-height: 72px;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Manrope", "Segoe UI", sans-serif;
}

:root[data-theme="vanilla"] {
  color-scheme: light;
  --page: #f4eee5;
  --surface: #fff8f3;
  --surface-strong: #ebe0d3;
  --text: #6f3f27;
  --muted: #70584a;
  --lede: #c47a33;
  --line: rgba(42, 28, 22, 0.2);
  --accent: #c47a33;
  --accent-hover: #a85f28;
  --accent-text: #fff8f3;
  --focus: #85401e;
  --input: rgba(42, 28, 22, 0.045);
  --error: #85401e;
  --success: #315f2a;
  --shadow: rgba(88, 48, 25, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
}

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background: var(--page);
  color: var(--text);
  font-family: var(--body);
  text-rendering: optimizeLegibility;
  transition: background-color 240ms ease, color 240ms ease;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 10px 14px;
  transform: translateY(-160%);
  border-radius: var(--radius-control);
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 clamp(18px, 3vw, 52px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--accent);
  font-family: var(--body);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.main-site-link {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.main-site-link:hover {
  color: var(--text);
}

.theme-toggle {
  min-height: 38px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

.launch-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  min-height: 100dvh;
  padding-top: var(--header-height);
}

.launch-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: clamp(36px, 5vw, 76px) clamp(22px, 6vw, 96px) 26px;
  background:
    radial-gradient(circle at 22% 16%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 32%),
    var(--page);
}

.copy-inner {
  width: min(100%, 620px);
  margin: auto 0;
}

.eyebrow {
  margin: 0 0 22px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  max-width: 650px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3.1rem, 6.2vw, 6.9rem);
  font-weight: 700;
  letter-spacing: -0.026em;
  line-height: 0.94;
  text-wrap: balance;
}

.lede {
  max-width: 520px;
  margin: 24px 0 0;
  color: var(--lede);
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  line-height: 1.55;
}

.signup-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px 12px;
  width: min(100%, 580px);
  margin-top: 34px;
}

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

.field-email {
  min-width: 0;
}

.field label {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 750;
}

.field label span {
  color: var(--accent);
}

.field label small {
  margin-left: 5px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
}

.field input,
.field select {
  width: 100%;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  outline: 0;
  background: var(--input);
  color: var(--text);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.field input::placeholder {
  color: color-mix(in srgb, var(--muted) 88%, transparent);
  opacity: 1;
}

.field select {
  appearance: auto;
}

.field select option {
  background: var(--surface);
  color: var(--text);
}

.field input:hover,
.field select:hover {
  border-color: color-mix(in srgb, var(--text) 38%, transparent);
}

.field input:focus,
.field select:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent);
}

.field input[aria-invalid="true"] {
  border-color: var(--error);
}

.field-error {
  min-height: 1em;
  margin: 0;
  color: var(--error);
  font-size: 0.75rem;
  line-height: 1.35;
}

.optional-fields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition:
    max-height 420ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 260ms ease,
    transform 260ms ease,
    visibility 0s linear 420ms;
}

.optional-fields.is-open {
  max-height: 300px;
  padding-top: 4px;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

.field-wide {
  grid-column: 1 / -1;
}

.details-toggle {
  grid-column: 1 / -1;
  justify-self: start;
  padding: 2px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.77rem;
  font-weight: 700;
}

.details-toggle:hover {
  color: var(--text);
  border-color: var(--accent);
}

.submit-button {
  align-self: start;
  min-width: 154px;
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-control);
  background: var(--accent);
  color: var(--accent-text);
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 14px 34px color-mix(in srgb, var(--accent) 26%, transparent);
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.submit-button:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.submit-button:active {
  transform: translateY(1px) scale(0.99);
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.78;
}

.submit-loading {
  display: none;
}

.submit-button.is-loading .submit-label {
  display: none;
}

.submit-button.is-loading .submit-loading {
  display: inline;
}

.form-note {
  grid-column: 1 / -1;
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 0.71rem;
  line-height: 1.45;
}

.form-status {
  grid-column: 1 / -1;
  display: none;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--success) 55%, transparent);
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--success) 10%, transparent);
  color: var(--success);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.45;
}

.form-status.is-visible {
  display: block;
}

:root[data-theme="vanilla"] .form-note,
:root[data-theme="vanilla"] .launch-footer,
:root[data-theme="vanilla"] .details-toggle {
  color: var(--accent);
}

.launch-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 38px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.launch-footer a {
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
}

.launch-visual {
  position: relative;
  min-width: 0;
  min-height: calc(100dvh - var(--header-height));
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(145deg, rgba(38, 26, 20, 0.12), rgba(38, 26, 20, 0.72)),
    url("concept-aureo-caramel-texture-web.jpg") center / cover;
}

.launch-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--page) 34%, transparent), transparent 18%),
    linear-gradient(0deg, rgba(38, 26, 20, 0.52), transparent 38%);
}

.photo {
  position: absolute;
  overflow: hidden;
  border-radius: var(--radius-panel);
  box-shadow: 0 28px 70px var(--shadow);
}

.photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
}

.photo:hover img {
  transform: scale(1.035);
}

.photo-primary {
  inset: 7% 6% 8% 15%;
  z-index: 1;
}

.photo-primary img {
  object-position: center;
}

.photo-secondary {
  right: -3%;
  bottom: 5%;
  z-index: 2;
  width: 31%;
  height: 42%;
  transform: rotate(2.5deg);
  border: 6px solid rgba(255, 248, 243, 0.9);
  box-shadow:
    0 0 0 1px rgba(255, 248, 243, 0.28),
    0 0 34px rgba(255, 248, 243, 0.24),
    0 28px 70px var(--shadow);
}

.photo-tertiary {
  top: 4%;
  left: 3%;
  z-index: 2;
  width: 26%;
  height: 35%;
  transform: rotate(-3deg);
  border: 6px solid rgba(255, 248, 243, 0.9);
  box-shadow:
    0 0 0 1px rgba(255, 248, 243, 0.28),
    0 0 34px rgba(255, 248, 243, 0.24),
    0 28px 70px var(--shadow);
}

.visual-word {
  position: absolute;
  right: -0.02em;
  bottom: -0.08em;
  z-index: 4;
  color: rgba(255, 248, 243, 0.9);
  font-family: var(--display);
  font-size: clamp(3.25rem, 7vw, 7rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 0.86;
  mix-blend-mode: screen;
  pointer-events: none;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--page);
    backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .copy-inner > *,
  .launch-footer {
    opacity: 0;
    transform: translateY(18px);
    animation: reveal 680ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  .copy-inner > :nth-child(2) {
    animation-delay: 80ms;
  }

  .copy-inner > :nth-child(3) {
    animation-delay: 150ms;
  }

  .copy-inner > :nth-child(4) {
    animation-delay: 220ms;
  }

  .launch-footer {
    animation-delay: 300ms;
  }

  .photo-primary {
    opacity: 0;
    transform: scale(1.04);
    animation: photo-reveal 900ms 120ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  .photo-secondary,
  .photo-tertiary {
    opacity: 0;
    animation: tile-reveal 800ms 360ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  .photo-tertiary {
    animation-delay: 460ms;
  }

  @keyframes reveal {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes photo-reveal {
    to {
      opacity: 1;
      transform: scale(1);
    }
  }

  @keyframes tile-reveal {
    to {
      opacity: 1;
    }
  }
}

@media (max-width: 960px) {
  :root {
    --header-height: 66px;
  }

  .launch-shell {
    grid-template-columns: 1fr;
  }

  .launch-copy {
    min-height: auto;
    padding: 46px clamp(20px, 7vw, 64px) 28px;
  }

  .copy-inner {
    width: min(100%, 720px);
    margin: 0;
  }

  h1 {
    max-width: 700px;
    font-size: clamp(3.3rem, 11vw, 6.5rem);
  }

  .launch-visual {
    min-height: 62dvh;
  }

  .photo-primary {
    inset: 7% 8% 9% 10%;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 0 16px;
  }

  .brand {
    font-size: 0.7rem;
  }

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

  .main-site-link {
    display: none;
  }

  .theme-toggle {
    font-size: 0.68rem;
  }

  .launch-copy {
    padding: 36px 18px 24px;
  }

  .eyebrow {
    margin-bottom: 18px;
  }

  h1 {
    font-size: clamp(3.2rem, 16.8vw, 5.2rem);
    line-height: 0.9;
  }

  .lede {
    margin-top: 20px;
  }

  .signup-form {
    grid-template-columns: 1fr;
    margin-top: 28px;
  }

  .submit-button {
    width: 100%;
  }

  .optional-fields {
    grid-template-columns: 1fr;
  }

  .field-wide {
    grid-column: auto;
  }

  .launch-footer {
    flex-direction: column;
    gap: 10px;
  }

  .launch-visual {
    min-height: 54dvh;
  }

  .photo-primary {
    inset: 7% 5% 8% 6%;
  }

  .photo-secondary {
    width: 35%;
    height: 40%;
  }

  .photo-tertiary {
    width: 30%;
    height: 32%;
  }

  .visual-word {
    font-size: clamp(2.8rem, 14vw, 5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
