/* Screenprint homepage; maker behavior and guide styles remain independent. */
.atelier-page {
  --paper: #f9efdc;
  --paper-light: #fff8e9;
  --paper-deep: #eae3d6;
  --ink: #2d201a;
  --ink-soft: #655e54;
  --ink-faint: #70695e;
  --oxblood: #b94d34;
  --oxblood-dark: #983d28;
  --sage: #cfddbf;
  --hero-gutter: clamp(24px, 4vw, 76px);
  --line: #dfd9cd;
  --line-strong: #c7bead;
  --surface: #fcfaf5;
  --body: "DM Sans", Arial, sans-serif;
  background: var(--paper);
  font-weight: 400;
}

.atelier-page [hidden] { display: none !important; }
.atelier-page footer { width: min(100% - 64px, 1200px); }
.atelier-page main { width: 100%; }
.atelier-page main > section:not(.book-hero) { width: min(100% - 64px, 1320px); margin-inline: auto; }
.atelier-page .site-header { width: 100%; padding-inline: var(--hero-gutter); display: flex; justify-content: space-between; min-height: 82px; background: var(--sage); border-bottom: 1px solid #49372970; }
.atelier-page .brand { font-size: clamp(28px, 2.7vw, 40px); font-weight: 700; letter-spacing: -.055em; }
.atelier-page .site-header nav { display: flex; gap: 32px; }
.atelier-page .site-header nav a { min-width: 44px; justify-content: center; font: 500 20px/1.3 var(--display); letter-spacing: 0; text-transform: none; color: var(--ink); }
.atelier-page .site-header nav a:hover { color: var(--oxblood); }

.book-hero { position: relative; isolation: isolate; min-height: clamp(660px, calc(100svh - 82px), 900px); overflow: hidden; background: var(--sage); }
.book-copy { position: relative; z-index: 2; width: 48%; padding: clamp(54px, 8vh, 100px) 0 110px var(--hero-gutter); }
.book-hero h1 { margin: 0; font: 700 clamp(72px, 8.5vw, 144px)/.92 var(--display); letter-spacing: -.062em; }
.book-hero h1 em { display: block; margin-top: .07em; font-weight: 600; letter-spacing: -.06em; color: var(--ink); }
.book-tagline { margin: 36px 0 30px; font: 500 clamp(21px, 2.1vw, 30px)/1.25 var(--display); color: var(--ink); }
.book-stage { position: absolute; z-index: 1; width: 59%; aspect-ratio: 4 / 3; right: 0; top: 50%; transform: translateY(-50%); pointer-events: none; }
.book-stage :is(video, .book-poster, .book-poster img) { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: contain; }
.book-stage video { z-index: 0; }
.book-stage .book-poster { z-index: 1; }
.book-grab { position: absolute; z-index: 2; inset: 13% 9% 3% 10%; pointer-events: auto; cursor: grab; touch-action: pan-y pinch-zoom; user-select: none; -webkit-user-select: none; }
.book-stage[data-dragging="true"] .book-grab { cursor: grabbing; }
.book-stage[aria-busy="true"] .book-grab { cursor: progress; }
.book-controls { position: absolute; z-index: 2; top: 100%; left: 10%; right: 9%; display: flex; justify-content: center; align-items: center; gap: 12px; pointer-events: auto; }
.book-controls button { display: grid; place-items: center; width: 44px; min-height: 44px; padding: 0; border: 1px solid transparent; border-radius: 50%; background: transparent; color: var(--ink); font: 24px/1 var(--body); cursor: pointer; transition: background-color 150ms, border-color 150ms; }
.book-controls button:disabled { opacity: .3; cursor: default; }
.book-controls button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.book-controls button:active:not(:disabled) { background: #2d201a18; }
.book-hint { min-width: 155px; text-align: center; font: 12px/1.4 var(--body); color: var(--ink); }
@media (hover: hover) { .book-controls button:hover:not(:disabled) { border-color: #2d201a55; background: #f9efdc66; } }
.book-poster-opening { visibility: hidden; }
html[data-book-motion="start"] .book-poster-opening { visibility: visible; }
html[data-book-motion="start"] .book-poster-final { visibility: hidden; }
html[data-book-motion="playing"] .book-poster { visibility: hidden; }
.book-actions { display: grid; justify-items: start; gap: 16px; }
.atelier-page .book-actions .button { gap: 28px; padding: 16px 24px; min-height: 56px; font: 500 clamp(19px, 1.75vw, 27px)/1.2 var(--display); box-shadow: none; border-radius: 5px; text-decoration: none; }
.book-actions p { margin: 0; font-size: 12px; color: var(--ink); }

.atelier-page :is(#maker, #how-it-works, #faq, #printing, #guides) { scroll-margin-top: 24px; }
.atelier-page .maker { padding-top: 32px; margin-bottom: 74px; border-top: 0; }
.atelier-page .maker-heading { min-height: 105px; }
.atelier-page .maker-heading h2 { font-size: clamp(34px, 4.2vw, 48px); font-weight: 400; }
.atelier-page .kicker { font-size: 10px; font-weight: 500; letter-spacing: .16em; }
.atelier-page .workspace { min-height: 0; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); background: var(--paper-light); border-bottom-color: var(--line); }
.atelier-page .controls { min-width: 0; border-right-color: var(--line); }
.atelier-page .control-section { grid-template-columns: 32px minmax(0, 1fr); }
.atelier-page .section-number { padding-top: 25px; font-size: 10px; font-weight: 400; border-right: 0; }
.atelier-page .section-body { padding: 20px 20px 20px 8px; }
.atelier-page .field-heading label,
.atelier-page .label-like,
.atelier-page .sheet-choice label { font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.atelier-page .field-heading > span,
.atelier-page .field-heading label span { font-size: 10px; letter-spacing: 0; text-transform: none; }
.atelier-page input[type="text"],
.atelier-page select { background: #fffdf8; border-color: var(--line-strong); border-radius: 3px; }
.atelier-page .field-help { font-size: 11px; }
.atelier-page .motto-heading { margin-top: 18px; }
.atelier-page .style-grid,
.atelier-page .font-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.atelier-page .style-card { min-height: 0; grid-template-columns: minmax(0, 1fr); gap: 7px; padding: 9px; background: transparent; }
.atelier-page .style-sample { width: 100%; height: auto; aspect-ratio: 3 / 2; background: #f5eddd; border: 0; border-radius: 0; overflow: hidden; }
.atelier-page .style-sample img { width: 100%; height: auto; display: block; mix-blend-mode: multiply; }
.atelier-page .style-card strong { font-size: 20px; font-weight: 500; }
.atelier-page .style-card small { font-size: 9px; letter-spacing: 0; text-transform: none; }
.atelier-page .font-card { grid-template-columns: 32px minmax(0, 1fr); min-height: 70px; gap: 7px; padding: 9px; background: transparent; }
.atelier-page .font-sample { width: 32px; height: 36px; border: 0; background: transparent; font-size: 22px; }
.atelier-page .font-card strong { font-size: 17px; }
.atelier-page .font-card small { font-size: 9px; text-transform: none; letter-spacing: 0; }
.atelier-page .style-card:has(input:checked),
.atelier-page .font-card:has(input:checked) { background: #f4eee2; }
.atelier-page .options-body { gap: 18px; }
.atelier-page .swatch-row { gap: 24px; }
.atelier-page .preview-panel { min-height: 0; background: #efebe2; padding: 28px; }
.atelier-page .preview-toolbar h3 { font-size: 27px; font-weight: 400; }
.atelier-page .status-pill { min-height: 28px; padding: 4px 10px; border-radius: 3px; font-size: 10px; font-weight: 500; text-transform: none; letter-spacing: 0; }
.atelier-page .preview-stage { width: min(100%, 720px); margin: 26px auto; padding: 8px; background: #faf6ed; border: 1px solid #d8cfbd; box-shadow: 0 16px 28px -12px #493b2438; }
.atelier-page .preview-stage::before,
.atelier-page .preview-stage::after { display: none; }
.atelier-page .pack-card { margin-top: 0; padding: 22px 0 0; border: 0; border-top: 1px solid var(--line-strong); background: transparent; box-shadow: none; gap: 18px; }
.atelier-page .pack-copy h4 { font-size: 28px; font-weight: 400; }
.atelier-page .price-lockup { margin: 8px 0 0; display: flex; flex-wrap: wrap; }
.atelier-page .pack-copy ul { font-size: 12px; }
.atelier-page .button { border-radius: 3px; font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.atelier-page .pack-note,
.atelier-page .payment-status { font-size: 12px; }
.atelier-page .value-section,
.atelier-page .printing-section,
.atelier-page .faq-section,
.atelier-page .guides-section { padding-block: 64px; }
.atelier-page .value-section h2,
.atelier-page .printing-copy h2,
.atelier-page .faq-section h2,
.atelier-page .guides-heading h2 { font-weight: 400; font-size: clamp(36px, 4vw, 48px); }
.atelier-page .value-grid h3 { font-weight: 500; }
.atelier-page .value-grid p,
.atelier-page .printing-copy li p,
.atelier-page .faq-list p,
.atelier-page .guide-link-card p,
.atelier-page .guides-heading > p:not(.kicker) { font-size: 14px; }
.atelier-page .guide-link-card { background: transparent; }

@media (min-width: 861px) and (min-height: 950px) {
  .atelier-page .preview-panel { position: sticky; top: 20px; align-self: start; }
}

@media (max-width: 860px) {
  .book-copy { width: 50%; padding-top: 48px; }
  .book-hero { min-height: 620px; }
  .book-hero h1 { font-size: clamp(59px, 8.6vw, 74px); }
  .book-stage { width: 59%; }
  .book-tagline { font-size: 21px; }
  .atelier-page .workspace { grid-template-columns: minmax(0, 1fr); }
  .atelier-page .controls { border-right: 0; }
  .atelier-page .style-card { grid-template-columns: 85px minmax(0, 1fr); align-items: center; }
  .atelier-page .font-card { grid-template-columns: 45px minmax(0, 1fr); }
  .atelier-page .site-header nav { gap: 22px; }
}

@media (max-width: 620px) {
  .atelier-page main > section:not(.book-hero),
  .atelier-page footer { width: calc(100% - 32px); }
  .atelier-page .site-header { flex-wrap: wrap; gap: 0; padding-top: 17px; }
  .atelier-page .brand { width: 100%; font-size: 31px; margin-bottom: 7px; }
  .atelier-page .site-header nav { width: 100%; justify-content: space-between; gap: 16px; }
  .atelier-page .site-header nav a { font-size: 17px; }
  .book-hero { min-height: 0; }
  .book-copy { width: 100%; padding: 28px 24px 0; }
  .book-hero h1 { font-size: clamp(54px, 15vw, 84px); }
  .book-tagline { margin: 20px 0; font-size: 21px; }
  .book-stage { position: relative; width: 100%; height: auto; aspect-ratio: 5 / 4; right: auto; top: auto; transform: none; margin: 16px 0 48px; }
  .book-actions { gap: 10px; }
  .atelier-page .book-actions .button { padding: 12px 20px; min-height: 48px; font-size: 20px; }
  .book-actions p { font-size: 11px; }
  .atelier-page .maker-heading { padding-block: 24px; min-height: 0; }
  .atelier-page .maker-heading h2 { font-size: 34px; }
  .atelier-page .local-note { font-size: 11px; }
  .atelier-page .preview-panel { padding: 8px 6px 12px; background: var(--paper-light); }
  .atelier-page #bookplate-preview { background: var(--paper-light); }
  .atelier-page .preview-toolbar h3 { font-size: 21px; }
  .atelier-page .preview-toolbar .status-pill { min-height: 24px; font-size: 10px; }
  .atelier-page .preview-stage { width: min(100%, calc(var(--mobile-visible-height, 100svh) * .42)); margin: 8px auto 0; padding: 5px; box-shadow: 0 5px 12px #493b2418; }
  .atelier-page .control-section { grid-template-columns: 26px minmax(0, 1fr); }
  .atelier-page .section-body { padding: 18px 12px 18px 4px; }
  .atelier-page .section-number { padding-top: 23px; }
  .atelier-page .style-card { grid-template-columns: minmax(0, 1fr); padding: 9px; gap: 7px; }
  .atelier-page .font-card { grid-template-columns: 30px minmax(0, 1fr); min-height: 74px; gap: 5px; }
  .atelier-page .font-card strong { font-size: 16px; }
  .atelier-page .font-card small { font-size: 9px; }
  .atelier-page .workspace > .pack-card { padding: 24px 14px; background: var(--paper-light); }
  .atelier-page .value-section,
  .atelier-page .printing-section,
  .atelier-page .faq-section,
  .atelier-page .guides-section { padding-block: 42px; }
}

@media (max-width: 380px) {
  .atelier-page .book-actions .button { font-size: 18px; gap: 16px; padding-inline: 16px; white-space: nowrap; }
  .atelier-page .font-card { grid-template-columns: minmax(0, 1fr); }
  .atelier-page .font-sample { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .atelier-page * { scroll-behavior: auto; }
}

@media print {
  .book-hero { display: none !important; }
  .atelier-page .preview-panel { position: static; }
}
