/* =========================================================
   REFRAME — tokens
   ========================================================= */
:root {
  --ink: #0D131B;
  --ink-soft: #1A2531;
  --ink-line: #2C3846;
  --paper: #F1EDE4;
  --paper-bright: #FAF8F3;
  --paper-line: #DDD6C7;
  --gold: #DDB23F;
  --gold-bright: #F0C766;
  --sage: #6B7A5E;
  --accent: #FF3E68;
  --accent-soft: rgba(255, 62, 104, 0.18);

  --text-on-ink: #F1EDE4;
  --text-on-ink-muted: #A9B2BC;
  --text-on-paper: #17212B;
  --text-on-paper-muted: #5C6672;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --wrap: 1120px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --radius: 3px;
}

/* =========================================================
   Reset / base
   ========================================================= */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--text-on-paper);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.6em;
}

p { margin: 0 0 1.1em; max-width: 62ch; }

a { color: inherit; }

img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--ink);
  padding: 0.75em 1.25em;
  z-index: 100;
}
.skip-link:focus {
  left: var(--gutter);
  top: 0.5rem;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(19, 27, 36, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ink-line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-on-ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.55em;
}
.wordmark-icon {
  width: 22px;
  height: 22px;
  color: var(--gold);
  flex-shrink: 0;
}
.wordmark-sub {
  font-family: var(--font-body);
  font-size: 0.55em;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--gold-bright);
  vertical-align: middle;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.primary-nav a {
  color: var(--text-on-ink-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}
.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: var(--text-on-ink);
}
.primary-nav .nav-cta {
  color: var(--ink);
  background: var(--gold);
  padding: 0.5em 1.1em;
  border-radius: var(--radius);
}
.primary-nav .nav-cta:hover,
.primary-nav .nav-cta:focus-visible {
  background: var(--gold-bright);
  color: var(--ink);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 22px;
  background: var(--text-on-ink);
}

@media (max-width: 780px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--ink);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    border-bottom: 1px solid var(--ink-line);
  }
  .primary-nav.is-open { max-height: 400px; }
  .primary-nav a {
    padding: 1rem var(--gutter);
    width: 100%;
    border-top: 1px solid var(--ink-line);
  }
  .primary-nav .nav-cta {
    margin: 1rem var(--gutter);
    width: calc(100% - 2 * var(--gutter));
    text-align: center;
  }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  background: var(--ink);
  color: var(--text-on-ink);
  padding: clamp(3.5rem, 10vw, 6rem) 0 clamp(3.5rem, 10vw, 6rem);
  overflow: hidden;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.75rem, 4vw, 2.75rem);
  max-width: none;
  position: relative;
  text-align: center;
}

.hero-spotlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 30%), var(--accent-soft), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.hero:hover .hero-spotlight { opacity: 1; }

.hero-top, .hero-bottom { max-width: 42rem; }

.hero-animate-in {
  animation: hero-rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-kicker {
  font-size: 0.95rem;
  color: var(--gold-bright);
  margin-bottom: 1.2em;
  letter-spacing: 0.01em;
}

.hero-headline {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  color: var(--paper-bright);
  max-width: 14ch;
  margin-left: auto;
  margin-right: auto;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-on-ink-muted);
  max-width: 42ch;
  margin: 0 auto 1.2em;
}

.hero-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  padding: 0;
  margin: 0 auto 1.6em;
}
.hero-tags li {
  font-size: 0.85rem;
  color: var(--gold-bright);
  border: 1px solid var(--ink-line);
  padding: 0.4em 0.9em;
  border-radius: 999px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.85em 1.6em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary {
  background: var(--gold);
  color: var(--ink);
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--gold-bright);
}
.btn-ghost {
  background: transparent;
  color: var(--text-on-ink);
  border-color: var(--ink-line);
}
.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--gold);
  color: var(--gold-bright);
}

/* corner-bracket motif — the "reframe" device */
.corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 2px solid var(--gold);
}
.corner-tl { top: 0; left: 0; border-right: none; border-bottom: none; }
.corner-tr { top: 0; right: 0; border-left: none; border-bottom: none; }
.corner-bl { bottom: 0; left: 0; border-right: none; border-top: none; }
.corner-br { bottom: 0; right: 0; border-left: none; border-top: none; }

/* =========================================================
   Hero interactive reveal slider
   ========================================================= */
.reveal-slider {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--ink-line);
  overflow: hidden;
  cursor: ew-resize;
  touch-action: none;
  user-select: none;
  z-index: 1;
}
.reveal-slider svg { display: block; width: 100%; height: 100%; }

.hero-demo-caption {
  margin: 0.9rem 0 0;
  font-size: 0.85rem;
  color: var(--text-on-ink-muted);
  text-align: center;
}

/* =========================================================
   Hero video reel — two real reframes, playing side by side.
   This is the dominant visual element of the hero.
   ========================================================= */
.hero-demo { width: 100%; max-width: 68rem; }
.reel-frame {
  position: relative;
  border: 1px solid var(--ink-line);
}
.reel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: var(--ink-line);
}
.reel-item {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #0F151C;
}
@media (min-width: 720px) {
  .reel-item { aspect-ratio: 3 / 4; }
}
.reel-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.reel-label {
  position: absolute;
  bottom: 0.9rem;
  left: 0.9rem;
  font-size: 0.8rem;
  color: var(--text-on-ink-muted);
  background: rgba(13, 19, 27, 0.6);
  padding: 0.3em 0.7em;
  border-radius: 999px;
}

.reveal-after,
.reveal-before {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.reveal-before {
  clip-path: inset(0 calc(100% - var(--split, 22) * 1%) 0 0);
}

.reveal-tag {
  position: absolute;
  top: 1rem;
  font-size: 0.8rem;
  color: var(--text-on-ink-muted);
  background: rgba(13, 19, 27, 0.55);
  padding: 0.3em 0.7em;
  border-radius: 999px;
  pointer-events: none;
}
.reveal-tag-before { left: 1rem; }
.reveal-tag-after { right: 1rem; color: var(--gold-bright); }

.reveal-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--split, 22) * 1%);
  width: 2px;
  background: var(--accent);
  transform: translateX(-1px);
  box-shadow: 0 0 16px var(--accent-soft);
  pointer-events: none;
}

.reveal-handle {
  position: absolute;
  top: 50%;
  left: calc(var(--split, 22) * 1%);
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--paper-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}
.reveal-handle svg { width: 18px; height: 18px; }
.reveal-slider:focus-visible .reveal-handle {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

.hero-frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* =========================================================
   Section shells
   ========================================================= */
.section {
  padding: clamp(3.5rem, 9vw, 6.5rem) 0;
}

.section-why, .section-what, .section-testimonials, .section-contact {
  background: var(--paper);
  color: var(--text-on-paper);
}
.section-how, .section-work, .section-about {
  background: var(--ink);
  color: var(--text-on-ink);
}

.section-grid {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
}
@media (max-width: 680px) {
  .section-grid { grid-template-columns: 1fr; }
}

.section-label {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold);
  margin: 0;
  padding-top: 0.2em;
}

.section-content-col { max-width: 44rem; }

.section-heading {
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
}
.section-how .section-heading,
.section-work .section-heading,
.section-about .section-heading {
  color: var(--paper-bright);
}

.section-lead {
  font-size: 1.15rem;
}
.section-how p, .section-work p, .section-about p {
  color: var(--text-on-ink-muted);
}
.section-why p, .section-what p, .section-testimonials p {
  color: var(--text-on-paper-muted);
}
.section-lead { color: inherit !important; }

.how-block { margin-top: 2rem; }
.how-block h3 {
  font-size: 1.15rem;
  color: var(--gold-bright);
  margin-bottom: 0.4em;
}

/* =========================================================
   Scroll reveal — progressive enhancement.
   Safe default: fully visible. JS adds js-ready, then reveal.
   ========================================================= */
.reveal { opacity: 1; transform: none; }
body.js-ready .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
body.js-ready .reveal.is-visible {
  opacity: 1;
  transform: none;
}
.reveal-frame { position: relative; }
.reveal-frame .corner { width: 16px; height: 16px; opacity: 0; transition: opacity 0.4s ease 0.3s; }
.reveal-frame .corner-tl { top: -14px; left: -18px; }
.reveal-frame .corner-br { bottom: -14px; right: -18px; }
@media (max-width: 680px) {
  .reveal-frame .corner { display: none; }
}
body.js-ready .reveal.reveal-frame.is-visible .corner { opacity: 1; }

/* =========================================================
   What — bento grid
   ========================================================= */
.what-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--paper-line);
  margin-top: 2.5rem;
  border: 1px solid var(--paper-line);
}
@media (max-width: 680px) {
  .what-grid { grid-template-columns: 1fr; }
}
.what-item {
  position: relative;
  background: var(--paper-bright);
  padding: 2rem;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.what-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-soft), transparent 55%);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.what-item:hover { transform: translateY(-4px); }
.what-item:hover::before { opacity: 1; }
.what-item .corner {
  width: 18px; height: 18px;
  border-color: var(--gold);
  z-index: 1;
}
.what-item h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4em;
}
.what-item p { color: var(--text-on-paper-muted); margin-bottom: 0; }

/* =========================================================
   Work grid
   ========================================================= */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin-top: 2.5rem;
}
@media (max-width: 900px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .work-grid { grid-template-columns: 1fr; }
}

.work-card {
  background: var(--ink-soft);
  border: 1px solid var(--ink-line);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease;
}
.work-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
}

.work-media {
  position: relative;
  aspect-ratio: 9 / 12;
  background: #0F151C;
}
.work-media iframe {
  width: 100%; height: 100%; border: 0;
}
.work-media-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
}
.work-media-placeholder .corner { width: 20px; height: 20px; }
.placeholder-label {
  color: var(--text-on-ink-muted);
  font-size: 0.9rem;
}

.work-card-body { padding: 1.4rem; }
.work-card-type {
  font-size: 0.85rem;
  color: var(--gold-bright);
  margin-bottom: 0.5em;
}
.work-card-body h3 {
  font-size: 1.1rem;
  color: var(--paper-bright);
  margin-bottom: 0.4em;
}
.work-card-body p {
  color: var(--text-on-ink-muted);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* =========================================================
   Testimonials
   ========================================================= */
.testimonial-grid {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 780px) {
  .testimonial-grid { grid-template-columns: 1fr; }
}
.testimonial-grid.is-empty {
  display: block;
  border: 1px dashed var(--paper-line);
  padding: 3rem 2rem;
  text-align: center;
}
.testimonial-holding {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--text-on-paper-muted);
  margin: 0;
}
.testimonial-card {
  background: var(--paper-bright);
  border: 1px solid var(--paper-line);
  padding: 1.75rem;
  margin: 0;
}
.testimonial-card p {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 0.8em;
}
.testimonial-card footer {
  font-size: 0.9rem;
  color: var(--text-on-paper-muted);
}

/* =========================================================
   Contact
   ========================================================= */
.contact-inner { max-width: 34rem; }

.contact-form { margin-top: 2rem; }
.hidden-field { position: absolute; left: -9999px; }

.form-row { margin-bottom: 1.25rem; }
.form-row label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.4em;
  color: var(--text-on-paper-muted);
}
.form-row input,
.form-row textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75em 0.9em;
  border: 1px solid var(--paper-line);
  background: var(--paper-bright);
  color: var(--text-on-paper);
  border-radius: var(--radius);
}
.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--gold);
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--ink);
  color: var(--text-on-ink-muted);
  padding: 2.5rem 0;
  font-size: 0.9rem;
}
.footer-inner p { margin: 0; }
