/* ─── TOKENS ─── */
:root {
  --bg:           #E6DFD1;
  --surface:      #EDE7DA;
  --surface-up:   #F4F0E8;
  --ink:          #1A1410;
  --ink-mid:      #5A4A40;
  --ink-light:    #9A8A80;
  --ember:        #9C3420;
  --ember-dim:    #7A2818;
  --ember-pale:   rgba(156, 52, 32, 0.08);
  --border:       #C4B6A8;
  --border-light: #D8CFC4;
  --serif:        'Cormorant Garamond', Georgia, serif;
  --sans:         'Jost', sans-serif;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 300;
  overflow-x: hidden;
}

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 56px;
  background: rgba(230, 223, 209, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
}

.logo {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
}

.logo sup {
  font-size: 10px;
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ember);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  vertical-align: super;
  margin-left: 4px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 40px;
  align-items: center;
}

nav a {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--ink-mid);
  text-decoration: none;
  transition: color 0.2s;
}

nav a:hover { color: var(--ink); }

.nav-cta {
  color: var(--ember) !important;
  border-bottom: 1px solid var(--ember);
  padding-bottom: 1px;
  transition: opacity 0.2s !important;
}

.nav-cta:hover { opacity: 0.75; }

/* ─── HERO ─── */
.hero-wrapper {
  max-width: 1280px;
  margin: 0 auto;
}

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 120px 56px 80px;
  gap: 80px;
}

.hero-copy { max-width: 520px; }

.hero-eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 28px;
  opacity: 0;
  animation: riseIn 0.7s ease forwards 0.15s;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(48px, 5.5vw, 76px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
  opacity: 0;
  animation: riseIn 0.8s ease forwards 0.3s;
}

.hero h1 em {
  font-style: italic;
  color: var(--ember);
}

.hero-body {
  font-size: 17px;
  font-weight: 300;
  color: var(--ink-mid);
  line-height: 1.75;
  margin-bottom: 44px;
  max-width: 420px;
  opacity: 0;
  animation: riseIn 0.8s ease forwards 0.5s;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 32px;
  opacity: 0;
  animation: riseIn 0.7s ease forwards 0.65s;
}

.btn-primary {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--ember);
  color: #FFF8F4;
  padding: 14px 30px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s, transform 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--ember-dim);
  transform: translateY(-1px);
}

.hero-link {
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
  color: var(--ink-mid);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}

.hero-link:hover {
  color: var(--ink);
  border-color: var(--ink-light);
}

/* ─── ENVELOPE ─── */
.envelope-scene {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 380px;
  position: relative;
  opacity: 0;
  animation: riseIn 1s ease forwards 0.2s;
}

.envelope-wrap {
  position: relative;
  width: 340px;
  height: 340px;
  display: flex;
  align-items: flex-end;
}

.env-letter {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 148px;
  background: var(--surface-up);
  border: 1px solid var(--border);
  padding: 22px 24px 20px;
  z-index: 2;
  transform: translateY(70px);
  animation: letterRise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 1.6s forwards;
  box-shadow: 0 4px 20px rgba(26, 20, 16, 0.10);
}

.env-letter-to {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 4px;
}

.env-letter-to span {
  color: var(--ink-mid);
}

.env-letter-rule {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 12px 0;
}

.env-letter-body {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink);
}

.env-letter-body em {
  font-style: italic;
  color: var(--ember);
}

.env-letter-sig {
  font-family: var(--serif);
  font-size: 14px;
  font-style: italic;
  color: var(--ink-light);
  margin-top: 14px;
}

.envelope {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 230px;
  z-index: 3;
}

.env-body-bg {
  position: absolute;
  inset: 0;
  background: var(--surface);
  border: 1px solid var(--border);
}

.env-fold-left {
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 0 115px 170px;
  border-color: transparent transparent var(--surface-up) transparent;
  opacity: 0.6;
}

.env-fold-right {
  position: absolute;
  bottom: 0; right: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 115px 0 0 170px;
  border-color: transparent transparent transparent var(--surface-up);
  opacity: 0.6;
}

.env-fold-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 115px;
  background: var(--surface);
  clip-path: polygon(0% 100%, 50% 0%, 100% 100%);
}

.env-flap {
  position: absolute;
  top: 0; left: -1px; right: -1px;
  height: 115px;
  background: var(--surface-up);
  border: 1px solid var(--border);
  clip-path: polygon(0% 0%, 100% 0%, 50% 100%);
  transform-origin: top center;
  animation: flapMorph 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.7s forwards;
  z-index: 5;
}

.env-flap-line {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--border);
  z-index: 6;
  opacity: 0;
  animation: fadeIn 0.4s ease 1.4s forwards;
}

.env-shadow {
  position: absolute;
  bottom: -8px;
  left: 12px; right: 12px;
  height: 12px;
  background: rgba(26, 20, 16, 0.08);
  filter: blur(8px);
  z-index: 1;
}

/* ─── DIVIDER ─── */
.divider {
  padding: 0 56px;
  max-width: 1280px;
  margin: 0 auto;
}

.divider-inner {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
  display: flex;
  align-items: center;
  gap: 32px;
}

.divider-rule {
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

.divider-quote {
  font-family: var(--serif);
  font-size: 18px;
  font-style: italic;
  font-weight: 300;
  color: var(--ink-mid);
  text-align: center;
  flex-shrink: 0;
}

/* ─── SECTION BASE ─── */
.section {
  padding: 96px 56px;
  max-width: 1280px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--ember);
  display: block;
}

h2 {
  font-family: var(--serif);
  font-size: clamp(38px, 4vw, 56px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

h2 em {
  font-style: italic;
  color: var(--ember);
}

/* ─── PROBLEM ─── */
.problem-bg {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.problem-grid {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 80px;
  align-items: start;
  margin-top: 56px;
}

.problem-text p {
  font-size: 16px;
  font-weight: 300;
  color: var(--ink-mid);
  line-height: 1.85;
  margin-bottom: 18px;
}

.problem-text p strong {
  color: var(--ink);
  font-weight: 400;
}

.inbox-preview {
  background: var(--surface-up);
  border: 1px solid var(--border);
  overflow: hidden;
}

.inbox-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.inbox-dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-close  { background: #E8A090; }
.dot-min    { background: #E8D490; }
.dot-max    { background: #A0C890; }

.inbox-title {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--ink-light);
  margin-left: auto;
  margin-right: auto;
}

.inbox-row {
  display: grid;
  grid-template-columns: 140px 1fr 60px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  gap: 16px;
  transition: background 0.15s;
  cursor: default;
}

.inbox-row:hover { background: var(--surface); }
.inbox-row:last-child { border-bottom: none; }

.inbox-row.unread .ir-from    { font-weight: 500; color: var(--ink); }
.inbox-row.unread .ir-subject { font-weight: 500; color: var(--ink); }

.ir-from {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-mid);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ir-subject {
  font-size: 13px;
  color: var(--ink-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ir-subject strong {
  color: var(--ink-mid);
  font-weight: 400;
}

.ir-time {
  font-size: 11px;
  color: var(--ink-light);
  text-align: right;
  white-space: nowrap;
}

.inbox-unread-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ember);
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
}

/* ─── SERVICES ─── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 56px;
}

.email-card {
  background: var(--surface-up);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}

.email-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(26, 20, 16, 0.1);
}

.ec-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
}

.ec-dot-row {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.ec-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border);
}

.ec-field {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: var(--ink-light);
  padding: 3px 0;
  border-bottom: 1px solid var(--border-light);
}

.ec-field:last-child { border-bottom: none; }

.ec-field-label {
  flex-shrink: 0;
  font-family: var(--sans);
  letter-spacing: 0.04em;
}

.ec-field-val { color: var(--ink-mid); }

.ec-body { padding: 24px; }

.ec-num {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 10px;
}

.ec-title {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 14px;
}

.ec-desc {
  font-size: 14px;
  font-weight: 300;
  color: var(--ink-mid);
  line-height: 1.75;
  margin-bottom: 22px;
}

.ec-includes {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.ec-includes li {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 300;
  color: var(--ink-light);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.ec-includes li::before {
  content: '—';
  color: var(--ember);
  flex-shrink: 0;
}

/* ─── PROCESS ─── */
.process-bg {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 56px;
  border: 1px solid var(--border);
  background: var(--border);
}

.step {
  background: var(--surface-up);
  padding: 36px 28px;
}

.step-num {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 20px;
}

.step-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 10px;
}

.step-desc {
  font-size: 14px;
  font-weight: 300;
  color: var(--ink-mid);
  line-height: 1.7;
}

/* ─── CTA ─── */
.cta-outer {
  padding: 96px 56px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.cta-outer .section-label {
  justify-content: center;
}

.cta-outer .section-label::before { display: none; }

.cta-outer h2 { margin-bottom: 16px; }

.cta-sub {
  font-size: 17px;
  font-weight: 300;
  color: var(--ink-mid);
  line-height: 1.7;
  margin-bottom: 52px;
}

.compose-window {
  background: var(--surface-up);
  border: 1px solid var(--border);
  text-align: left;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(26, 20, 16, 0.12);
}

.compose-bar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}

.compose-dots { display: flex; gap: 6px; }

.compose-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.cd-1 { background: #E8A090; }
.cd-2 { background: #E8D490; }
.cd-3 { background: #A0C890; }

.compose-title {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--ink-mid);
  text-align: center;
}

.compose-send {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--ember);
  color: #FFF8F4;
  border: none;
  padding: 8px 20px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s;
}

.compose-send:hover { background: var(--ember-dim); }

.compose-send-wrap {
  position: relative;
  display: inline-block;
}

.compose-send-wrap .tooltip {
  position: absolute;
  bottom: calc(100% + 14px);
  right: 0;
  background: var(--ink);
  color: var(--surface-up);
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  font-weight: 300;
  white-space: nowrap;
  padding: 7px 14px;
  pointer-events: none;
  opacity: 1;
  animation: tooltipFloat 3s ease-in-out infinite;
}

.compose-send-wrap .tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 18px;
  border: 6px solid transparent;
  border-top-color: var(--ink);
}

/* ─── STICKY NOTE ─── */
.cta-outer {
  position: relative;
}

.sticky-note {
  position: absolute;
  top: 360px;
  right: -85px;
  width: 110px;
  background: #F5EEC8;
  border: 1px solid #D4C97A;
  padding: 12px 14px 16px;
  box-shadow: 2px 3px 10px rgba(26, 20, 16, 0.12);
  transform: rotate(2.5deg) translateX(-40px);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
  pointer-events: none;
}

.sticky-note.visible {
  transform: rotate(2.5deg) translateX(0);
  opacity: 1;
}

.sticky-note span {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink-mid);
  display: block;
  margin-bottom: 10px;
}

.sticky-arrow {
  width: 40px;
  height: 24px;
  display: block;
  transform: scaleX(-1) rotate(-10deg);
  margin-top: 4px;
}

/* Tape strip at top */
.sticky-note::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 16px;
  background: rgba(230, 223, 209, 0.7);
  border: 1px solid var(--border-light);
}

@keyframes tooltipFloat {
  0%,  100% { transform: translateY(0px);  }
  50%        { transform: translateY(-4px); }
}

.compose-fields { border-bottom: 1px solid var(--border); }

.compose-field {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-light);
}

.compose-field:last-child { border-bottom: none; }

.cf-label {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-light);
  letter-spacing: 0.06em;
  width: 72px;
  flex-shrink: 0;
}

.cf-value {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-mid);
  flex: 1;
}

.cf-cursor {
  display: inline-block;
  width: 1px;
  height: 14px;
  background: var(--ember);
  vertical-align: middle;
  margin-left: 1px;
  animation: blink 1.1s step-end infinite;
}

.compose-body {
  padding: 28px 24px 36px;
  min-height: 200px;
}

.compose-body p {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 300;
  line-height: 1.8;
  color: var(--ink-mid);
}

.compose-body p + p { margin-top: 18px; }
.compose-body .salutation { color: var(--ink); font-weight: 400; }
.compose-body .highlight   { color: var(--ink); font-weight: 400; }
.compose-body .sig         { font-style: italic; color: var(--ink-light); margin-top: 28px; }

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
}

.footer-logo {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}

.footer-copy {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 300;
  color: var(--ink-light);
  letter-spacing: 0.04em;
}

/* ─── SCROLL REVEAL ─── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ─── KEYFRAMES ─── */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

@keyframes letterRise {
  to { transform: translateY(0); }
}

@keyframes flapMorph {
  0%   { clip-path: polygon(0% 0%, 100% 0%, 50% 100%); background: var(--surface-up); }
  50%  { clip-path: polygon(0% 0%, 100% 0%, 50% 50%); }
  100% { clip-path: polygon(0% 0%, 100% 0%, 50% 0%);   background: var(--surface); }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 960px) {
  nav { padding: 18px 24px; }
  nav ul { display: none; }
  .hero { grid-template-columns: 1fr; padding: 100px 24px 60px; gap: 60px; }
  .envelope-scene { height: 300px; }
  .section { padding: 72px 24px; }
  .divider { padding: 0 24px; }
  .problem-grid { grid-template-columns: 1fr; gap: 40px; }
  .services-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr 1fr; }
  .cta-outer { padding: 72px 24px; }
  .sticky-note { display: none; }
  footer { flex-direction: column; gap: 12px; text-align: center; padding: 24px; }
}