/* ===== RESET ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===== VARIABLES ===== */
:root {
  --parchment: #F2E8D5;
  --oxblood: #6B1A1A;
  --gold: #C9A84C;
  --ink: #1A1412;
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== BASE ===== */
html, body {
  height: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  background: #1A1412;
  color: var(--ink);
  overflow: auto;
}

/* ===== BACKGROUND ===== */
.bg {
  position: fixed;
  inset: 0;
  background-image: url('design/assets/background.png');
  background-size: cover;
  background-position: center;
  z-index: 0;
  opacity: 0;
  animation: bg-fade 0.8s var(--ease-out) forwards;
}

@keyframes bg-fade {
  to { opacity: 1; }
}

/* ===== LAYOUT — MOBILE ===== */
.page {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100svh;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 2.5rem 1.5rem 11rem;
  position: relative;
  z-index: 3;
}

/* Readability veil — FIXED to viewport so it never shifts while scrolling */
.content::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100svh;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(242, 232, 213, 0.95) 0%,
    rgba(242, 232, 213, 0.92) 45%,
    rgba(242, 232, 213, 0.55) 75%,
    rgba(242, 232, 213, 0) 100%
  );
}

/* arm-col — MOBILE: arm rising from bottom, centered */
.arm-col {
  position: fixed;
  bottom: -22%;
  left: 50%;
  transform: translateX(-50%);
  width: 82vw;
  max-width: 380px;
  z-index: 5;
  pointer-events: none;
}

/* ===== SMOKE CLOUDS — MOBILE ===== */
.smoke {
  position: fixed;
  z-index: 1;
  pointer-events: none;
  opacity: 0.95;
  display: block;
}

.smoke-1 {
  top: -20%;
  left: -10%;
  width: 110%;
}

.smoke-2 {
  bottom: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 130%;
}

.smoke-3 {
  display: none;
}

.smoke-4 {
  top: 35%;
  left: -5%;
  width: 80%;
}

/* ===== SMOKE ANIMATIONS ===== */
@keyframes smoke-1-exit {
  from { opacity: 0.95; transform: translate(0, 0); }
  to   { opacity: 0.08; transform: translate(-130px, -90px); }
}

@keyframes smoke-2-exit {
  from { opacity: 0.95; transform: translateX(-50%) translateY(0); }
  to   { opacity: 0;    transform: translateX(-50%) translateY(180px); }
}

@keyframes smoke-3-exit {
  from { opacity: 0.95; transform: translate(0, 0); }
  to   { opacity: 0;    transform: translate(160px, -60px); }
}

@keyframes smoke-4-exit {
  from { opacity: 0.95; transform: translate(0, 0); }
  to   { opacity: 0.08; transform: translate(-70px, 110px); }
}

.smoke-1 { animation: smoke-1-exit 1.6s var(--ease-out) 0.80s forwards; }
.smoke-2 { animation: smoke-2-exit 1.6s var(--ease-out) 0.90s forwards; }
.smoke-3 { animation: smoke-3-exit 1.6s var(--ease-out) 0.85s forwards; }
.smoke-4 { animation: smoke-4-exit 1.6s var(--ease-out) 0.80s forwards; }

/* ===== WORDMARK ===== */
.wordmark {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ===== HEADLINE ===== */
.headline {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(3.5rem, 13vw, 8rem);
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.headline em {
  font-style: italic;
  color: var(--oxblood);
}

/* ===== BODY COPY ===== */
.body-copy {
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(26, 20, 18, 0.85);
  font-style: italic;
}

/* ===== FORM ZONE (reserves height so success swap doesn't shrink column) ===== */
.form-zone {
  position: relative;
}

.form-zone.submitted .email-form {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease-out);
}

/* ===== EMAIL FORM ===== */
.email-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.form-label {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 1rem;
}

.form-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  border-bottom: 2px solid var(--ink);
  transition: border-color 0.25s;
}

.form-row:focus-within {
  border-bottom-color: var(--oxblood);
}

.email-form input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 0.85rem 0;
  border: none;
  border-radius: 0;
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--ink);
  outline: none;
}

.email-form input[type="email"]::placeholder {
  color: rgba(26, 20, 18, 0.5);
  font-style: italic;
}

.email-form button[type="submit"] {
  flex-shrink: 0;
  padding: 0.85rem 0 0.85rem 1.5rem;
  min-height: 44px;
  background: transparent;
  color: var(--ink);
  border: none;
  border-radius: 0;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.25s, letter-spacing 0.25s;
}

.email-form button[type="submit"]:hover {
  color: var(--oxblood);
  letter-spacing: 0.28em;
}

.email-form button[type="submit"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-error {
  font-size: 0.78rem;
  color: var(--oxblood);
  font-style: italic;
  min-height: 1.2em;
  margin-top: 0.4rem;
}

/* ===== SUCCESS STATE (overlays the form within .form-zone) ===== */
.form-success {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  line-height: 1.6;
  font-style: italic;
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
}

.form-success.visible {
  pointer-events: auto;
  animation: content-reveal 0.6s var(--ease-out) 0.2s forwards;
}

/* ===== ARM (harm2.png) — single hero visual ===== */
.arm-img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0;
  animation: arm-reveal 0.8s var(--ease-out) 2.0s both;
}

@keyframes arm-reveal {
  from { opacity: 0; transform: translateY(60px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== CONTENT REVEAL ===== */
@keyframes content-reveal {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wordmark {
  opacity: 0;
  animation: content-reveal 0.6s var(--ease-out) 1.0s both;
}

.headline {
  opacity: 0;
  animation: content-reveal 0.6s var(--ease-out) 1.2s both;
}

.body-copy {
  opacity: 0;
  animation: content-reveal 0.6s var(--ease-out) 1.5s both;
}

.email-form {
  opacity: 0;
  animation: content-reveal 0.6s var(--ease-out) 1.7s both;
}

/* ===== FOOTNOTE ===== */
.footnote {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(26, 20, 18, 0.55);
  opacity: 0;
  animation: content-reveal 0.6s var(--ease-out) 1.9s both;
}

.cta-reading {
  display: inline-block;
  align-self: flex-start;
  padding: 0.8rem 1.5rem;
  background: transparent;
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid rgba(107, 26, 26, 0.5);
  border-radius: 2px;
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out),
              border-color 0.3s var(--ease-out), letter-spacing 0.3s var(--ease-out);
  opacity: 0;
  animation: content-reveal 0.6s var(--ease-out) 1.7s both;
}

.cta-reading:hover {
  background: var(--oxblood);
  color: var(--parchment);
  border-color: var(--oxblood);
  letter-spacing: 0.26em;
}

/* ===== DESKTOP ===== */
@media (min-width: 641px) {
  body {
    overflow: hidden;
  }

  .page {
    grid-template-columns: 55fr 45fr;
    min-height: 100vh;
    align-items: center;
  }

  .content {
    gap: 1.5rem;
    padding: clamp(2rem, 5vw, 5rem);
    background: linear-gradient(
      to right,
      rgba(242, 232, 213, 0.88) 0%,
      rgba(242, 232, 213, 0.88) 40%,
      rgba(242, 232, 213, 0) 88%
    );
  }

  .content::before {
    display: none;
  }

  .body-copy {
    font-size: 1.15rem;
    max-width: 38ch;
  }

  .email-form {
    max-width: 420px;
  }

  /* Arm — centered in right column, rising from the bottom */
  .arm-col {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    transform: none;
    width: auto;
    max-width: none;
    height: auto;
    align-self: stretch;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-right: 11vw;
    overflow: hidden;
  }

  .arm-img {
    width: auto;
    height: 140vh;
    max-width: none;
    flex-shrink: 0;
    margin-bottom: -50vh;
  }

  /* Smoke — desktop sizes */
  .smoke-1 { width: 90%; top: -20%; left: -10%; }
  .smoke-2 { width: 115%; }
  .smoke-3 { display: block; top: 5%; right: -15%; width: 65%; }
  .smoke-4 { width: 65%; top: 25%; }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .bg,
  .wordmark,
  .headline,
  .body-copy,
  .email-form,
  .cta-reading,
  .footnote,
  .arm-img {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .smoke-1,
  .smoke-4 {
    animation: none !important;
    opacity: 0.08 !important;
    transform: translate(-60px, -40px) !important;
  }

  .smoke-2,
  .smoke-3 {
    animation: none !important;
    opacity: 0 !important;
  }
}
