/* The home page: the start screen before a photo (the hero in #emptyState) and the sections under it
   (.site-about). Loaded after studio.css and mobile.css. Once a photo loads, the editor takes over and none of
   this shows. The hero is a before/after comparison of the studio's own output on its sample photos, with a
   divider to drag and buttons to switch the look (js/home.js). Everything around it stays quiet. */
:root{--home-glass:#17181b;--home-frame-soft:rgba(225,195,92,.24)}

/* Start page shell: no frame around the hero, nothing from the editor beside or under it, and the page scrolls as
   one page (the editor's desktop layout is locked to the window height). */
.workspace:not(.mobile-photo-ready) .stage-card{border:0;border-radius:0;background:none;box-shadow:none}
:where(html:not(.compact-layout)) .workspace:not(.mobile-photo-ready){height:auto}
:where(html:not(.compact-layout)) .workspace:not(.mobile-photo-ready) .main-area{height:auto;overflow:visible}
:where(html:not(.compact-layout)) .workspace:not(.mobile-photo-ready) .stage-card{overflow:visible}
:where(html.compact-layout) .workspace:not(.mobile-photo-ready) .side-rail>section:first-child,
:where(html.compact-layout) .workspace:not(.mobile-photo-ready) .mobile-color-controls,
:where(html.compact-layout) .workspace:not(.mobile-photo-ready) .blend-panel,
:where(html.compact-layout) .workspace:not(.mobile-photo-ready) .layers-panel,
:where(html.compact-layout) .workspace:not(.mobile-photo-ready) .filmstrip{display:none}
/* Header actions that need a photo stay out of the way until there is one. */
body:not(.mobile-photo-page) .top-actions .tool-btn:disabled{display:none}

/* Hero */
.empty-state.home{overflow-x:clip;direction:rtl;width:min(1180px,100%);max-width:none;margin:0 auto;padding:clamp(20px,5vh,64px) clamp(16px,3vw,40px);text-align:start}
.home-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.9fr);align-items:center;gap:clamp(40px,6vw,96px)}
.empty-state.home .empty-title{max-width:11em;margin:0 0 18px;color:var(--ink);font-size:clamp(40px,4.6vw,66px);font-weight:800;line-height:1.04;letter-spacing:-.02em}
.empty-state.home .home-lead{max-width:30em;margin:0;color:var(--muted);font-size:clamp(16px,1.35vw,19px);font-weight:400;line-height:1.6}
.empty-state.home .empty-actions{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:10px;margin-top:28px}
.empty-state.home .empty-actions button{width:auto;min-height:54px;padding:0 24px;font-size:16px;font-weight:600}
.empty-state.home .home-tip{margin:14px 0 0;color:var(--faint);font-size:13px;line-height:1.5}
/* My looks / install (added by editor-features.js) is a quiet link under the two main buttons. */
.empty-state.home .empty-actions #emptySavedLooks{flex-basis:100%;justify-content:flex-start;width:auto;min-height:32px;padding:0;border:0;background:none;box-shadow:none;color:var(--muted);font-size:14px;font-weight:500;text-decoration:underline;text-decoration-color:var(--home-frame-soft);text-underline-offset:5px}
.empty-state.home .empty-actions #emptySavedLooks:hover{color:var(--ink)}
.empty-state.home .demo-photo-picker{margin-top:30px;padding-top:22px;border-top:1px solid var(--line);text-align:start}
.empty-state.home .demo-photo-picker h2{margin:0 0 12px;color:var(--ink);font-size:15px;font-weight:600}
.empty-state.home .demo-photo-grid{grid-template-columns:repeat(2,120px);justify-content:start;gap:10px;max-width:none;margin:0 0 10px}
.empty-state.home .demo-photo-card span{padding:7px;font-size:13px}
.empty-state.home .demo-photo-picker p{margin:0;color:var(--muted);font-size:13px}
.empty-state.home .privacy-note{justify-content:flex-start;margin-top:16px;font-size:12px;line-height:1.5;text-align:start}

/* Before/after: "before" on the right and "after" on the left, the divider between them. The slider covers the
   whole picture, invisible, so dragging anywhere moves the divider and the arrow keys work too. */
.home-compare{position:relative;justify-self:center;width:min(440px,100%);margin:0}
.ba{--split:50%;position:relative;aspect-ratio:4/5;overflow:hidden;border-radius:22px;background:var(--home-glass);box-shadow:0 0 0 1px var(--line),0 34px 80px rgba(0,0,0,.5);touch-action:pan-y;user-select:none}
.ba img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;pointer-events:none}
.ba .ba-after{clip-path:inset(0 calc(100% - var(--split)) 0 0)}
.ba-tag{position:absolute;top:14px;padding:5px 11px;border-radius:999px;background:rgba(13,14,16,.62);backdrop-filter:blur(6px);color:var(--ink);font-size:13px;font-weight:600;line-height:1.3}
.ba-tag-before{right:14px}
.ba-tag-after{left:14px}
.ba-divider{position:absolute;top:0;bottom:0;left:var(--split);width:2px;margin-left:-1px;background:var(--gold-hi);box-shadow:0 0 0 1px rgba(0,0,0,.18)}
.ba-handle{position:absolute;top:50%;left:50%;width:44px;height:44px;margin:-22px 0 0 -22px;border-radius:50%;background:var(--gold);box-shadow:0 8px 24px rgba(0,0,0,.45)}
.ba-handle::before,.ba-handle::after{content:'';position:absolute;top:50%;width:0;height:0;margin-top:-6px;border:6px solid transparent}
.ba-handle::before{left:7px;border-right-color:#17140c}
.ba-handle::after{right:7px;border-left-color:#17140c}
.ba-range{position:absolute;inset:0;z-index:2;width:100%;height:100%;margin:0;direction:ltr;opacity:0;cursor:ew-resize;-webkit-appearance:none;appearance:none}
.ba:has(.ba-range:focus-visible) .ba-handle{outline:2px solid var(--gold-hi);outline-offset:4px}
.ba-looks{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;margin-top:16px}
.ba-looks button{display:grid;justify-items:center;gap:6px;min-width:0;padding:6px 2px;border:0;border-radius:12px;background:none;color:var(--muted);font-size:12px;font-weight:600;line-height:1.25;text-align:center;cursor:pointer}
.ba-looks img{width:56px;height:56px;border-radius:50%;object-fit:cover;box-shadow:0 0 0 1px var(--line)}
.ba-looks button:hover{color:var(--ink)}
.ba-looks button[aria-pressed="true"]{color:var(--gold-hi)}
.ba-looks button[aria-pressed="true"] img{box-shadow:0 0 0 2px var(--bg),0 0 0 4px var(--gold)}
.home-compare figcaption{margin-top:12px;color:var(--faint);font-size:12px;text-align:center}

/* Sections under the hero */
.site-about{background:var(--bg);color:var(--muted)}
.site-about-inner{width:min(1180px,100%);max-width:none;padding:clamp(48px,8vw,104px) clamp(16px,3vw,40px) clamp(56px,8vw,96px);font-size:16px;line-height:1.7}
.site-about .home-section+.home-section{margin-top:clamp(56px,8vw,104px)}
.site-about h2{max-width:none;margin:0 0 14px;color:var(--ink);font-size:clamp(26px,2.8vw,38px);font-weight:700;line-height:1.15;letter-spacing:-.015em}
.site-about .home-section-lead{max-width:44em;margin:0 0 36px;font-size:17px}
.site-about ul.home-lookbook{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:40px 28px;margin:0;padding:0;list-style:none}
.home-lookbook li{display:block}
.home-lookbook img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:cover;border-radius:18px;background:var(--home-glass);box-shadow:0 0 0 1px var(--home-frame-soft)}
.home-lookbook h3{margin:18px 0 6px;color:var(--ink);font-size:19px;font-weight:700;line-height:1.3}
.home-lookbook p{max-width:28em;margin:0;font-size:15px;line-height:1.6}
.site-about ol.home-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:28px;margin:22px 0 0;padding:0;list-style:none;counter-reset:step}
.home-steps li{counter-increment:step;padding-top:16px;border-top:1px solid var(--home-frame-soft);font-size:16px;line-height:1.6}
.home-steps li::before{content:counter(step);display:block;margin-bottom:8px;color:var(--gold-hi);font-size:34px;font-weight:300;line-height:1}
.home-fit p{max-width:44em;margin:0;font-size:17px}
.home-close{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:20px 40px;margin-top:clamp(56px,8vw,104px);padding-top:28px;border-top:1px solid var(--line)}
.site-about .home-close .site-about-note{flex:1 1 30em;max-width:44em;margin:0;font-size:14px;line-height:1.7}
.home-close .solid-btn{min-height:54px;padding:0 28px;font-size:16px;font-weight:600}

/* Narrower screens: one column, the headline and buttons first, then the comparison, then the samples. */
@media(max-width:860px){
  .home-hero{display:flex;flex-direction:column;align-items:stretch;gap:0}
  .home-copy{display:contents}
  .empty-state.home .empty-title{order:1;font-size:clamp(32px,8.6vw,44px);margin-bottom:12px}
  .empty-state.home .home-lead{order:2;font-size:16px}
  .empty-state.home .empty-actions{order:3;display:grid;grid-template-columns:1fr 1fr;margin-top:22px}
  .empty-state.home .empty-actions button{width:100%;min-width:0;min-height:52px;padding:0 10px;font-size:15px;white-space:normal}
  .empty-state.home .empty-actions #emptySavedLooks{grid-column:1/-1;justify-self:start;width:auto;min-height:36px}
  .empty-state.home .home-tip{order:4}
  .home-compare{order:5;width:min(440px,100%);margin:32px auto 0}
  .ba{border-radius:18px}
  .ba-looks{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 8px}
  .empty-state.home .demo-photo-picker{order:6;margin-top:28px}
  .empty-state.home .privacy-note{order:7}
  .site-about ul.home-lookbook{grid-template-columns:repeat(2,minmax(0,1fr));gap:32px 16px}
  .home-lookbook h3{font-size:17px}
  .home-lookbook p{font-size:14px}
  .site-about ol.home-steps{grid-template-columns:minmax(0,1fr);gap:18px}
  .home-steps li{display:grid;grid-template-columns:44px minmax(0,1fr);align-items:baseline;padding-top:14px}
  .home-steps li::before{margin:0;font-size:28px}
  .home-close{flex-direction:column;align-items:stretch}
  .site-about .home-close .site-about-note{flex:none}
  .home-close .solid-btn{width:100%}
}
@media(max-width:380px){
  .empty-state.home .empty-actions button{padding:0 6px;font-size:14px;white-space:nowrap}
}
