/* Loopworks, loopworkshq.com
   Flat saturated fields, heavy type, black-and-white archival photographs stuck on. Fonts are
   self-hosted, so the page contacts no other site. */

/* ---------- fonts (SIL Open Font License, see ../fonts/) ---------- */
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/unbounded-800-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/unbounded-800-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 500; font-display: swap; src: url('../fonts/onest-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 500; font-display: swap; src: url('../fonts/onest-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* the studio's ad face, used only on the Try it canvas, so it loads when the visitor gets there */
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/barlow-condensed-800-latin.woff') format('woff'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/barlow-condensed-700-latin.woff') format('woff'); }

/* ---------- tokens ---------- */
:root {
  --bg: #1423b8;
  --surface: #1220a6;
  --ink: #ffffff;
  --muted: #b4bcf0;
  --accent: #1fc27a;
  --accent-hover: #3ad690;
  --accent-ink: #0a0a0a;
  --field-1: #1423b8;  --field-1-ink: #ffffff;
  --field-2: #000000;  --field-2-ink: #ffffff;
  --field-3: #f7dd47;  --field-3-ink: #000000;
  --field-4: #e9479f;  --field-4-ink: #000000;
  --black-step: #161616;
  --yellow-step: #e8cd2f;
  --yellow-light: #fbec8e;

  --font-display: 'Unbounded', 'Arial Black', sans-serif;
  --font-text: 'Onest', system-ui, sans-serif;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.125rem, 1.05rem + 0.2vw, 1.1875rem);
  --step-head: clamp(2rem, 1.3rem + 2.6vw, 3.5rem);
  --step-display: clamp(3rem, -0.2rem + 13.7vw, 13.75rem);

  --margin: clamp(1rem, 2.4vw, 2.25rem);
  --gutter: clamp(1rem, 2vw, 1.75rem);
  --pad: clamp(6rem, 10vw, 10rem);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-text); font-size: var(--step-body); line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, p, figure, blockquote, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:target { scroll-margin-top: 5rem; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
p { text-wrap: pretty; }
h1, h2 { text-wrap: balance; font-weight: 800; }
.small { font-size: var(--step-small); line-height: 1.45; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.head { font-family: var(--font-display); font-size: var(--step-head); line-height: 1.02; letter-spacing: -0.03em; text-transform: uppercase; }

/* ---------- controls ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0 1.4rem; background: var(--accent); color: var(--accent-ink); font-family: var(--font-text); font-weight: 500; font-size: var(--step-body); line-height: 1; text-decoration: none; white-space: nowrap; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease; }
.button:hover { background: var(--accent-hover); }
.button:active { transform: scale(0.97); }
.link-plain { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; transition: text-decoration-thickness var(--t-hover) ease; }
.link-plain:hover { text-decoration-thickness: 0.16em; }
.field { display: block; width: 100%; min-height: 3rem; padding: 0.8rem 1rem; background: var(--yellow-light); color: #000; border: 0; border-radius: 0; font-size: var(--step-body); line-height: 1.4; resize: vertical; transition: background-color var(--t-hover) ease; }
.field:focus { background: #ffffff; }
.field:focus-visible { outline: 3px solid #000; outline-offset: 0; }

/* ---------- header: wordmark and the one action, taking the ink of each chapter ---------- */
.top { position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; justify-content: space-between; align-items: center; padding: 1.1rem var(--margin); color: var(--header-ink, #ffffff); background: var(--header-fill, transparent); transition: color 300ms ease, background-color 300ms ease, transform 360ms var(--ease-out); pointer-events: none; }
.top.is-away { transform: translateY(-130%); }
.top > *, .top.is-filled { pointer-events: auto; }
.wordmark { font-family: var(--font-display); font-weight: 800; font-size: var(--step-body); line-height: 1; letter-spacing: -0.02em; text-transform: uppercase; text-decoration: none; }
.top .wordmark { padding-block: 13px; margin-block: -13px; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto 1fr auto; column-gap: var(--gutter); padding: 15svh var(--margin) var(--margin); background: var(--field-1); color: var(--field-1-ink); overflow: hidden; }
.hero-title { grid-column: 1 / -1; grid-row: 1; position: relative; z-index: 2; font-family: var(--font-display); font-size: var(--step-display); line-height: 1; letter-spacing: -0.03em; text-transform: uppercase; }
.hero-title .l1, .hero-title .l2 { display: block; }
.hero-title .l2 { color: var(--field-3); }
.hero-photo { grid-column: 8 / -1; grid-row: 1 / 4; align-self: end; justify-self: end; width: min(100%, 36rem); position: relative; z-index: 1; margin-bottom: 1rem; }
.hero-photo img { transform: rotate(-4deg); background: #000; }
.hero-photo figcaption { margin-top: 1.4rem; color: var(--muted); text-align: right; }
.hero-line { grid-column: 1 / 6; grid-row: 2; align-self: start; max-width: 31ch; margin-top: 2.5rem; position: relative; z-index: 2; }

/* ---------- how it works: one verb at a time ---------- */
.panel { position: relative; height: 100svh; min-height: 30rem; background: #000; color: #fff; }
.panel picture, .panel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.verb-wrap { position: absolute; inset: 0; padding-top: calc(50svh - var(--step-display) / 2); pointer-events: none; }
.verb { position: sticky; top: calc(50svh - var(--step-display) / 2); text-align: center; color: var(--field-3); font-family: var(--font-display); font-size: var(--step-display); line-height: 1; letter-spacing: -0.03em; text-transform: uppercase; }
.panel-note { position: absolute; left: var(--margin); bottom: var(--margin); width: min(33rem, calc(100% - 2 * var(--margin))); background: #000; color: #fff; padding: 1.25rem 1.5rem 1.35rem; }
.panel-note .small { margin-top: 0.6rem; color: #c8c8c8; }

/* ---------- one word makes the ad: two words compared ---------- */
.showcase { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding: var(--pad) var(--margin) 0; background: var(--field-2); color: var(--field-2-ink); }
.show-head { display: contents; }
.showcase .head { grid-column: 1 / 7; }
.showcase .show-head p { grid-column: 8 / -1; max-width: 46ch; padding-top: 0.4rem; }
.specimens { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); margin-top: 12vh; }
.specimen:first-child { grid-column: 1 / 7; }
.specimen:last-child { grid-column: 7 / -1; }
.specimens { padding-bottom: var(--pad); }
.specimen figcaption { margin-top: 1.25rem; }
.word { font-family: var(--font-display); font-weight: 800; font-size: var(--step-display); line-height: 1; letter-spacing: -0.03em; text-transform: uppercase; }

/* ---------- try it: the live thing ---------- */
.try { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: start; padding: var(--pad) var(--margin); background: var(--field-3); color: var(--field-3-ink); }
.try-copy { grid-column: 1 / 7; padding-right: clamp(0rem, 3vw, 3rem); }
.try-copy > p { margin-top: 1.5rem; max-width: 44ch; }
.try-form { display: grid; gap: 0.5rem; margin-top: 2.5rem; }
.try-label { font-weight: 500; }
.try-label + .field { margin-bottom: 1rem; }
.try-form .button { justify-self: start; margin-top: 0.75rem; }
.try-preview { grid-column: 7 / -1; }
.ad-img { width: 100%; aspect-ratio: 4 / 5; background: #cdc2b4; }
.try-preview figcaption { margin-top: 0.9rem; }

/* ---------- every ad, checked: the printed card ---------- */
.checks { display: flex; justify-content: center; padding: var(--pad) var(--margin) 0; background: var(--field-1); color: #fff; overflow: hidden; }
.card { width: min(56vw, 54rem); aspect-ratio: 5 / 7; padding: clamp(1.75rem, 3.9vw, 3.5rem) clamp(1.75rem, 3.9vw, 3.5rem) 26svh; margin-bottom: -18svh; background: #ffffff; color: #000; text-align: center; }
.card .head { font-size: var(--step-head); }
.card-photo { margin-top: 2.25rem; }
.card-video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #000; }
.card-photo figcaption { margin-top: 0.6rem; }
.check-list { margin-top: 2.25rem; line-height: 1.7; }
.check-list li { text-wrap: balance; }
.check-list li + li { margin-top: 0.15rem; }

/* ---------- price: one sentence ---------- */
.price { display: flex; flex-direction: column; justify-content: center; min-height: 80svh; padding: var(--pad) var(--margin); background: var(--field-4); color: var(--field-4-ink); }
.price-line { font-family: var(--font-display); font-size: var(--step-display); line-height: 1; letter-spacing: -0.03em; text-transform: uppercase; }
.price-line .pl { display: block; }
.chip { display: inline-block; padding: 0 0.15em; background: var(--accent); color: var(--accent-ink); }
.price-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: end; margin-top: 4rem; }
.price-row > p { grid-column: 1 / 7; max-width: 46ch; }
.price-act { grid-column: 9 / -1; justify-self: end; display: flex; flex-direction: column; align-items: flex-end; gap: 0.9rem; }
.price-act .link-plain { padding-block: 9px; margin-block: -9px; }

/* ---------- questions: filled tiles ---------- */
.faq { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: start; padding: var(--pad) var(--margin); background: var(--field-2); color: var(--field-2-ink); }
.faq-head { grid-column: 1 / 6; position: sticky; top: 6rem; }
.faq-list { grid-column: 6 / -1; display: grid; gap: 8px; }
.faq-list details { background: var(--black-step); transition: background-color var(--t-hover) ease; }
@media (hover: hover) { .faq-list details:hover { background: #222222; } }
.faq-list details[open] { background: var(--accent); color: var(--accent-ink); }
.faq-list summary { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; min-height: 72px; padding: 0.9rem 24px; font-weight: 500; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:focus-visible { outline-offset: -3px; }
.plus { position: relative; flex: none; width: 16px; height: 16px; }
.plus::before, .plus::after { content: ""; position: absolute; left: 0; top: 6.5px; width: 16px; height: 3px; background: currentColor; transition: transform 240ms var(--ease-out); }
.plus::after { transform: rotate(90deg); }
.faq-list details[open] .plus::after { transform: rotate(0deg); }
.faq-list details p { max-width: 52ch; padding: 0 24px 1.5rem; }

/* ---------- contact: photo strip and the three-cell bar ---------- */
.contact { padding: 48px 0 var(--pad); background: var(--field-3); color: var(--field-3-ink); }
.strip { overflow: hidden; }
.strip-track { display: flex; gap: 8px; width: max-content; padding-right: 8px; }
.strip img { height: 150px; width: auto; background: #000; }
.contact-body { padding: 72px var(--margin) 0; }
.bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 40px; }
.cell { display: flex; align-items: center; justify-content: center; min-height: 96px; background: var(--yellow-step); transition: background-color var(--t-hover) ease; }
.cell:focus-within { background: var(--yellow-light); }
.cell input { width: 100%; min-height: 96px; padding: 0 1rem; background: transparent; border: 0; text-align: center; font-size: var(--step-body); color: #000; }
.cell input::placeholder { color: #000; opacity: 0.72; }
.cell input:focus { outline: none; }
.submit { background: #000; color: var(--field-3); font-weight: 500; font-size: var(--step-body); transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.submit:hover { background: #262626; }
.submit:active { transform: scale(0.985); }
.submit:focus-visible { outline: 3px solid #000; outline-offset: 3px; }
.bar-notes { margin-top: 0.9rem; }

/* ---------- footer: photograph half, menu half ---------- */
.foot { display: grid; grid-template-columns: 1fr 1fr; min-height: 100svh; background: var(--field-1); color: #fff; }
.foot-photo { position: relative; min-height: 22rem; background: #000; }
.foot-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; }
.foot-side { padding: 7.5rem var(--margin) var(--margin) clamp(1.5rem, 8.3vw, 8rem); display: flex; flex-direction: column; }
.foot-mark { margin-bottom: 2.5rem; }
.foot-menu { display: grid; gap: calc(1.1rem - 12px); }
.foot-menu a { display: inline-block; padding-block: 6px; font-family: var(--font-display); font-weight: 800; font-size: var(--step-head); line-height: 1; letter-spacing: -0.03em; text-transform: uppercase; text-decoration: none; transition: transform 320ms var(--ease-out), color var(--t-hover) ease; }
@media (hover: hover) {
  .foot-menu:hover a { color: var(--muted); }
  .foot-menu a:hover { color: #fff; transform: translateX(12px); }
}
.foot-menu a:focus-visible { color: #fff; transform: translateX(12px); }
.foot-blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 64px; }
.foot-blocks p + p { margin-top: 0.9rem; }
.foot-blocks .link-plain { display: inline-block; padding-block: 11px; margin-block: -11px; }
.foot-credits { margin-top: auto; padding-top: 3rem; max-width: 60ch; color: var(--muted); }
.foot-credits + .small { margin-top: 0.6rem; color: var(--muted); }

/* ---------- tablet: two-column compositions stack ---------- */
@media (max-width: 63.99em) {
  .hero-photo { grid-column: 5 / -1; }
  .showcase .head, .showcase .show-head p { grid-column: 1 / -1; }
  .showcase .show-head p { padding-top: 0; margin-top: 1.5rem; }
  .try-copy, .try-preview { grid-column: 1 / -1; }
  .try-copy { padding-right: 0; }
  .try-copy > p { max-width: 52ch; }
  .try-preview { width: min(100%, 34rem); margin-top: 3.5rem; }
  .faq-head { grid-column: 1 / -1; position: static; margin-bottom: 2.5rem; }
  .faq-list { grid-column: 1 / -1; }
  .card { width: min(84vw, 40rem); }
  .foot { grid-template-columns: minmax(0, 1fr); }
  .foot-photo { min-height: 56svh; }
  .foot-side { padding: 4rem var(--margin) 2rem; }
}

/* ---------- phone ---------- */
@media (max-width: 47.99em) {
  /* the photo follows the sentence and the hero ends under it, so the next chapter shows below */
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; min-height: 0; padding-top: 16svh; padding-bottom: 2rem; }
  .hero-title, .hero-photo, .hero-line { grid-column: 1; }
  .hero-line { grid-row: 2; max-width: none; width: 92%; margin-top: 2rem; }
  .hero-photo { grid-row: 3; align-self: start; width: 94%; margin: 2.5rem 0 0; }

  .panel-note { right: var(--margin); width: auto; padding: 1rem 1.1rem 1.1rem; }

  .showcase { grid-template-columns: minmax(0, 1fr); }
  .showcase .head, .showcase .show-head p { grid-column: 1; }
  .showcase .show-head p { padding-top: 0; margin-top: 1.25rem; }
  .specimens { grid-template-columns: minmax(0, 1fr); margin-top: 3rem; margin-inline: calc(var(--margin) * -1); }
  .specimen:first-child, .specimen:last-child { grid-column: 1; }
  .specimens { padding-bottom: 0; }
  .specimen { padding: 1.5rem var(--margin) 2.5rem; }
  .specimen:last-child { background: #fff; color: #000; }

  .try { grid-template-columns: minmax(0, 1fr); }
  .try-copy, .try-preview { grid-column: 1; }
  .try-preview { margin-top: 3rem; }
  .try-form .button { justify-self: stretch; }

  .card { width: 92vw; padding: 28px 28px 22svh; margin-bottom: -14svh; }
  .check-list { line-height: 1.35; }
  .check-list li + li { margin-top: 0.85rem; }

  .price-row { grid-template-columns: minmax(0, 1fr); margin-top: 2.5rem; }
  .price-row > p, .price-act { grid-column: 1; }
  .price-act { justify-self: stretch; align-items: stretch; margin-top: 2rem; }

  .faq { grid-template-columns: minmax(0, 1fr); }
  .faq-head { grid-column: 1; position: static; margin-bottom: 2rem; }
  .faq-list { grid-column: 1; gap: 6px; }
  .faq-list summary { min-height: 64px; padding: 0.8rem 20px; }
  .faq-list details p { padding: 0 20px 20px; }

  .strip img { height: 110px; }
  .contact-body { padding-top: 48px; }
  .bar { grid-template-columns: minmax(0, 1fr); }
  .cell, .cell input { min-height: 60px; }
  .foot-photo { min-height: 50svh; }
  .foot-side { padding: 3rem var(--margin) 2rem; }
  .foot-menu { gap: calc(1.25rem - 12px); }
  .foot-blocks { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; margin-top: 3rem; }
}

/* ---------- narrow phones: under 360px, and bigger phones set to display zoom ---------- */
@media (max-width: 22.49em) {
  :root { --step-display: clamp(2.5rem, -0.2rem + 13.7vw, 3rem); --step-head: 1.8rem; }
  .foot-menu { gap: calc(1.25rem - 16px); }
  .foot-menu a { padding-block: 8px; }
}

/* ---------- short phones (an iPhone SE, old 320px phones): the next chapter still shows under the hero ---------- */
@media (max-width: 47.99em) and (max-height: 44em) {
  .hero { padding-top: 12svh; }
  .hero-photo { width: 84%; }
}

/* ---------- a phone on its side: wide and short ---------- */
@media (orientation: landscape) and (max-height: 31.25em) {
  :root { --step-display: min(clamp(3rem, -0.2rem + 13.7vw, 13.75rem), 18svh); }
  .hero { grid-template-columns: repeat(12, minmax(0, 1fr)); min-height: 0; padding-top: 6rem; padding-bottom: 2rem; }
  .hero-title { grid-column: 1 / -1; }
  .hero-line { grid-column: 1 / 7; grid-row: 2; width: auto; max-width: 40ch; margin-top: 1.5rem; }
  .hero-photo { grid-column: 8 / -1; grid-row: 2 / 4; align-self: start; width: 100%; margin: 1.5rem 0 0; }
  .panel { min-height: 0; }
  .verb-wrap { padding-top: 22svh; }
  .verb { position: static; }
}

/* ---------- motion (the finished state is the reduced-motion state) ---------- */
@media (prefers-reduced-motion: reduce) {
  .top { transition: color 300ms ease, background-color 300ms ease; }
}
@media (prefers-reduced-motion: no-preference) {
  .js .hero-title .l1, .js .hero-title .l2 { animation: lw-rise 900ms var(--ease-out) both; }
  .js .hero-title .l2 { animation-delay: 110ms; }
  .js .hero-photo img { animation: lw-stick 1000ms var(--ease-expo) 150ms both; }
  .js .hero-line { animation: lw-rise 800ms var(--ease-out) 300ms both; }

  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .card[data-reveal] { transform: translateY(64px); }
  .js .card[data-reveal].is-in { transform: none; }

  .js .strip-track { animation: lw-drift 90s linear infinite; }
  .js .strip.is-paused .strip-track, .js .strip.is-hidden .strip-track { animation-play-state: paused; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 47.99em) {
  .js .strip-track { animation-duration: 70s; }
}
@keyframes lw-rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes lw-stick { from { opacity: 0; transform: translateY(48px) rotate(0deg); } to { opacity: 1; transform: rotate(-4deg); } }
@keyframes lw-drift { to { transform: translateX(-50%); } }
