/* MOSAFRAME site styles.
   Colours and type are set once here; change the variables to rebrand. */

@font-face {
  font-family: "Archivo";
  src: url("archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --enamel: #f4f6f1;      /* page */
  --ink: #14201b;         /* text */
  --muted: #47574f;       /* secondary text */
  --green: #0e5a3c;       /* brand, buttons, the reel frame */
  --green-deep: #0a4630;  /* button hover */
  --pink: #f3a8bc;        /* accent fills and type on green */
  --line: #c7d1c6;        /* table and divider lines */

  --font: "Archivo", "Arial Nova", Arial, sans-serif;
  --page: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 24px; }

body {
  margin: 0;
  background: var(--enamel);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, dl, dd, figure, table { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }

/* Display type: the wide, heavy cut of the family, like board lettering. */
h1, h2, h3, dt, .plans tbody th, .plan-price, .card-price strong, .price-line strong {
  font-stretch: 125%;
  font-weight: 800;
  letter-spacing: -0.015em;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--enamel);
}
.skip-link:focus { top: 12px; z-index: 10; }

.setup-note {
  padding: 10px var(--gutter);
  background: var(--ink);
  color: var(--enamel);
  font-size: 0.9375rem;
}

/* Header */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  max-width: var(--page);
  margin: 0 auto;
  padding: 28px var(--gutter) 0;
}

/* The logo is drawn in the page (see index.html). Its frame and letters use this colour. */
.logo { display: block; color: var(--green); }
.logo-art { display: block; height: 36px; width: auto; }

.site-nav { display: flex; gap: 28px; font-size: 1rem; white-space: nowrap; }
.site-nav a { text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--ink); }

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(250px, 27vw, 340px);
  gap: clamp(32px, 6vw, 88px);
  align-items: end;
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 88px) var(--gutter) clamp(56px, 8vw, 104px);
}

h1 {
  font-size: clamp(2.375rem, 5vw, 4.25rem);
  line-height: 0.98;
  text-wrap: balance;
}

.lede {
  max-width: 34em;
  margin-top: 28px;
  font-size: 1.25rem;
  line-height: 1.5;
}

.price-line { margin-top: 20px; color: var(--muted); }
.price-line strong { color: var(--ink); font-size: 1.375rem; }

.hero .wa-button { margin-top: 32px; }

/* WhatsApp button */

.wa-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-radius: 4px;
  background: var(--green);
  color: var(--enamel);
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.2;
  text-decoration: none;
}
.wa-button:hover { background: var(--green-deep); }

.wa-icon { width: 22px; height: 22px; flex: none; fill: currentColor; }

.wa-button-light { background: var(--enamel); color: var(--green); }
.wa-button-light:hover { background: #fff; }

/* The reel frame: a 9:16 board that plays the shot list of a walkthrough. */

.reel { container-type: inline-size; }

.reel-frame {
  position: relative;
  aspect-ratio: 9 / 16;
  display: flex;
  flex-direction: column;
  padding: 7cqi;
  background: var(--green);
  color: var(--enamel);
}

.reel-progress {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.6cqi;
}
.reel-progress li {
  height: 3px;
  background: rgb(244 246 241 / 0.28);
  overflow: hidden;
}
.reel-progress li::after {
  content: "";
  display: block;
  width: 0;
  height: 100%;
  background: var(--enamel);
}
.reel-progress li.is-done::after { width: 100%; }
.reel-progress li.is-active::after { animation: reel-fill var(--shot-time, 1800ms) linear forwards; }
.is-paused .reel-progress li.is-active::after { animation: none; width: 100%; }

@keyframes reel-fill { to { width: 100%; } }

.reel-count {
  margin-top: 4cqi;
  font-size: 4.4cqi;
  font-variant-numeric: tabular-nums;
}

.reel-shots {
  margin-top: auto;
  color: var(--pink);
  font-stretch: 125%;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* Without the script, or with reduced motion: all six shots as a still list. */
.reel-shots li { font-size: 8.6cqi; padding: 1.6cqi 0; }

/* With the script running: one shot at a time, cut like an edit. */
.is-playing .reel-shots li { display: none; font-size: 13.8cqi; line-height: 0.95; padding: 0; }
.is-playing .reel-shots li.is-active { display: block; }

.reel-note { margin-top: 5cqi; font-size: 4.4cqi; line-height: 1.35; }

.reel-toggle {
  position: absolute;
  top: 12cqi;
  right: 7cqi;
  padding: 1.4cqi 3cqi;
  border: 1px solid rgb(244 246 241 / 0.6);
  border-radius: 4px;
  background: transparent;
  color: var(--enamel);
  font: inherit;
  font-size: 4cqi;
  cursor: pointer;
}
.reel-toggle:hover { background: rgb(244 246 241 / 0.14); }
.reel-toggle:focus-visible { outline-color: var(--enamel); }

.reel figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.4;
}

/* Listing body: details on the left, contact card stuck to the right. */

.listing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(72px, 10vw, 128px);
}

.details > section + section { margin-top: clamp(64px, 8vw, 104px); }

h2 {
  font-size: clamp(1.75rem, 3vw, 2.375rem);
  line-height: 1.05;
}

.details h2 { margin-bottom: 28px; }

h3, dt { font-size: 1.25rem; line-height: 1.2; text-wrap: balance; }

/* Key features */

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 40px;
}
.features li {
  position: relative;
  padding-left: 26px;
}
.features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 10px;
  height: 10px;
  background: var(--pink);
}

/* Two kinds of video */

.kinds {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 40px;
}
.kinds h3 { margin-bottom: 10px; }

/* Plans */

.plans {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.plans thead th {
  padding: 0 16px 12px 0;
  border-bottom: 2px solid var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
  vertical-align: bottom;
}
.plans tbody th,
.plans td {
  padding: 20px 16px 20px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: baseline;
}
.plans tbody th { font-size: 1.25rem; padding-right: 32px; white-space: nowrap; }
.plans thead th:first-child,
.plans tbody th { padding-left: 16px; }
.plan-price { font-size: 1.375rem; }
.plans .num { font-size: 1.375rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.plans abbr { text-decoration: none; }
.plan-pilot { background: var(--pink); }
.plan-pilot th,
.plan-pilot td { border-bottom-color: var(--pink); }

.table-note { margin-top: 16px; color: var(--muted); font-size: 1rem; }

/* Promises */

.promises {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 40px;
}
.promises dt { margin-bottom: 8px; }

/* How it works: a real sequence, so it is numbered. */

.steps { counter-reset: step; display: grid; gap: 28px; max-width: 40em; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  column-gap: 12px;
}
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  color: var(--green);
  font-stretch: 125%;
  font-weight: 800;
  font-size: 2.5rem;
  line-height: 0.9;
}
.steps h3 { margin-bottom: 6px; }

.prose { max-width: 38em; }
.prose p + p { margin-top: 16px; }

/* Send us a listing */

.send-intro { max-width: 34em; }
.send-form { display: grid; gap: 20px; max-width: 30em; margin-top: 28px; }
.send-form .wa-button { justify-self: start; border: 0; font-family: inherit; cursor: pointer; }
.field label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 1rem; }
.field .optional { font-weight: 400; color: var(--muted); }
.field input {
  width: 100%;
  padding: 13px 14px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.field input::placeholder { color: #7b8a82; }
.field input[aria-invalid="true"] { border-color: #a3123a; }
.field-error { margin-top: 6px; color: #a3123a; font-size: 1rem; font-weight: 600; }
.form-note { color: var(--muted); font-size: 0.9375rem; }

/* Contact card */

.contact-card {
  position: sticky;
  top: 24px;
  padding: 32px 24px;
  background: var(--green);
  color: var(--enamel);
}
.contact-card h2 { font-size: 1.625rem; }
.card-price { margin-top: 16px; }
.card-price strong { display: block; color: var(--pink); font-size: 3rem; line-height: 1; }
.card-list { margin-top: 20px; padding-top: 20px; border-top: 1px solid rgb(244 246 241 / 0.3); }
.card-list li + li { margin-top: 6px; }
.contact-card .wa-button { margin-top: 28px; width: 100%; justify-content: center; gap: 10px; padding-inline: 12px; font-size: 1rem; }
.contact-card :focus-visible { outline-color: var(--enamel); }

/* Footer */

.site-footer {
  padding: 48px var(--gutter) 56px;
  background: var(--ink);
  color: var(--enamel);
}
.site-footer > * { max-width: var(--page); margin-inline: auto; }
.site-footer .logo { color: var(--enamel); margin-bottom: 20px; }
.site-footer .logo-art { height: 32px; }
.footer-small { margin-top: 24px; font-size: 0.9375rem; opacity: 0.75; }
.site-footer :focus-visible { outline-color: var(--enamel); }

/* Phone bar: the same button, always in reach. */

.mobile-bar { display: none; }

/* Narrower screens */

@media (max-width: 960px) {
  .listing { grid-template-columns: minmax(0, 1fr); }
  .contact-card { position: static; max-width: 420px; }
}

@media (max-width: 720px) {
  body { font-size: 1.0625rem; padding-bottom: 84px; }

  .site-header { padding-top: 20px; }
  .site-header .logo-art { height: 26px; }
  .site-nav { gap: 16px; font-size: 0.9375rem; }

  .hero { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .reel { max-width: 300px; }
  .hero .wa-button { display: none; }

  .features,
  .kinds,
  .promises { grid-template-columns: minmax(0, 1fr); }

  /* The plans table becomes one block per plan. */
  .plans thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .plans, .plans tbody, .plans tr, .plans th, .plans td { display: block; }
  .plans tr { padding: 20px 16px; border-bottom: 1px solid var(--line); }
  .plans tbody th,
  .plans td { padding: 0; border: 0; }
  .plans tbody th { margin-bottom: 6px; font-size: 1.5rem; }
  .plans td.num {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 10px;
  }
  .plans td.num::before {
    content: attr(data-label);
    font-size: 1.0625rem;
    font-weight: 400;
  }

  .mobile-bar {
    display: block;
    position: fixed;
    inset: auto 0 0 0;
    padding: 12px var(--gutter);
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    background: var(--enamel);
    border-top: 1px solid var(--line);
  }
  .mobile-bar .wa-button { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
