/* AI Video Tape. One idea carries the look: every photo and video sits in an
   instant-print frame, and a video "develops" in its print while it's made. */

:root {
  --sky: #E8EEF4;
  --ink: #1C2A42;
  --marigold: #F2AE2E;
  --marigold-deep: #D8921A;
  --paper: #FFFFFF;
  --slate: #56657C;
  --line: #C9D3DF;
  --rose: #B4344F;
  --leaf: #2F7A55;

  --display: 'Bricolage Grotesque', 'Avenir Next', system-ui, sans-serif;
  --body: 'Atkinson Hyperlegible', system-ui, -apple-system, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: clamp(2.25rem, 7vw, 3.5rem);

  --radius-control: 999px;
  --radius-panel: 14px;
  --print-shadow: 0 1px 2px rgba(28, 42, 66, 0.12), 0 12px 28px -12px rgba(28, 42, 66, 0.35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--sky);
  color: var(--ink);
  font: 400 var(--step-0)/1.55 var(--body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; outline: none; }
main:focus, main:focus-visible { outline: none; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1em; max-width: 62ch; }
a { color: var(--ink); text-underline-offset: 3px; }
.muted { color: var(--slate); }
.small { font-size: var(--step--1); }

:focus-visible { outline: 3px solid var(--marigold-deep); outline-offset: 2px; border-radius: 4px; }

/* ---- Layout ---- */

.page { width: 100%; max-width: 1040px; margin: 0 auto; padding: 24px 16px 64px; }
.page.narrow { max-width: 560px; }
.stack > * + * { margin-top: 16px; }

.topbar {
  display: flex; align-items: center; gap: 12px;
  max-width: 1040px; width: 100%; margin: 0 auto; padding: 14px 16px;
}
.wordmark {
  font-family: var(--display); font-weight: 700; font-size: 1.25rem; text-decoration: none; color: var(--ink);
  display: inline-flex; align-items: center; gap: 8px; margin-right: auto;
}
.wordmark::before {
  content: ''; width: 18px; height: 22px; background: var(--marigold);
  border: 3px solid var(--paper); border-bottom-width: 6px; box-shadow: 0 0 0 1.5px var(--ink); border-radius: 2px;
}
.page > .wordmark { margin-bottom: 24px; display: inline-flex; }

.credits-pill {
  font: 700 var(--step--1)/1 var(--body); color: var(--ink); text-decoration: none;
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: var(--radius-control); padding: 8px 12px;
}
.footer { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; padding: 24px 16px 32px; font-size: var(--step--1); }
.footer a { color: var(--slate); }

/* ---- Controls ---- */

button, .button {
  font: 700 var(--step-0)/1 var(--body); cursor: pointer; text-decoration: none; text-align: center;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--radius-control); border: 2px solid var(--ink);
  background: var(--paper); color: var(--ink);
}
.primary { background: var(--marigold); border-color: var(--ink); }
.primary:hover:not(:disabled) { background: var(--marigold-deep); }
.ghost { background: transparent; }
button:disabled { opacity: 0.45; cursor: not-allowed; }
.block { display: flex; width: 100%; }
.link { background: none; border: 0; min-height: 0; padding: 0; font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }

label { display: block; font-weight: 700; margin: 0 0 14px; }
input[type=email], input[type=text], input:not([type]), select, textarea {
  display: block; width: 100%; margin-top: 6px; font: 400 var(--step-0)/1.4 var(--body); color: var(--ink);
  padding: 12px 14px; border: 2px solid var(--line); border-radius: 10px; background: var(--paper);
}
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; }
.code-input { font-size: 1.75rem !important; letter-spacing: 0.3em; text-align: center; }

.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius-panel); padding: 14px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.check:has(input:checked) { border-color: var(--ink); }

.notice { background: var(--paper); border-left: 5px solid var(--marigold); padding: 10px 14px; border-radius: 6px; }
.error { color: var(--rose); font-weight: 700; }
.success { border-left-color: var(--leaf); }

/* ---- The instant print ---- */

.print {
  background: var(--paper); padding: 12px 12px 0; border-radius: 3px; box-shadow: var(--print-shadow);
  display: inline-block; width: 100%;
}
.print .frame { aspect-ratio: 4 / 5; overflow: hidden; background: #DCE3EB; position: relative; border-radius: 1px; }
.print.wide .frame { aspect-ratio: 16 / 9; }
.print .frame > img, .print .frame > video { width: 100%; height: 100%; object-fit: cover; display: block; }
.print .caption { font-family: var(--display); font-weight: 500; padding: 12px 4px 16px; min-height: 52px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tilt-l { transform: rotate(-2.5deg); }
.tilt-r { transform: rotate(2deg); }

/* A video developing in its print: the frame clears from milky to toned. */
.developing .frame { background: linear-gradient(160deg, #F1E7D3, #C9D6E3 55%, #9FB2C8); }
.developing .frame::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.55) 50%, transparent 70%);
  background-size: 250% 100%; animation: develop 2.4s ease-in-out infinite;
}
@keyframes develop { from { background-position: 120% 0; } to { background-position: -120% 0; } }

.badge { font: 700 var(--step--1)/1 var(--body); background: var(--sky); border-radius: var(--radius-control); padding: 6px 10px; white-space: nowrap; }
.badge.approved { background: #DCEFE4; color: var(--leaf); }

/* ---- Landing ---- */

.hero { display: grid; gap: 40px; align-items: center; padding: 24px 0 48px; }
@media (min-width: 820px) { .hero { grid-template-columns: 1.1fr 1fr; gap: 64px; padding-top: 48px; } }
.hero h1 { font-size: clamp(2.5rem, 8vw, 4.25rem); max-width: 12ch; }
.hero .lede { font-size: var(--step-1); color: var(--slate); max-width: 34ch; }

.hero-prints { position: relative; max-width: 380px; width: 100%; margin: 0 auto; }
.hero-prints .print { position: relative; }
.hero-prints .behind { position: absolute; inset: 18px -26px -10px 30px; transform: rotate(6deg); background: var(--paper); box-shadow: var(--print-shadow); border-radius: 3px; }

/* The illustrated scene inside the hero print: a beach at sunset, one figure waving. */
.scene-art { position: absolute; inset: 0; }
.scene-art .sky { position: absolute; inset: 0; background: linear-gradient(180deg, #F7C873 0%, #F0956A 45%, #8A7FB0 70%, #4F6E96 100%); }
.scene-art .sun { position: absolute; left: 50%; top: 52%; width: 34%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: #FFE6A6; }
.scene-art .sea { position: absolute; left: 0; right: 0; bottom: 0; height: 36%; background: linear-gradient(180deg, #3E5F87, #2A4566); }
.scene-art svg { position: absolute; left: 50%; bottom: 8%; width: 46%; translate: -50% 0; }
.scene-art .arm { transform-origin: 72px 70px; animation: wave 2.2s ease-in-out infinite; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-18deg); } 80% { transform: rotate(4deg); } 90% { transform: rotate(-14deg); } }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; background: var(--paper); border-radius: var(--radius-panel); padding: 20px; }
.steps li::before { content: counter(step); font: 700 var(--step-2)/1 var(--display); color: var(--marigold-deep); display: block; margin-bottom: 10px; }
.steps h3 { margin-bottom: 6px; }

.promise { display: grid; gap: 24px; padding: 48px 0; }
@media (min-width: 820px) { .promise { grid-template-columns: 1fr 1.4fr; gap: 64px; } }
.promise dl { margin: 0; display: grid; gap: 18px; }
.promise dt { font-weight: 700; }
.promise dd { margin: 4px 0 0; color: var(--slate); }

section + section { border-top: 1.5px solid var(--line); }
.section { padding: 48px 0; }

/* ---- App screens ---- */

.choices { display: grid; gap: 12px; }
.choice {
  display: block; width: 100%; text-align: left; min-height: 0; padding: 18px 20px; border-radius: var(--radius-panel);
  border: 2px solid var(--line); background: var(--paper); font: inherit; color: inherit;
}
.choice:hover { border-color: var(--ink); }
.choice strong { display: block; font: 700 var(--step-1)/1.2 var(--display); margin-bottom: 4px; }
.choice span { color: var(--slate); }
.choice[aria-pressed=true] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

.progress { display: flex; gap: 6px; margin: 0 0 20px; padding: 0; list-style: none; font-size: var(--step--1); color: var(--slate); }
.progress li { flex: 1; border-top: 4px solid var(--line); padding-top: 6px; }
.progress li[aria-current=step] { border-color: var(--ink); color: var(--ink); font-weight: 700; }
.progress li.done { border-color: var(--marigold-deep); }

.drop { display: block; cursor: pointer; font-weight: 400; margin: 0; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop .frame { display: grid; place-items: center; text-align: center; color: var(--slate); padding: 16px; }
.drop:focus-within .print { outline: 3px solid var(--marigold-deep); outline-offset: 3px; }
.photo-step .print { max-width: 320px; margin: 0 auto 20px; display: block; }

.scene-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.scene {
  min-height: 0; padding: 0; border-radius: 10px; overflow: hidden; border: 2px solid var(--line);
  background: var(--paper); display: flex; flex-direction: column; align-items: stretch; text-align: left;
}
.scene .swatch { height: 76px; }
.scene .name { padding: 10px 12px; font: 700 var(--step-0)/1.2 var(--body); }
.scene[aria-pressed=true] { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 20px 0; }
.segmented button { min-height: 0; padding: 12px; border-radius: 10px; border-color: var(--line); flex-direction: column; gap: 4px; font-weight: 400; }
.segmented button strong { font-weight: 700; }
.segmented button[aria-pressed=true] { border-color: var(--ink); background: var(--paper); box-shadow: inset 0 0 0 1px var(--ink); }
.segmented small { color: var(--slate); }

.sticky-action p:empty { display: none; }
.sticky-action p { margin: 0 0 10px; }
.sticky-action { position: sticky; bottom: 0; padding: 14px 0 calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--sky) 30%); }

.video-page .print { max-width: 420px; display: block; margin: 0 auto 24px; }
.video-id { font-size: var(--step--1); color: var(--slate); word-break: break-all; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 16px; }
.gallery a { text-decoration: none; color: inherit; }
.gallery .print { padding: 8px 8px 0; }
.gallery .caption { font-size: var(--step--1); padding: 8px 2px 10px; min-height: 0; }
.gallery a:nth-child(3n+1) .print { transform: rotate(-1.5deg); }
.gallery a:nth-child(3n+2) .print { transform: rotate(1deg); }
.empty { text-align: center; padding: 40px 16px; background: var(--paper); border-radius: var(--radius-panel); }

.home-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; justify-content: space-between; margin-bottom: 28px; }
.home-head h1 { margin: 0; font-size: var(--step-2); }

.plans { display: grid; gap: 16px; }
@media (min-width: 760px) { .plans { grid-template-columns: repeat(3, 1fr); } }
.plan { background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius-panel); padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.plan.featured { border-color: var(--ink); }
.plan h2 { font-size: var(--step-1); margin: 0; }
.plan .price { font: 700 var(--step-2)/1.1 var(--display); margin: 8px 0 0; }
.plan .per { color: var(--slate); margin: 0 0 8px; }
.plan ul { padding-left: 18px; margin: 0 0 16px; color: var(--slate); flex: 1; }
.price { font: 700 var(--step-2)/1.1 var(--display); }

.account dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; background: var(--paper); border-radius: var(--radius-panel); padding: 18px; margin: 0 0 24px; }
.account dt { color: var(--slate); }
.account dd { margin: 0; font-weight: 700; word-break: break-word; }
.danger { color: var(--rose); border-color: var(--rose); }

hr { border: 0; border-top: 1.5px solid var(--line); margin: 28px 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
