/* RanexisAR — light editorial.
   Layout and motion patterns follow the reference (cream ground, serif
   display, marquee, numbered accordion, bento). Every asset is either ours
   or free-licensed; nothing is lifted from that site. */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@400;500;600&display=swap');

:root {
  --paper: #f7f6f3;
  --paper-2: #efeee9;
  --ink: #0e0e0c;
  --ink-soft: #6b6a64;
  --line: #dedcd4;
  --accent: #ff5c2b;
  --card: #ffffff;
  --radius: 18px;
  --maxw: 1240px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.62 Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

.serif {
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -.015em;
}

.eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-soft);
}

/* ---------- reveal on scroll ---------- */
.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- side tab ---------- */
.sidetab {
  position: fixed; left: 0; top: 34vh; z-index: 40;
  background: var(--ink); color: var(--paper);
  writing-mode: vertical-rl; text-orientation: mixed;
  padding: 18px 9px; border-radius: 0 10px 10px 0;
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 600;
}
@media (max-width: 900px) { .sidetab { display: none; } }

/* ---------- header ---------- */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,246,243,.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
header.stuck { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; gap: 30px; height: 74px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 17px; }
.brand .dot {
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255,92,43,.16);
}
.nav .spacer { flex: 1; }
.nav a.link { color: var(--ink-soft); font-size: 15px; transition: color .2s; }
.nav a.link:hover { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border: 0; cursor: pointer; font: inherit; font-weight: 500; font-size: 15px;
  padding: 13px 24px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  transition: transform .18s var(--ease), background .18s;
}
.btn:hover { transform: translateY(-2px); background: #23231f; }
.btn.accent { background: var(--accent); color: #fff; }
.btn.accent:hover { background: #f04a18; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--ink); background: transparent; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- hero ---------- */
.hero { padding: 86px 0 34px; position: relative; }
.hero h1 {
  margin: 0 0 26px;
  font-size: clamp(46px, 8.4vw, 116px);
  line-height: .96; letter-spacing: -.03em;
  text-align: center;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero .sub {
  max-width: 52ch; margin: 0 auto 32px; text-align: center;
  font-size: clamp(16px, 1.6vw, 19px); color: var(--ink-soft);
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 52px; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--ink-soft); letter-spacing: .06em;
  text-transform: uppercase; flex-wrap: wrap; gap: 12px;
}
.clock { font-variant-numeric: tabular-nums; }

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden; white-space: nowrap;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 15px 0; margin: 44px 0 0; background: var(--paper-2);
}
.marquee .track { display: inline-flex; gap: 34px; animation: slide 34s linear infinite; }
.marquee span {
  font-size: 13px; letter-spacing: .15em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 500;
}
.marquee .sep { color: var(--accent); }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee .track { animation: none; } }

/* ---------- sections ---------- */
section { padding: 96px 0; }
.sec-head { margin-bottom: 38px; }
.sec-head h2 {
  margin: 12px 0 12px; font-size: clamp(32px, 4.6vw, 58px);
  line-height: 1.02; letter-spacing: -.025em; max-width: 18ch;
}
.sec-head p { margin: 0; color: var(--ink-soft); max-width: 56ch; font-size: 17px; }

/* ---------- filters ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.chip {
  border: 1px solid var(--line); background: transparent; color: var(--ink-soft);
  border-radius: 999px; padding: 9px 17px; font: inherit; font-size: 14px;
  cursor: pointer; transition: all .2s var(--ease);
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip .n { opacity: .5; margin-left: 7px; font-variant-numeric: tabular-nums; }

/* ---------- bento ---------- */
.bento {
  display: grid; gap: 14px;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 210px;
  grid-auto-flow: dense;
}
.tile {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
  grid-column: span 1; grid-row: span 2;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.tile:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(14,14,12,.13); }
.tile.wide { grid-column: span 2; grid-row: span 2; }
.tile.tall { grid-column: span 1; grid-row: span 3; }
.tile.big  { grid-column: span 2; grid-row: span 3; }

.tile video, .tile img.poster {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; display: block;
}
/* Explicit stacking, not DOM order. The video is inserted as the tile's
   FIRST child (see mount()), which without an explicit z-index leaves the
   poster <img> - later in the DOM - painting on top of it in some browsers'
   compositing paths. That means a fully loaded, actively playing video can
   sit invisibly behind its own poster forever, on some devices and not
   others, regardless of opacity. z-index removes the ambiguity outright. */
.tile video { z-index: 1; }
.tile img.poster { z-index: 0; }
/* Default to visible. A video that has loaded and is already playing must
   never be sitting invisibly behind its own poster because one JS event
   didn't fire - that is exactly the bug this replaced. The "ready" class is
   now a pure cosmetic head-start: a quick fade up from slightly-dim, not a
   gate that can fail closed. */
.tile video { opacity: .92; transition: opacity .3s var(--ease); }
.tile video.ready { opacity: 1; }
.tile { cursor: pointer; }

/* Shown only when autoplay was actually refused by the browser (data saver,
   low power mode, some in-app browsers all do this even when muted) - a
   visible way to start it, instead of a silent static poster forever. */
.tile.needs-tap::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 54px; height: 54px; border-radius: 50%;
  background: rgba(14,14,12,.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") no-repeat center / 22px;
  pointer-events: none;
}
.tile .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 34px 15px 14px;
  z-index: 2;
  background: linear-gradient(to top, rgba(0,0,0,.78), transparent);
  color: #fff; display: flex; justify-content: space-between; align-items: flex-end;
  gap: 10px; font-size: 13.5px; font-weight: 500;
}
.tile .cat {
  font-size: 10px; letter-spacing: .13em; text-transform: uppercase;
  font-weight: 700; color: #fff; background: rgba(255,255,255,.22);
  padding: 3px 8px; border-radius: 999px; backdrop-filter: blur(6px);
  white-space: nowrap;
}
.more-row { display: flex; justify-content: center; margin-top: 28px; }
.empty { color: var(--ink-soft); padding: 40px 0; }

@media (max-width: 1000px) { .bento { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) {
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 168px; }
  .tile.big, .tile.wide { grid-column: span 2; }
  .tile.tall { grid-row: span 2; }
}

/* ---------- process accordion ---------- */
.acc { border-top: 1px solid var(--line); }
.acc .row {
  border-bottom: 1px solid var(--line); padding: 26px 0; cursor: pointer;
  display: grid; grid-template-columns: 62px 1fr auto; gap: 18px; align-items: start;
  transition: opacity .3s;
}
.acc .row .idx { font-size: 13px; color: var(--ink-soft); padding-top: 6px; font-variant-numeric: tabular-nums; }
.acc .row h3 { margin: 0; font-size: clamp(21px, 2.6vw, 30px); letter-spacing: -.02em; }
.acc .row .body {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .45s var(--ease), opacity .35s var(--ease), margin .45s var(--ease);
  color: var(--ink-soft); max-width: 58ch;
}
.acc .row[aria-expanded="true"] .body { max-height: 220px; opacity: 1; margin-top: 12px; }
.acc .row .plus { font-size: 22px; color: var(--ink-soft); transition: transform .35s var(--ease); }
.acc .row[aria-expanded="true"] .plus { transform: rotate(45deg); }
.acc .tags { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 14px; }
.acc .tags span {
  font-size: 12px; border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 11px; color: var(--ink-soft);
}

/* ---------- pricing ---------- */
.plans { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }
.plan {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 34px; display: flex; flex-direction: column;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.plan:hover { transform: translateY(-4px); box-shadow: 0 20px 46px rgba(14,14,12,.1); }
.plan.featured { border-color: var(--ink); }
.plan .tag {
  align-self: flex-start; font-size: 10px; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase;
  background: var(--accent); color: #fff; padding: 5px 11px;
  border-radius: 999px; margin-bottom: 16px;
}
.plan h3 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.02em; }
.plan .blurb { color: var(--ink-soft); margin: 0 0 22px; }
.price { display: flex; align-items: baseline; gap: 9px; }
.price .amt { font-size: 54px; letter-spacing: -.035em; }
.price .per { color: var(--ink-soft); font-size: 14px; }
.turnaround { color: var(--ink-soft); font-size: 14px; margin: 6px 0 24px; }
.plan ul { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 11px; }
.plan li { position: relative; padding-left: 26px; font-size: 15px; }
.plan li::before {
  content: ""; position: absolute; left: 3px; top: 9px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
.plan .btn { width: 100%; margin-top: auto; }
.pay-note { text-align: center; color: var(--ink-soft); font-size: 13.5px; margin-top: 20px; }

/* ---------- faq ---------- */
.faq { display: grid; gap: 10px; }
.faq details {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 19px 22px;
}
.faq summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink-soft); }
.faq details[open] summary::after { content: "\2212"; }
.faq p { margin: 12px 0 0; color: var(--ink-soft); }

/* ---------- cta band ---------- */
.band {
  background: var(--ink); color: var(--paper);
  border-radius: 26px; padding: 66px 44px; text-align: center;
}
.band h2 { margin: 0 0 14px; font-size: clamp(30px, 4.4vw, 52px); letter-spacing: -.025em; }
.band p { color: #a8a79f; margin: 0 auto 26px; max-width: 46ch; }
.band .btn { background: var(--paper); color: var(--ink); }
.band .btn:hover { background: #fff; }

footer {
  padding: 44px 0 60px; border-top: 1px solid var(--line);
  color: var(--ink-soft); font-size: 14px;
  display: flex; gap: 18px; flex-wrap: wrap; align-items: center;
}
footer .spacer { flex: 1; }
footer a:hover { color: var(--ink); }

/* ---------- modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100; padding: 20px;
  background: rgba(14,14,12,.5); backdrop-filter: blur(5px);
  display: grid; place-items: center;
}
.modal[hidden] { display: none; }
.modal .box {
  background: var(--card); border-radius: 20px; padding: 32px;
  width: min(460px, 100%); border: 1px solid var(--line);
}
.modal h3 { margin: 0 0 6px; font-size: 27px; letter-spacing: -.02em; }
.modal p.small { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 22px; }
.field { display: grid; gap: 6px; margin-bottom: 15px; }
.field label { font-size: 13px; color: var(--ink-soft); }
.field input {
  background: var(--paper); border: 1px solid var(--line); color: var(--ink);
  border-radius: 11px; padding: 13px 14px; font: inherit;
}
.field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.modal .row { display: flex; gap: 10px; margin-top: 6px; }
.modal .row .btn { flex: 1; }
.err { color: #c0341a; font-size: 14px; min-height: 20px; }
.wait { color: var(--ink-soft); font-size: 14px; min-height: 20px; }

/* ---------- narrow screens ----------
   The nav links overflowed the header below ~700px, pushing the page wider
   than the viewport. Brand and the one CTA are what matter on a phone. */
@media (max-width: 760px) {
  .nav { gap: 16px; height: 64px; }
  .nav a.link { display: none; }
  .wrap { padding: 0 18px; }
  section { padding: 64px 0; }
  .hero { padding: 54px 0 26px; }
}

@media (max-width: 560px) {
  .hero-foot {
    flex-direction: column; align-items: flex-start; gap: 7px;
    font-size: 11px;
  }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .band { padding: 46px 22px; border-radius: 18px; }
  .plan { padding: 26px; }
  .acc .row { grid-template-columns: 40px 1fr auto; gap: 12px; }
  .modal .box { padding: 24px; }
}

/* a phone should always have the buy action within thumb reach */
.mobile-cta { display: none; }
@media (max-width: 760px) {
  .mobile-cta {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
    background: rgba(247,246,243,.95); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); gap: 10px; align-items: center;
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .mobile-cta .price-min { flex: 1; font-size: 13.5px; color: var(--ink-soft); }
  .mobile-cta .btn { padding: 12px 20px; }
  body { padding-bottom: 74px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
