/* ---------------------------------------------------------------
   Five Day Sites

   The identity is a ledger: ruled paper, a spec-sheet grid, numbers
   set large, everything squared off. It should read like a working
   studio's job sheet — deliberate, but cheap in the way good print is
   cheap. Not a agency-of-record brochure, and not the centred-hero,
   three-icon-cards template we sell against.

   Two accents, both earned:
     rust    the live one — numerals, links, the headline italic
     petrol  the structural one — the five-day bar, focus states
   --------------------------------------------------------------- */

:root {
  --paper:   #f4f1ea;
  --paper-2: #ece7dc;
  --card:    #16150f;
  --ink:     #14130f;
  --ink-2:   #3a372f;
  --muted:   #6e6a60;
  --rule:    #d7d1c3;
  --rust:    #b8452a;
  --petrol:  #17423d;

  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --gutter: clamp(20px, 5vw, 64px);
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -9999px; background: var(--ink); color: var(--paper); padding: 10px 16px; z-index: 20; }
.skip:focus { left: 12px; top: 12px; }

::selection { background: var(--rust); color: var(--paper); }

:focus-visible { outline: 2px solid var(--petrol); outline-offset: 3px; }

/* ------------------------------------------------------------ bar */

.bar {
  display: flex; align-items: center; gap: 18px;
  padding: 16px var(--gutter);
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 12px; letter-spacing: .09em; text-transform: uppercase;
  background: var(--paper);
}
.mark { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
/* Small rules between the words — the ledger motif, at its smallest. */
.mark-rule { width: 12px; height: 1px; background: var(--rust); }
.bar-meta { color: var(--muted); display: none; }
.bar-link {
  margin-left: auto; color: var(--ink); text-decoration: none;
  padding-bottom: 3px; background-image: linear-gradient(var(--rust), var(--rust));
  background-size: 100% 1px; background-repeat: no-repeat; background-position: 0 100%;
  transition: color .15s ease;
}
.bar-link:hover { color: var(--rust); }
@media (min-width: 720px) { .bar-meta { display: inline; } }

/* ----------------------------------------------------------- hero */

.hero {
  position: relative;
  padding: clamp(52px, 10vw, 124px) 0 clamp(44px, 8vw, 92px);
}
/* Ruled paper, on its own layer. Masking the section itself faded the type
   along with the rules — mask-image applies to content, not just background. */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom, var(--rule) 0 1px, transparent 1px 34px);
  background-position: 0 6px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 60%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 60%, transparent);
  opacity: .65;
}
.hero .wrap { position: relative; z-index: 1; }

.eyeline {
  display: flex; align-items: baseline; gap: 12px;
  font-family: var(--mono);
  font-size: 12px; letter-spacing: .11em; text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 22px;
}
.num {
  font-family: var(--serif); font-size: 26px; line-height: 1;
  color: var(--rust); letter-spacing: 0;
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 7vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.018em;
  max-width: 16ch;
  margin: 0 0 30px;
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 em { font-style: italic; color: var(--rust); }

.lede {
  max-width: 58ch;
  font-size: clamp(17px, 2.1vw, 20px);
  color: var(--ink-2);
  margin: 0 0 46px;
}

.spec {
  display: grid; grid-template-columns: 1fr; gap: 0; margin: 0;
  border-top: 2px solid var(--ink);
}
.spec > div {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; padding: 13px 0;
  border-bottom: 1px solid var(--rule);
}
.spec dt {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.spec dd { margin: 0; font-family: var(--serif); font-size: 27px; line-height: 1; }
@media (min-width: 780px) {
  .spec { grid-template-columns: repeat(4, 1fr); gap: 0 32px; }
  .spec > div { flex-direction: column; justify-content: flex-start; gap: 10px; padding: 18px 0 22px; }
  .spec dd { font-size: 34px; }
}

/* ---------------------------------------------------------- bands */

.band { padding: clamp(46px, 7.5vw, 88px) 0; border-top: 1px solid var(--rule); }

.grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 900px) {
  .grid { grid-template-columns: 190px minmax(0, 1fr); gap: 0 56px; }
  .grid .eyeline { margin-top: 8px; flex-direction: column; gap: 8px; }
  .grid .num { font-size: 46px; }
}

h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(30px, 4.6vw, 46px); line-height: 1.08;
  letter-spacing: -0.012em; margin: 0 0 8px;
}
h3 { font-size: 19px; margin: 0 0 8px; letter-spacing: -0.005em; }
h4 {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px;
}

.note { max-width: 62ch; color: var(--ink-2); margin: 0 0 28px; }
.note strong { color: var(--ink); }
.kicker {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0;
}

/* ---------------------------------------------------------- proof */

.work-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 16px 24px; margin-bottom: 20px;
}

/* Always visible, never behind the embed. */
.btn-open {
  flex: none;
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 12px;
  letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  color: var(--paper); background: var(--petrol);
  border: 1px solid var(--petrol);
  padding: 12px 20px;
  transition: background .15s ease, color .15s ease;
}
.btn-open:hover { background: var(--rust); border-color: var(--rust); }
.btn-open span { transition: transform .15s ease; }
.btn-open:hover span { transform: translate(2px, -2px); }

.frame { margin: 0; }

/* Two builds in one band. A rule between them and nothing else: this
   should read as a short list of work, not a carousel. */
.build + .build { margin-top: 46px; padding-top: 42px; border-top: 1px solid var(--rule); }

.screen {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--card);
  border: 1px solid var(--ink);
  overflow: hidden;
}
@media (min-width: 720px) { .screen { aspect-ratio: 16 / 10; } }

/* The embed is laid out at a real desktop size and scaled down, so what
   you see is the actual desktop layout rather than the site crushed into
   a phone-width slot. JS sets the transform. */
.stage {
  position: absolute; top: 0; left: 0;
  width: 1280px; height: 800px;
  transform-origin: top left;
  transform: scale(.26);
}
.stage iframe { width: 1280px; height: 800px; border: 0; display: block; }

/* Poster: the whole story on a phone, and the thing you see on desktop until
   the live embed has loaded behind it. */
.poster {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  display: block;
}
/* Once the live embed is up on desktop, the poster steps aside. */
.screen.live .poster { display: none; }
/* On a phone there is no embed at all — only the poster, which carries its
   own alt text, so the overlay would just be in the way. */
.screen.poster-only .stage { display: none; }
.screen.poster-only .veil { display: none; }

/* No poster yet. The frame's own background is already --card, so all that is
   needed is for the missing image not to show — opacity rather than display,
   because display:none would stop the lazy load from ever firing and the
   poster could then never arrive. */
.screen.no-poster .poster { opacity: 0; }
.screen.poster-only.no-poster .veil {
  display: flex; cursor: default; pointer-events: none;
}
.screen.poster-only.no-poster .veil-cta { display: none; }

.veil {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 20px;
  background: rgba(22,21,15,.72);
  border: 0; cursor: pointer; color: var(--paper);
  transition: background .2s ease;
}
.screen.live .veil { background: linear-gradient(to top, rgba(22,21,15,.72), rgba(22,21,15,0) 55%); }
.screen.live .veil { justify-content: flex-end; }
.screen.open .veil { display: none; }
.veil-title { font-family: var(--serif); font-size: 30px; line-height: 1; }
.screen.live .veil-title { display: none; }
.veil-cta {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: .11em; text-transform: uppercase;
  border: 1px solid rgba(244,241,234,.45); padding: 9px 15px;
}
.veil:hover .veil-cta { background: var(--rust); border-color: var(--rust); }

figcaption {
  display: flex; flex-wrap: wrap; gap: 6px 20px;
  justify-content: space-between; align-items: baseline; margin-top: 11px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
}
figcaption a { color: var(--rust); text-decoration: none; border-bottom: 1px solid currentColor; }

/* ------------------------------------------------- the five days */

.days-block { margin: 0 0 40px; }
.days-head {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 12px;
}

.days {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 6px; margin: 0;
}
.day { position: relative; }
.day i {
  display: block; height: 10px; background: var(--rule);
  position: relative; overflow: hidden;
}
.day i::after {
  content: ""; position: absolute; inset: 0;
  background: var(--petrol);
  /* Rests FILLED. If animations never run — reduced motion, a background tab,
     a browser that throttles them — the bar shows the finished five days
     rather than five empty slots, which would just look broken. */
  transform: scaleX(1); transform-origin: left;
}
.day span {
  display: block; margin-top: 8px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: .1em; color: var(--muted);
}
.day[data-milestone] span { color: var(--ink); }

/* The milestones are what make this a schedule rather than a row of numbers.
   They used to be hidden below 560px, which left five bare digits under a rule
   on every phone — the one width where the bar most needed explaining. They
   show at every size now and wrap inside their own column. */
.day[data-milestone]::after {
  content: attr(data-milestone);
  display: block;
  margin-top: 4px;
  font-family: var(--mono); font-size: 10px; line-height: 1.25;
  letter-spacing: .04em; text-transform: uppercase; color: var(--rust);
  overflow-wrap: break-word;
}

/* Fill left to right, once, on arrival. `both` holds the from-state through
   each segment's delay so they arrive in sequence rather than all at once. */
.days.run .day i::after { animation: fill .42s cubic-bezier(.2,.7,.3,1) both; }
.days.run .day:nth-child(1) i::after { animation-delay: 0s; }
.days.run .day:nth-child(2) i::after { animation-delay: .13s; }
.days.run .day:nth-child(3) i::after { animation-delay: .26s; }
.days.run .day:nth-child(4) i::after { animation-delay: .39s; }
.days.run .day:nth-child(5) i::after { animation-delay: .52s; }

@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------------------------------------------------------- steps */

.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; }
.steps li {
  counter-increment: s; position: relative;
  padding: 24px 0 24px 54px;
  border-top: 1px solid var(--rule); max-width: 64ch;
}
.steps li:first-child { border-top: 2px solid var(--ink); }
.steps li::before {
  content: counter(s, decimal-leading-zero);
  position: absolute; left: 0; top: 24px;
  font-family: var(--mono); font-size: 12px; color: var(--rust); letter-spacing: .08em;
}
.steps p { margin: 0; color: var(--ink-2); }

/* -------------------------------------------------------- pricing */

.price {
  font-family: var(--serif);
  font-size: clamp(76px, 14vw, 152px);
  line-height: .9; margin: 0; letter-spacing: -0.035em;
}
.price .cur { font-size: .4em; vertical-align: super; color: var(--rust); margin-right: 5px; }
.price-sub {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  margin: 16px 0 38px;
}

.two { display: grid; grid-template-columns: 1fr; gap: 34px; }
@media (min-width: 700px) { .two { grid-template-columns: 1fr 1fr; gap: 54px; } }

.tick, .cross { list-style: none; margin: 0; padding: 0; }
.tick li, .cross li {
  position: relative; padding: 9px 0 9px 26px;
  border-bottom: 1px solid var(--rule); font-size: 16px;
}
.tick li::before { content: "+"; position: absolute; left: 0; color: var(--rust); font-family: var(--mono); }
.cross li::before { content: "\2212"; position: absolute; left: 0; color: var(--muted); font-family: var(--mono); }

.fineprint { margin: 20px 0 0; font-size: 15px; color: var(--muted); max-width: 40ch; }

/* -------------------------------------------------------- contact */

/* There is no form. A mailto that works beats a form that has to apologise
   for not being wired to anything. */
.mailto {
  display: inline-flex; flex-direction: column; gap: 7px;
  max-width: 100%;
  margin: 6px 0 22px; padding: 18px 26px;
  text-decoration: none; color: var(--paper);
  background: var(--ink); border: 1px solid var(--ink);
  transition: background .14s ease, border-color .14s ease;
}
.mailto:hover { background: var(--rust); border-color: var(--rust); }
.mailto-label {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--rule);
}
.mailto-addr {
  font-family: var(--serif); font-size: clamp(23px, 5.4vw, 34px);
  line-height: 1.05; overflow-wrap: anywhere;
}

/* --------------------------------------------------------- footer */

footer { border-top: 2px solid var(--ink); padding: 28px 0 44px; }
.foot {
  display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}

/* --------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
