/* ── v2 · custom styles on top of Tailwind CDN ─────────────────────────── */

/* iOS: never allow sideways pan, and never show white beyond the page */
html {
  background: #FAFAEB;
  overflow-x: clip;
}
body { overflow-x: clip; }
@supports not (overflow-x: clip) {
  html, body { overflow-x: hidden; }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: #12312B;
  color: #FAFAEB;
  padding: 10px 18px;
  font-size: 12px;
}
.skip-link:focus { left: 0; }

/* Nav gets a soft paper blur once content scrolls under it */
.nav-blur {
  background: linear-gradient(to bottom, rgba(250, 250, 235, 0.9), rgba(250, 250, 235, 0.65));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero { background: #FAFAEB; }
.hero canvas { touch-action: pan-y; }

/* ── Logo marks: the PNGs are black-on-alpha, so paint them via CSS mask ── */
.logo-mask {
  display: inline-block;
  background-color: #F02300;
  -webkit-mask: var(--logo) no-repeat center / contain;
  mask: var(--logo) no-repeat center / contain;
}
.logo-mask--powder { background-color: #B7E3E4; }
.logo-mask--ivory { background-color: #FAFAEB; }

/* ── Manifesto: words ignite as you scroll ─────────────────────────────── */
.manifesto .m-word {
  color: rgba(18, 49, 43, 0.24);
  transition: color 0.35s ease;
}
.manifesto .m-word.lit { color: #12312B; }
.manifesto .m-word.lit.m-accent { color: #F02300; }

/* ── Star ticker ───────────────────────────────────────────────────────── */
.marquee { overflow: hidden; padding: 18px 0; }
.marquee__track {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  width: max-content;
  animation: marquee-scroll 26s linear infinite;
}
.marquee__track span { white-space: nowrap; }
.marquee__dot {
  color: #F02300;
  font-size: 0.55em;
  flex: none;
}
@keyframes marquee-scroll {
  to { transform: translateX(-50%); }
}

/* ── Spinning star accents ─────────────────────────────────────────────── */
.spin-star { animation: star-spin 14s linear infinite; }
@keyframes star-spin {
  to { transform: rotate(360deg); }
}

/* ── Ink blot behind the contact heading ───────────────────────────────── */
.ink-blot {
  position: absolute;
  width: 1.1em;
  height: 1.1em;
  top: -0.35em;
  left: 1.6em;
  background-color: #AAD7CD;
  z-index: -1;
  animation: star-spin 30s linear infinite;
}

/* ── CTA banner ────────────────────────────────────────────────────────── */
.cta-banner {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 48px);
  background: #B7E3E4;
  color: #12312B;
  border-radius: 16px;
  padding: clamp(28px, 4vw, 56px);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}
.cta-banner:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 50px rgba(18, 49, 43, 0.18);
}
.cta-banner em { color: #F02300; }
.cta-banner__star { width: clamp(44px, 5vw, 80px); height: clamp(44px, 5vw, 80px); flex: none; }
.cta-banner__copy { flex: 1; }
.btn-ivory {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #F02300;
  color: #FAFAEB;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 16px 28px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.3s ease, color 0.3s ease;
}
.cta-banner:hover .btn-ivory { background: #12312B; color: #FAFAEB; }
.cta-banner:hover .btn-ember__arrow { transform: translateX(4px); }
@media (max-width: 767px) {
  .cta-banner { flex-direction: column; align-items: flex-start; }
  .cta-banner__star { width: 40px; height: 40px; }
}

/* ── Ink-dot cursor follower (desktop only) ────────────────────────────── */
.ink-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #F02300;
  pointer-events: none;
  z-index: 90;
  opacity: 0;
  transition: width 0.25s ease, height 0.25s ease, opacity 0.3s ease;
}
.ink-dot--on { opacity: 0.85; }
.ink-dot--hot { width: 34px; height: 34px; opacity: 0.35; }
@media (hover: none), (pointer: coarse) {
  .ink-dot { display: none; }
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn-ember {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #F02300;
  color: #FAFAEB;
  font-family: "Instrument Sans", sans-serif;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 16px 28px;
  border-radius: 999px;
  transition: background 0.3s ease, transform 0.3s ease;
}
.btn-ember:hover { background: #12312B; transform: translateY(-2px); }
.btn-ember__arrow { transition: transform 0.3s ease; }
.btn-ember:hover .btn-ember__arrow { transform: translateX(4px); }

/* ── Work: one MacBook, sites as a carousel on its screen ──────────────── */
.showcase {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 3vw, 44px);
  max-width: 1100px;
  margin: 0 auto;
}
.showcase__device {
  flex: 1;
  min-width: 0;
  max-width: 900px;
}
.work-card__frame {
  position: relative;
  display: block;
  aspect-ratio: 2072 / 1264;
}
.mbp {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
/* screen area of the 2072x1264 space-black MacBook photo */
.device-screen {
  position: absolute;
  left: 9.749%;
  top: 1.74%;
  width: 80.502%;
  height: 89.24%;
  display: block;
  overflow: hidden;
  border-radius: 8px 8px 3px 3px;
  background: #000;
}
.device-screen video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* contain: show the full recording, never crop the edges — the small
     letterbox bars disappear against the black screen */
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transform: translateX(4%);
  transition: opacity 0.55s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.device-screen video.is-active {
  opacity: 1;
  transform: none;
}
.device-screen video.is-leaving { transform: translateX(-4%); }
.mbp-notch {
  position: absolute;
  top: 0;
  left: 44.05%;
  width: 11.9%;
  height: 3.3%;
  background: #000;
  border-radius: 0 0 6px 6px;
  z-index: 2;
}
.carousel-arrow {
  flex: none;
  width: clamp(40px, 4.5vw, 56px);
  height: clamp(40px, 4.5vw, 56px);
  border-radius: 50%;
  border: 1px solid rgba(18, 49, 43, 0.28);
  background: #FAFAEB;
  color: #F02300;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.carousel-arrow:hover {
  background: #F02300;
  border-color: #F02300;
  color: #FAFAEB;
  transform: scale(1.08);
}
.carousel-arrow:active { transform: scale(0.95); }
.showcase__meta {
  text-align: center;
  margin-top: 34px;
}
.showcase__meta .wd-tags { justify-content: center; }
/* Mobile: the device is an iPhone (transparent-screen PNG drawn OVER the video) */
@media (max-width: 767px) {
  .showcase { gap: 8px; }
  .showcase__meta { margin-top: 22px; }
  .showcase__device { max-width: min(340px, 66vw); }
  .work-card__frame { aspect-ratio: 756 / 1411; }
  .mbp { z-index: 2; pointer-events: none; }
  /* screen cutout of the 756x1411 iPhone photo */
  .device-screen {
    left: 9.524%;
    top: 3.898%;
    width: 79.233%;
    height: 92.345%;
    border-radius: 9.2% / 4.2%;
    z-index: 1;
  }
  .device-screen video { object-fit: cover; object-position: center; }
  .mbp-notch { display: none; }
}


.wd-num { font-size: 11px; letter-spacing: 0.18em; }
.wd-title { font-size: clamp(34px, 3.6vw, 64px); line-height: 1.05; margin-top: 10px; }
.wd-body { color: #587068; line-height: 1.65; margin-top: 18px; }
.wd-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.wd-tags li {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  border: 1px solid rgba(18, 49, 43, 0.25);
  border-radius: 999px;
  padding: 6px 12px;
}
.wd-link { margin-top: 26px; }

/* ── Service rows ──────────────────────────────────────────────────────── */
.svc {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 4px 24px;
  padding: 28px 12px;
  border-top: 1px solid rgba(18, 49, 43, 0.22);
  transition: background 0.3s ease, color 0.3s ease;
}
.svc:last-child { border-bottom: 1px solid rgba(18, 49, 43, 0.22); }
.svc__num { font-size: 11px; color: #587068; padding-top: 8px; }
.svc__name { font-size: clamp(26px, 3vw, 44px); line-height: 1.1; }
.svc__desc { grid-column: 2; max-width: 56ch; color: #587068; font-size: 14px; line-height: 1.6; }
.svc__price { grid-column: 2; font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em; color: #F02300; margin-top: 6px; }
.svc:hover { background: #F02300; color: #FAFAEB; }
.svc:hover .svc__desc { color: rgba(250, 250, 235, 0.75); }
.svc:hover .svc__num { color: #B7E3E4; }
.svc:hover .svc__price { color: #B7E3E4; }

@media (min-width: 768px) {
  .svc {
    grid-template-columns: 3rem 1fr 1fr 10rem;
    align-items: baseline;
  }
  .svc__desc, .svc__price { grid-column: auto; margin-top: 0; }
  .svc__price { text-align: right; }
}

/* ── FAQ accordions ────────────────────────────────────────────────────── */
.faq summary { list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq__icon {
  flex: none;
  transition: transform 0.3s ease;
}
.faq[open] .faq__icon { transform: rotate(45deg); }

/* ── Currency toggle ───────────────────────────────────────────────────── */
.cur-toggle {
  display: inline-flex;
  gap: 4px;
  border: 1px solid rgba(18, 49, 43, 0.25);
  border-radius: 999px;
  padding: 3px;
}
.cur-btn {
  border: 0;
  background: none;
  color: #587068;
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.05em;
  width: 26px;
  height: 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.cur-btn:hover { color: #F02300; }
.cur-btn.is-on {
  background: #F02300;
  color: #FAFAEB;
}

/* ── Process steps ─────────────────────────────────────────────────────── */
.step {
  padding: 28px 20px 28px 0;
  border-bottom: 1px solid rgba(18, 49, 43, 0.22);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), background 0.35s ease, outline-color 0.35s ease;
  outline: 1.5px solid transparent;
  outline-offset: -1.5px;
  border-radius: 10px;
}
@media (min-width: 768px) {
  .step { border-bottom: none; border-right: 1px solid rgba(18, 49, 43, 0.22); padding: 32px 24px; }
  .step:last-child { border-right: none; }
}
@media (hover: hover) {
  .step:hover {
    position: relative;
    z-index: 2;
    transform: scale(1.05);
    background: #FAFAEB;
    outline-color: #F02300;
  }
}
@media (prefers-reduced-motion: reduce) {
  .step:hover { transform: none; }
}

/* ── Form fields ───────────────────────────────────────────────────────── */
.field {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(18, 49, 43, 0.35);
  padding: 10px 2px;
  font-size: 16px;
  color: #12312B;
  outline: none;
  transition: border-color 0.3s ease;
}
.field:focus { border-color: #F02300; }

/* ── Scroll reveals ────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee__track, .spin-star, .ink-blot { animation: none; }
  .manifesto .m-word { color: #12312B; transition: none; }
  .manifesto .m-word.m-accent { color: #F02300; }
  .ink-dot { display: none; }
}
