:root {
  --bg: #edf5ee;
  --panel: #f6faf7;
  --card: #ffffff;
  --primary: #1f4235;
  --muted: #5f7569;
  --soft-gold: #b8d0b5;
  --line: rgba(31, 66, 53, 0.14);
  --shadow: rgba(26, 56, 42, 0.12);
  --desktop-surface: rgba(255, 255, 255, 0.28);
  --desktop-accent: #4f8d66;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(116, 168, 123, 0.18), transparent 24%),
    linear-gradient(135deg, #edf5ee 0%, #e3efe5 100%);
  color: var(--primary);
}

button {
  font: inherit;
}

.page-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

.brand-bar {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--soft-gold);
  border-radius: 50%;
  color: #806846;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.35rem;
}

.brand-copy {
  display: grid;
  gap: 3px;
}

.brand-name {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.2rem;
  font-weight: 600;
}

.brand-caption,
.brand-note {
  color: var(--muted);
  font-size: 0.72rem;
}

.brand-caption {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.brand-note {
  font-style: italic;
}

.desktop-view {
  display: block;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 32px;
  min-height: calc(100vh - 140px);
}

.hero-copy {
  padding-right: 12px;
}

.eyebrow {
  margin: 0 0 18px;
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  color: var(--desktop-accent);
  font-size: 0.72rem;
  font-weight: 600;
}

h1 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.02em;
  font-size: clamp(3rem, 5vw, 5rem);
  color: #221d1b;
}

.intro {
  max-width: 560px;
  margin: 24px 0 32px;
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--muted);
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: none;
  background: linear-gradient(135deg, #244f3b 0%, #2f684c 100%);
  color: #fff;
  padding: 18px 30px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 16px 28px rgba(36, 79, 59, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.primary-btn:disabled {
  cursor: wait;
  opacity: 0.82;
  transform: none;
}

.download-arrow {
  font-size: 1.2rem;
  line-height: 1;
}

.download-progress {
  width: min(100%, 310px);
  height: 4px;
  margin-top: 17px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(60, 50, 45, 0.12);
}

.download-progress[hidden] {
  display: none;
}

.progress-track,
.progress-indicator {
  display: block;
  height: 100%;
}

.progress-indicator {
  width: 38%;
  border-radius: inherit;
  background: var(--desktop-accent);
  animation: download-progress 1s ease-in-out infinite;
}

.download-status {
  min-height: 1.5em;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.download-privacy {
  max-width: 440px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

@keyframes download-progress {
  from { transform: translateX(-110%); }
  to { transform: translateX(270%); }
}

.primary-btn:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 22px 30px rgba(60, 50, 45, 0.22);
}

.preview-panel {
  display: flex;
  justify-content: center;
}

.envelope-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 430px);
  min-height: 420px;
}

.envelope {
  position: relative;
  width: min(100%, 380px);
  height: 250px;
  background: linear-gradient(180deg, #7fa68f 0%, #5d8d6e 100%);
  border-radius: 10px 10px 20px 20px;
  box-shadow: 0 26px 45px rgba(24, 54, 42, 0.14);
  overflow: hidden;
  transform: rotate(-1deg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.envelope:hover {
  transform: rotate(-1deg) translateY(-4px);
  box-shadow: 0 30px 50px rgba(32, 72, 90, 0.2);
}

.envelope::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(0,0,0,0.04));
}

.envelope::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 60%;
  background: linear-gradient(135deg, rgba(255,255,255,0.22), transparent 50%);
}

.flap {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 55%;
  background: linear-gradient(180deg, #85ad8b 0%, #5d8d6e 100%);
  clip-path: polygon(0 0, 50% 72%, 100% 0);
  box-shadow: inset 0 -12px 0 rgba(0, 0, 0, 0.04);
}

.letter {
  position: absolute;
  left: 50%;
  top: 54%;
  transform: translate(-50%, -50%);
  width: 78%;
  height: 44%;
  background: rgba(255, 248, 238, 0.25);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  display: grid;
  place-items: center;
}

.letter-mark {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.18rem;
  text-transform: uppercase;
  color: rgba(255,255,255,0.82);
  font-weight: 600;
}

.closing-message {
  text-align: center;
  margin-top: 10px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
  padding-bottom: 16px;
}

.mobile-warning {
  display: none;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 32px 20px;
}

.mobile-warning h2 {
  margin: 20px 0 10px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.5rem, 8vw, 4rem);
  line-height: 1;
  color: #2d2a29;
}

.mobile-warning p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.device-illustration {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 210px;
  height: 180px;
}

.laptop {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.screen {
  width: 170px;
  height: 110px;
  background: linear-gradient(180deg, #f9f8f5 0%, #d7e2e7 100%);
  border: 5px solid #23353f;
  border-radius: 12px 12px 8px 8px;
  position: relative;
  box-shadow: 0 14px 24px rgba(19, 40, 48, 0.12);
}

.screen-envelope {
  position: absolute;
  width: 78%;
  height: 50%;
  left: 50%;
  top: 55%;
  transform: translate(-50%, -50%);
  background: linear-gradient(180deg, #7fa68f, #5d8d6e);
  border-radius: 10px;
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.06);
}

.screen-envelope::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 58%;
  background: linear-gradient(135deg, rgba(255,255,255,0.22), transparent 55%);
  clip-path: polygon(0 0, 50% 65%, 100% 0);
}

.base {
  width: 210px;
  height: 14px;
  background: linear-gradient(180deg, #2e3e49 0%, #1d2a31 100%);
  border-radius: 0 0 18px 18px;
  position: relative;
  margin-top: -2px;
}

.base::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  top: 2px;
}

body.unsupported-device .desktop-view {
  display: none;
}

body.unsupported-device .mobile-warning {
  display: flex;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-copy {
    padding-right: 0;
  }

  .intro {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 768px) {
  .desktop-view {
    display: none;
  }

  .mobile-warning {
    display: flex;
  }
}

@media (max-width: 560px) {
  .page-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand-note {
    display: none;
  }

  .primary-btn {
    width: 100%;
  }

  .envelope-wrap {
    min-height: 340px;
  }
}

/* Confirmation Page Styles */
.confirmation-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 24px 32px;
}

.confirmation-brand {
  width: min(100%, 1200px);
  flex: 0 0 auto;
}

.confirmation-container {
  margin: auto;
  padding-top: 40px;
  padding-bottom: 36px;
}

.back-link {
  position: absolute;
  top: 24px;
  left: 24px;
  color: var(--primary);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  transition: opacity 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.back-link:hover {
  opacity: 0.7;
}

.confirmation-container {
  width: 100%;
  max-width: 600px;
  background: linear-gradient(135deg, #fffdfb 0%, #faf7f3 100%);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 50px 40px 40px;
  box-shadow: 0 24px 48px rgba(61, 45, 35, 0.15);
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.confirmation-header {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.confirmation-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #5d8d6e 0%, #3f6f50 100%);
  border-radius: 50%;
  font-size: 36px;
  font-weight: bold;
  color: white;
  box-shadow: 0 12px 24px rgba(76, 124, 90, 0.25);
}

.confirmation-title {
  margin: 0 0 16px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 600;
  color: var(--primary);
  line-height: 1.2;
  text-align: center;
}

.confirmation-eyebrow {
  margin-bottom: 12px;
  color: #4d7d60;
  text-align: center;
}

.confirmation-lede {
  max-width: 440px;
  margin: 0 auto 28px;
  color: var(--muted);
  line-height: 1.7;
  text-align: center;
}

.confirmation-content {
  margin-bottom: 32px;
}

.instruction-block {
  background: rgba(93, 141, 110, 0.06);
  border-left: 4px solid #5d8d6e;
  border-radius: 12px;
  padding: 24px 20px;
  margin-bottom: 24px;
}

.instruction-block h2 {
  margin: 0 0 20px 0;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  font-family: "Inter", sans-serif;
}

.instruction-list {
  counter-reset: instruction-step;
}

.instruction-list kbd {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fffdfb;
  color: var(--primary);
  font: inherit;
  font-size: 0.82em;
}

.instruction-list code {
  overflow-wrap: anywhere;
  color: var(--primary);
  font-size: 0.9em;
}

.instruction-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.instruction-list li {
  display: flex;
  gap: 18px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.instruction-list li:last-child {
  margin-bottom: 0;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  background: linear-gradient(135deg, #5d8d6e 0%, #3d6e51 100%);
  color: white;
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(93, 141, 110, 0.2);
}

.step-content {
  flex: 1;
}

.step-content strong {
  display: block;
  margin-bottom: 6px;
  color: var(--primary);
  font-size: 1rem;
  font-weight: 600;
}

.step-content p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.system-requirement {
  background: linear-gradient(135deg, rgba(93, 141, 110, 0.08), rgba(255, 253, 251, 0.78));
  border: 1px solid rgba(93, 141, 110, 0.2);
  border-radius: 12px;
  padding: 20px;
}

.requirement-label {
  margin: 0 0 10px 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.02em;
}

.system-requirement p:last-child {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
}

.system-requirement strong {
  color: var(--primary);
  font-weight: 600;
}

.confirmation-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.confirmation-actions .primary-btn {
  min-width: 240px;
  text-decoration: none;
}

.confirmation-footer {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

@media (max-width: 768px) {
  .confirmation-page {
    padding: 16px 16px 24px;
  }

  .back-link {
    top: 16px;
    left: 16px;
  }

  .confirmation-container {
    padding: 36px 24px 28px;
    border-radius: 16px;
  }

  .confirmation-title {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
  }

  .instruction-block {
    padding: 20px 16px;
  }

  .confirmation-actions .primary-btn {
    min-width: auto;
    width: 100%;
  }
}
