/* ═══════════════════════════════════════════════════════════
   LEGACY OVERRIDES — used by old sections we ported back in
   (cases / interludes / pricing / testimonials / studio /
    big-cta / contact / footer)

   Loaded AFTER styles.css so these rules win.
   ═══════════════════════════════════════════════════════════ */

/* ─── CASES — drag scroll instead of scroll-driven translate ─── */
.cases-h-wrap {
  overflow: hidden;
  position: relative;
  padding: 0 0 24px;
}
.cases-h-track {
  display: flex;
  gap: 24px;
  padding: 0 var(--pad-x);
  overflow-x: auto;
  scroll-behavior: smooth;
  cursor: grab;
  scrollbar-width: none;
  -ms-overflow-style: none;
  transform: none !important;
}
.cases-h-track::-webkit-scrollbar { display: none; }
.cases-h-track:active { cursor: grabbing; }

.cases-h-track .case {
  flex: 0 0 auto;
  width: 380px;
  aspect-ratio: 4/5;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: border-color 0.4s var(--ease-out), transform 0.3s var(--ease-out);
}
.cases-h-track .case:hover { border-color: var(--ink-faint); transform: translateY(-4px); }
.cases-h-track .case.wide { width: 600px; aspect-ratio: 16/10; }

.case-art {
  position: absolute;
  inset: 0;
  background: var(--bg-soft);
}
.case-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.case-top {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 20px;
}
.case-chip {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #14130f;
}
[data-theme="dark"] .case-chip { background: rgba(0,0,0,0.7); color: #f2efe6; }
.case-year {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.case-meta {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding: 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
  color: #fff;
}
.case-num { font-size: 11px; letter-spacing: 0.12em; color: rgba(255,255,255,0.6); margin-bottom: 6px; }
.case-name { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 4px; }
.case-line { font-size: 13px; color: rgba(255,255,255,0.7); margin-bottom: 12px; }
.case-kpis {
  display: flex;
  gap: 24px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.18);
}
.kpi { display: flex; flex-direction: column; gap: 2px; }
.kpi-num { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: #fff; }
.kpi-suf { font-size: 14px; color: rgba(255,255,255,0.7); }
.kpi-cap { font-size: 9px; letter-spacing: 0.12em; color: rgba(255,255,255,0.55); }

.cases-h-progress {
  height: 3px;
  background: var(--line);
  margin: 16px var(--pad-x) 0;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.cases-h-progress::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: var(--progress, 0%);
  background: var(--ink);
  border-radius: 2px;
  transition: width 0.1s linear;
}
@media (max-width: 600px) {
  .cases-h-track .case { width: 300px; }
  .cases-h-track .case.wide { width: 340px; }
}

/* ─── INTERLUDES ─── */
.interlude {
  padding: 120px 0;
  text-align: center;
}
.interlude-eyebrow { margin-bottom: 32px; }
.interlude-line {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.5;
  color: var(--ink);
  max-width: 600px;
  margin: 0 auto;
}
.interlude-foot { margin-top: 32px; color: var(--ink-faint); }

.num-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}
.num-big {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -0.03em;
}
.num-unit { font-size: 0.5em; color: var(--ink-faint); }
.num-cap {
  margin-top: 8px;
  font-size: 10px;
  letter-spacing: 0.18em;
}
@media (max-width: 600px) { .num-row { grid-template-columns: repeat(2, 1fr); } }

/* ─── PRICING ─── */
.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  /* Override handoff's wrapping container — each tier is its own card,
     and overflow MUST be visible so the floating badge can stick up. */
  overflow: visible;
  border: none;
  background: transparent;
  border-radius: 0;
}
.tier {
  padding: 36px 32px;
  border: 1px solid var(--line);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.3s, transform 0.3s;
}
.tier {
  position: relative;
  transition: border-color 0.4s var(--ease-out),
              transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.5s var(--ease-out);
  transform-origin: center bottom;
  will-change: transform;
}
.tier:hover {
  border-color: var(--line-strong);
  transform: translateY(-6px) rotate(0.5deg);
  box-shadow: 12px 18px 32px -22px rgba(20, 19, 15, 0.22);
}
.tier.featured {
  border-color: var(--accent);
  background: var(--bg-soft);
  transform: translateY(-16px);
  box-shadow: 0 24px 60px -20px rgba(108, 92, 231, 0.28);
}
.tier.featured:hover {
  transform: translateY(-22px) rotate(-0.4deg);
  box-shadow: 0 28px 70px -20px rgba(108, 92, 231, 0.40);
}
.tier-badge {
  position: absolute;
  top: -14px;
  left: 24px;
  z-index: 2;
  padding: 7px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-family: 'JetBrains Mono', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.2;
  box-shadow: 0 4px 14px rgba(108, 92, 231, 0.40);
}
/* Reset handoff's dark-bg featured-tier colors since legacy uses a light bg-soft */
.tier.featured .tier-name { color: var(--ink-soft); }
.tier.featured .tier-price { color: var(--ink); }
.tier.featured .tier-blurb { color: var(--ink-soft); }
.tier.featured .tier-features { color: var(--ink-soft); }
.tier.featured .tier-features li::before { color: var(--accent); }
.tier.featured .tier-price .unit { color: var(--ink-faint); }
.tier-name {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.tier-price {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.tier-price .unit { font-size: 14px; color: var(--ink-faint); font-weight: 400; margin-left: 4px; }
.tier-blurb { font-size: 14px; line-height: 1.6; color: var(--ink-soft); }
.tier-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  margin-top: auto;
}
.tier-features li {
  font-size: 14px;
  color: var(--ink-soft);
  padding-left: 20px;
  position: relative;
  list-style: none;
}
.tier-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
}
.tier .cta-pill { align-self: flex-start; margin-top: 16px; }
@media (max-width: 900px) { .pricing { grid-template-columns: 1fr; } }

/* ─── TESTIMONIALS ─── */
#testimonials .testi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
#testimonials .testi-card {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
#testimonials .testi-quote {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-soft);
  font-style: italic;
}
#testimonials .testi-author {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  margin-top: auto;
}
@media (max-width: 768px) { #testimonials .testi-grid { grid-template-columns: 1fr; } }

/* ─── STUDIO ─── */
#studio .studio-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
#studio .studio-text {
  font-size: 18px;
  line-height: 1.8;
  color: var(--ink-soft);
}
#studio .studio-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
#studio .studio-stat .num {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
#studio .studio-stat .label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
  margin-top: 4px;
}
@media (max-width: 768px) { #studio .studio-content { grid-template-columns: 1fr; } }

/* ─── Studio tenets (replaces fake stats) ─── */
.studio-tenets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
}
.studio-tenets li {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.studio-tenets li:first-child { border-top: 1px solid var(--line); }
.studio-tenets .t-num {
  flex: 0 0 48px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
}
.studio-tenets .t-line {
  flex: 1;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
}

/* ─── BIG CTA ─── */
section.big-cta {
  padding: 120px 0;
  text-align: center;
  border-top: 1px solid var(--line);
}
section.big-cta h2 {
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
}
section.big-cta h2 .serif { font-family: var(--font-serif); font-style: italic; }
section.big-cta .cta-pill { font-size: 16px; padding: 14px 28px 14px 32px; }
section.big-cta .sub-link {
  display: block;
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-faint);
}
section.big-cta .sub-link:hover { color: var(--ink); }

/* ─── CONTACT FORM ─── */
.contact-section { padding: 120px 0; }
.contact-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.contact-left h2 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.contact-left h2 .serif { font-family: var(--font-serif); font-style: italic; }
.contact-left p { font-size: 16px; line-height: 1.7; color: var(--ink-soft); margin-bottom: 32px; }
.contact-meta-row {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.contact-meta-row .key {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  min-width: 80px;
}
.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-row { display: flex; flex-direction: column; gap: 8px; }
.form-row label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
}
.form-row label .req { color: var(--accent); }
.form-row input, .form-row select, .form-row textarea {
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 15px;
  transition: border-color 0.3s;
  outline: none;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--accent); }
.form-row textarea { min-height: 120px; resize: vertical; }
.form-submit {
  position: relative;
  overflow: hidden;
  padding: 14px 32px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  align-self: flex-start;
  transition: color 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
  z-index: 0;
}
.form-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: translateX(-101%);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}
.form-submit:hover { color: var(--bg); }
.form-submit:hover::before { transform: translateX(0); }
.form-submit > span { position: relative; z-index: 1; }
.form-foot {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
}
.form-success, .form-error { display: none; padding: 16px; border-radius: 10px; font-size: 14px; }
.form-success { background: #e8f5e9; color: #2e7d32; }
.form-error { background: #fce4ec; color: #c62828; }
form.submitted .form-success { display: block; }
form.error .form-error { display: block; }
@media (max-width: 768px) {
  .contact-inner { grid-template-columns: 1fr; gap: 48px; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ─── FOOTER (legacy markup: <footer> with .foot-inner) ─── */
body > footer:not(.footer) {
  padding: 80px var(--pad-x) 40px;
  border-top: 1px solid var(--line);
}
body > footer:not(.footer) .foot-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
body > footer:not(.footer) .foot-brand h4 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
body > footer:not(.footer) .foot-brand .tagline {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  margin-bottom: 12px;
}
body > footer:not(.footer) .foot-brand p { font-size: 14px; line-height: 1.6; color: var(--ink-soft); max-width: 320px; }
body > footer:not(.footer) .foot-col h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  margin-bottom: 16px;
}
body > footer:not(.footer) .foot-col li { margin-bottom: 10px; list-style: none; }
body > footer:not(.footer) .foot-col a { font-size: 14px; color: var(--ink-soft); transition: color 0.2s; }
body > footer:not(.footer) .foot-col a:hover { color: var(--ink); }
body > footer:not(.footer) .foot-bottom {
  max-width: var(--container);
  margin: 24px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-faint);
}

/* ─── Footer signature flourish ─── */
body > footer:not(.footer) .foot-sign {
  max-width: var(--container);
  margin: 64px auto 0;
  padding: 40px 0 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
body > footer:not(.footer) .foot-sign-script {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.2;
  color: var(--ink-soft);
  letter-spacing: -0.01em;
}
body > footer:not(.footer) .foot-sign-rule {
  width: 56px;
  height: 1px;
  background: var(--line-strong);
}
body > footer:not(.footer) .foot-sign-stamp {
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--ink-faint);
}

/* Wax seal — slowly rotating circular inscription, hover-interactive */
body > footer:not(.footer) .wax-seal {
  margin-top: 24px;
  width: 132px;
  height: 132px;
  color: var(--ink-soft);
  position: relative;
  cursor: pointer;
  transition: transform 0.5s var(--ease-out), color 0.4s var(--ease-out);
}
body > footer:not(.footer) .wax-seal:hover { transform: scale(1.08); color: var(--ink); }

body > footer:not(.footer) .wax-seal-spin {
  position: absolute;
  inset: 0;
  animation: seal-spin 60s linear infinite;
}
body > footer:not(.footer) .wax-seal:hover .wax-seal-spin { animation-play-state: paused; }
body > footer:not(.footer) .wax-seal svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
body > footer:not(.footer) .wax-seal .seal-text {
  fill: currentColor;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 3.5px;
  text-transform: uppercase;
}
body > footer:not(.footer) .wax-seal-mark {
  position: absolute;
  top: 50%; left: 50%;
  width: 32px; height: 32px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  transition: opacity 0.3s var(--ease-out), color 0.3s var(--ease-out);
}
body > footer:not(.footer) .wax-seal-mark svg { width: 100%; height: 100%; }
body > footer:not(.footer) .wax-seal:hover .wax-seal-mark { color: var(--accent); opacity: 0; }

body > footer:not(.footer) .wax-seal-est {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--ink);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out) 0.05s;
  pointer-events: none;
}
body > footer:not(.footer) .wax-seal:hover .wax-seal-est { opacity: 1; }

@keyframes seal-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  body > footer:not(.footer) .wax-seal-spin { animation: none; }
  body > footer:not(.footer) .wax-seal { transition: none; }
}
@media (max-width: 768px) {
  body > footer:not(.footer) .foot-inner { grid-template-columns: 1fr 1fr; }
  body > footer:not(.footer) .foot-bottom { flex-direction: column; gap: 8px; }
}
