/* =============================================================================
   Open Hearts — Contact page
   Palette: #0f2040 · #1e3a6e · #2d5fa8 · #f0f4ff · #0f172a · #64748b · white
   + #fffbe6 (note-paper)  + rgba(255,235,140,0.65) (washi)
   Ease: cubic-bezier(.2, .8, .2, 1)
   ============================================================================= */

/* ── Keyframes ────────────────────────────────────────────────────── */
@keyframes ctOrbA {
  from { transform: translate(0,0); }
  to   { transform: translate(60px,40px); }
}
@keyframes ctOrbB {
  from { transform: translate(0,0); }
  to   { transform: translate(-50px,-30px); }
}
@keyframes ctMountUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ctWordReveal {
  to { transform: translateY(0); }
}
@keyframes ctDrawLine {
  to { width: 56px; }
}

/* ── Shared eyebrow row ───────────────────────────────────────────── */
.ct-ey {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.ct-ey__line {
  display: inline-block;
  width: 0;
  height: 1px;
  flex-shrink: 0;
  vertical-align: middle;
}
.ct-ey__text {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── 1. Hero ribbon ───────────────────────────────────────────────── */
.ct-hero {
  position: relative;
  background: #0f2040;
  padding: 140px 40px 130px;
  overflow: hidden;
}

.ct-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.ct-orb--a {
  top: -30%; left: 10%;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(45,95,168,0.45), transparent 65%);
  filter: blur(40px);
  animation: ctOrbA 14s ease-in-out infinite alternate;
}
.ct-orb--b {
  bottom: -40%; right: 5%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(30,58,110,0.6), transparent 60%);
  filter: blur(50px);
  animation: ctOrbB 18s ease-in-out infinite alternate;
}

.ct-hero__wm {
  position: absolute;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-serif);
  font-size: clamp(220px, 28vw, 440px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  color: rgba(255,255,255,0.05);
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  z-index: 0;
}

.ct-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
}

/* Hero eyebrow */
.ct-hero__ey {
  opacity: 0;
  margin-bottom: 24px;
}
.ct-hero__ey.is-up {
  animation: ctMountUp 0.8s cubic-bezier(.2,.8,.2,1) forwards;
}
.ct-hero__ey .ct-ey__line  { background: rgba(255,255,255,0.5); }
.ct-hero__ey .ct-ey__text  { color: rgba(255,255,255,0.7); }
.ct-hero__ey.is-up .ct-ey__line {
  animation: ctDrawLine 1s cubic-bezier(.2,.8,.2,1) 0.2s forwards;
}

/* Hero headline word-reveal */
.ct-hero__hl {
  font-family: var(--font-serif);
  font-size: clamp(72px, 11vw, 168px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.025em;
  color: #fff;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.ct-hero__hl .wm {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-top: 0.15em;
}
.ct-hero__hl .wm > span {
  display: inline-block;
  transform: translateY(110%);
}
.ct-hero__hl.is-up .wm > span {
  animation: ctWordReveal 1s cubic-bezier(.2,.8,.2,1) var(--wd, 0.25s) both;
}

/* Hero lede */
.ct-hero__lede {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.65;
  max-width: 540px;
  color: rgba(255,255,255,0.85);
  opacity: 0;
}
.ct-hero__lede.is-up {
  animation: ctMountUp 0.7s cubic-bezier(.2,.8,.2,1) 0.7s forwards;
}

/* ── 2. Body split ────────────────────────────────────────────────── */
.ct-body {
  position: relative;
  padding: 120px 40px;
  background: #fff;
  overflow-x: clip;
}

.ct-body__wm {
  position: absolute;
  left: -60px;
  bottom: -120px;
  font-family: var(--font-serif);
  font-size: clamp(220px, 30vw, 460px);
  font-weight: 500;
  line-height: 1;
  color: rgba(15,32,64,0.035);
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  z-index: 0;
}

.ct-grid {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 96px;
  align-items: start;
}

/* ── Left column: photo letter ────────────────────────────────────── */
.ct-letter__ey { margin-bottom: 20px; opacity: 0; }
.ct-letter__ey.is-up {
  animation: ctMountUp 0.7s cubic-bezier(.2,.8,.2,1) forwards;
}
.ct-letter__ey .ct-ey__line { background: #0f2040; }
.ct-letter__ey .ct-ey__text { color: #2d5fa8; letter-spacing: 0.28em; }
.ct-letter__ey.is-up .ct-ey__line {
  animation: ctDrawLine 1s cubic-bezier(.2,.8,.2,1) 0.2s forwards;
}

.ct-letter__hl {
  font-family: var(--font-serif);
  font-size: clamp(40px, 5.6vw, 72px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #0f2040;
  margin-bottom: 24px;
}
.ct-letter__hl .wm {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}
.ct-letter__hl .wm > span {
  display: inline-block;
  transform: translateY(105%);
}
.ct-letter__hl.is-up .wm > span {
  animation: ctWordReveal 0.9s cubic-bezier(.2,.8,.2,1) var(--wd, 0.3s) both;
}

/* Polaroid stack */
.ct-stack {
  position: relative;
  max-width: 460px;
  height: 540px;
  margin-top: 12px;
}

.ct-pol {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 82%;
  background: #fff;
  padding: 14px;
  box-shadow: 0 28px 60px -22px rgba(15,32,64,0.35);
  opacity: 0;
  transition: opacity 1s cubic-bezier(.2,.8,.2,1), transform 1s cubic-bezier(.2,.8,.2,1);
}

/* Pre-reveal positions (rotate*0.4, translate*0.4, +30px y) */
.ct-pol--1 {
  z-index: 1;
  transform: translate(-50%,-50%) translate(-12px,38px) rotate(-2.8deg);
  transition-delay: 0.55s;
}
.ct-pol--2 {
  z-index: 2;
  transform: translate(-50%,-50%) translate(8px,26px) rotate(1.6deg);
  transition-delay: 0.7s;
}
.ct-pol--3 {
  z-index: 3;
  transform: translate(-50%,-50%) translate(0,30px) rotate(-0.8deg);
  transition-delay: 0.85s;
}

/* Revealed positions */
.ct-stack.is-in .ct-pol--1 {
  opacity: 1;
  transform: translate(-50%,-50%) translate(-30px,20px) rotate(-7deg);
}
.ct-stack.is-in .ct-pol--2 {
  opacity: 1;
  transform: translate(-50%,-50%) translate(20px,-10px) rotate(4deg);
}
.ct-stack.is-in .ct-pol--3 {
  opacity: 1;
  transform: translate(-50%,-50%) translate(0,0) rotate(-2deg);
}

.ct-pol__photo {
  width: 100%;
  aspect-ratio: 1;
  background-size: cover;
  background-position: center;
}
.ct-pol--1 .ct-pol__photo { background-image: linear-gradient(140deg,#1e3a6e,#2d5fa8); }
.ct-pol--2 .ct-pol__photo { background-image: linear-gradient(140deg,#0f2040,#1e3a6e); }
.ct-pol--3 .ct-pol__photo { background-image: linear-gradient(140deg,#2d5fa8,#0f2040); }

.ct-pol__cap {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: #64748b;
  margin: 0;
  padding: 0 10px;
  text-align: center;
}

/* Washi tape on card 3 */
.ct-pol__tape {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 80px;
  height: 18px;
  background: rgba(255,235,140,0.65);
  z-index: 4;
}

/* Handwritten note */
.ct-note {
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 220px;
  padding: 20px 24px;
  background: #fffbe6;
  box-shadow: 0 12px 30px -10px rgba(15,32,64,0.35);
  transform: rotate(4deg) translateY(20px);
  opacity: 0;
  z-index: 5;
  transition: opacity 1s cubic-bezier(.2,.8,.2,1) 1s,
              transform 1s cubic-bezier(.2,.8,.2,1) 1s;
}
.ct-stack.is-in .ct-note {
  opacity: 1;
  transform: rotate(4deg) translateY(0);
}

.ct-note__tape {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%) rotate(-4deg);
  width: 60px;
  height: 18px;
  background: rgba(255,235,140,0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.ct-note__text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.4;
  color: #0f2040;
  margin: 0 0 10px;
}
.ct-note__sig {
  display: block;
  font-size: 14px;
  color: #2d5fa8;
  letter-spacing: 0.08em;
  font-family: var(--font-sans);
}

/* ── Right column: contact card ───────────────────────────────────── */
.ct-card {
  background: #f0f4ff;
  padding: 56px;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s cubic-bezier(.2,.8,.2,1) 0.3s,
              transform 0.9s cubic-bezier(.2,.8,.2,1) 0.3s;
}
.ct-card.is-up {
  opacity: 1;
  transform: translateY(0);
}

.ct-card__wm {
  position: absolute;
  right: -10px;
  top: -30px;
  font-family: var(--font-serif);
  font-size: 220px;
  font-weight: 500;
  line-height: 1;
  color: rgba(15,32,64,0.06);
  user-select: none;
  pointer-events: none;
}

.ct-card__ey { margin-bottom: 16px; }
.ct-card__ey .ct-ey__line { background: #2d5fa8; width: 56px; }
.ct-card__ey .ct-ey__text { color: #2d5fa8; letter-spacing: 0.28em; }

.ct-card__hl {
  font-family: var(--font-serif);
  font-size: clamp(32px, 3.4vw, 44px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #0f2040;
  margin-bottom: 14px;
}

.ct-card__sub {
  font-size: 15px;
  line-height: 1.7;
  color: #64748b;
  max-width: 420px;
  margin-bottom: 36px;
}

/* Contact rows */
.ct-rows { margin-bottom: 0; }

.ct-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid rgba(15,32,64,0.08);
  text-decoration: none;
  color: inherit;
  gap: 12px;
}
.ct-row:hover { text-decoration: none; }
a.ct-row:focus-visible { outline: 2px solid #0f2040; outline-offset: 2px; border-radius: 2px; }

.ct-row__left { flex: 1; min-width: 0; }
.ct-row__label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #2d5fa8;
  margin-bottom: 6px;
}
.ct-row__value {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  color: #0f2040;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ct-copy {
  background: transparent;
  border: 1px solid rgba(15,32,64,0.2);
  color: #0f2040;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s cubic-bezier(.2,.8,.2,1),
              color 0.2s cubic-bezier(.2,.8,.2,1),
              border-color 0.2s cubic-bezier(.2,.8,.2,1);
  font-family: var(--font-sans);
}
.ct-copy:hover   { background: #0f2040; color: #fff; border-color: #0f2040; }
.ct-copy:focus-visible { outline: 2px solid #0f2040; outline-offset: 2px; }

.ct-divider {
  border: none;
  border-top: 1px solid rgba(15,32,64,0.12);
  margin: 36px 0 28px;
}

/* Form */
.ct-form__top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 0;
}

.ct-field {
  position: relative;
  padding-top: 22px;
  margin-bottom: 16px;
}

.ct-field__label {
  position: absolute;
  left: 0;
  top: 28px;
  font-size: 14px;
  color: #64748b;
  transition: top 0.25s cubic-bezier(.2,.8,.2,1),
              font-size 0.25s cubic-bezier(.2,.8,.2,1),
              color 0.25s cubic-bezier(.2,.8,.2,1);
  pointer-events: none;
  white-space: nowrap;
  font-family: var(--font-sans);
}
.ct-field.is-active .ct-field__label,
.ct-field.is-filled .ct-field__label {
  top: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #2d5fa8;
}

.ct-field__input {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(15,32,64,0.2);
  padding: 8px 0 12px;
  font-size: 16px;
  color: #0f2040;
  outline: none;
  transition: border-color 0.25s cubic-bezier(.2,.8,.2,1);
  font-family: var(--font-sans);
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}
.ct-field__input:focus { border-bottom-color: #0f2040; }
.ct-field textarea.ct-field__input { resize: vertical; min-height: 88px; }

.ct-submit {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0f2040;
  color: #fff;
  border: none;
  padding: 16px 28px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s cubic-bezier(.2,.8,.2,1), transform 0.15s;
  font-family: var(--font-sans);
}
.ct-submit:hover   { background: #1e3a6e; }
.ct-submit:active  { transform: scale(0.98); }
.ct-submit--sent   { background: #3a8d52; }
.ct-submit--error  { background: #b94a4a; }
.ct-submit:disabled { cursor: not-allowed; }

/* ── 3. Outro ─────────────────────────────────────────────────────── */
.ct-outro {
  padding: 90px 40px;
  background: #fff;
  border-top: 1px solid rgba(15,32,64,0.08);
  text-align: center;
}
.ct-outro__ey {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #2d5fa8;
  margin-bottom: 18px;
}
.ct-outro__h2 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 500;
  line-height: 1.35;
  color: #0f2040;
  max-width: 720px;
  margin: 0 auto 32px;
}
.ct-outro__btn {
  display: inline-block;
  background: #0f2040;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 16px 32px;
  border-radius: 4px;
  transition: background 0.2s;
}
.ct-outro__btn:hover { background: #1e3a6e; text-decoration: none; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .ct-hero { padding: 100px 24px 96px; }
  .ct-body  { padding: 72px 24px; }
  .ct-grid  { grid-template-columns: 1fr; gap: 56px; }
  .ct-card  { padding: 36px 28px; }
  .ct-form__top { grid-template-columns: 1fr; }
  .ct-stack { height: 440px; max-width: 100%; }
  .ct-note  { right: -8px; bottom: -24px; width: 180px; padding: 16px 18px; }
  .ct-note__text { font-size: 15px; }
  .ct-outro { padding: 60px 24px; }
}

@media (max-width: 560px) {
  .ct-hero  { padding: 72px 20px 64px; }
  .ct-body  { padding: 56px 20px; }
  .ct-card  { padding: 28px 20px; }
  .ct-stack { height: 340px; }
  .ct-note  { right: 0; bottom: -12px; width: 150px; padding: 12px 14px; }
  .ct-note__text { font-size: 13px; }
  .ct-row__value { font-size: 18px; }
  .ct-outro { padding: 48px 20px; }
  .ct-submit { width: 100%; justify-content: center; }
}

/* ── Reduced motion ───────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .ct-orb--a, .ct-orb--b { animation: none; }

  .ct-hero__ey,
  .ct-hero__lede,
  .ct-letter__ey   { opacity: 1; transform: none; animation: none !important; }

  .ct-hero__ey.is-up,
  .ct-hero__lede.is-up { animation: none !important; }

  .ct-hero__hl .wm > span,
  .ct-letter__hl .wm > span { transform: translateY(0); animation: none !important; }

  .ct-ey__line { width: 56px; animation: none !important; }

  .ct-pol, .ct-note { opacity: 1; transform: none; transition: none; }
  .ct-stack.is-in .ct-pol--1 { transform: translate(-50%,-50%) translate(-30px,20px) rotate(-7deg); }
  .ct-stack.is-in .ct-pol--2 { transform: translate(-50%,-50%) translate(20px,-10px) rotate(4deg); }
  .ct-stack.is-in .ct-pol--3 { transform: translate(-50%,-50%) translate(0,0) rotate(-2deg); }
  .ct-stack.is-in .ct-note   { transform: rotate(4deg) translateY(0); }

  .ct-card { opacity: 1; transform: none; transition: none; }
}
