/* AI Decorator — deliberately a single, pure-white surface in every theme.
   Landing and styling screens are ported from the designer's flow mockup
   (fonts served locally). Sections marked "addition" extend the design
   language for parts the mockup has no counterpart for (result page,
   privacy page) and must stay visually sane on their own. */

:root{
  --bg:#FFFFFF;
  --ink:#141414;
  --muted:#8A8A8A;
  --faint:#9C9A96;
  --line:#E6E3DE;      /* hairline, a touch warm so it reads chosen */
  --line-strong:#D6D2CB;
  --field:#FAFAF9;
  color-scheme:light;
}

*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{height:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:"Hanken Grotesk",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  -webkit-font-smoothing:antialiased;
  min-height:100svh;
}
a{color:inherit}
:focus-visible{outline:1.5px solid var(--ink);outline-offset:3px;border-radius:2px}

/* ---- landing & result: two grid rows (maker / centre stage) ---- */
body.stage{
  display:grid;
  grid-template-rows:auto 1fr;
}

/* ---- privacy page ---- */
body.privacy-body{line-height:1.65}

/* made by MDMAISON — text prefix plus the wordmark as a picture */
.maker{
  justify-self:center;
  display:inline-flex;
  align-items:center;
  gap:10px;
  margin:34px 0 0;
  padding:6px 4px;
  text-decoration:none;
  font-size:11px;
  letter-spacing:.06em;
  color:var(--faint);
}
.maker svg{display:block;height:13px;width:auto;color:var(--ink)}
.maker:hover svg{opacity:.6}

/* centre stage */
main{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;      /* fallback for engines without "safe" */
  justify-content:safe center; /* never push content off the top */
  text-align:center;
  padding:40px 24px 104px;
  gap:44px;
}
.headline{max-width:600px}
.eyebrow{
  margin:0 0 18px;
  font-size:12px;
  font-weight:500;
  letter-spacing:.3em;
  text-transform:uppercase;
  color:var(--muted);
}
h1{
  margin:0;
  font-family:"Cormorant Garamond",Georgia,serif;
  font-weight:500;
  font-size:clamp(1.9rem,4.4vw,2.6rem);
  line-height:1.16;
  letter-spacing:-.005em;
  text-wrap:balance;
}

/* ---------- views: #app[data-state] shows one section ---------- */
.start,.styling{
  width:100%;
  flex-direction:column;
  align-items:center;
  display:none;
}
#app[data-state="idle"]  .start,
#app[data-state="limit"] .start{display:flex}
#app[data-state="styling"] .styling{display:flex}
.start{gap:44px}
.styling{gap:0}
.styling h1{margin-bottom:36px}

/* ---------- buttons ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:200px;
  padding:16px 34px;
  border-radius:999px;
  font:inherit;font-size:12.5px;font-weight:500;
  letter-spacing:.2em;text-transform:uppercase;
  text-decoration:none;cursor:pointer;
  transition:background .2s ease, border-color .2s ease, color .2s ease;
}
.btn-solid{background:var(--ink);color:#fff;border:1px solid var(--ink)}
.btn-solid:hover{background:#2E2D2B;border-color:#2E2D2B}
.btn-line{background:var(--bg);color:var(--ink);border:1px solid var(--line-strong)}
.btn-line:hover{border-color:var(--ink)}

/* ---------- start: photo + email ---------- */
.panel{width:min(720px,100%);margin:0;display:flex;flex-direction:column;align-items:center}

.drop{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  width:100%;
  min-height:264px;
  padding:40px;
  background:var(--bg);
  border:1px solid var(--line);
  border-radius:16px;
  cursor:pointer;
  transition:border-color .2s ease, background .2s ease;
}
.drop:hover,.drop.drag{border-color:var(--ink);background:var(--field)}
.drop .prompt{display:flex;flex-direction:column;align-items:center;gap:7px}
.drop .mark{
  width:22px;height:22px;margin-bottom:6px;
  border:1px solid var(--ink);border-radius:50%;
  display:grid;place-items:center;font-size:13px;line-height:1;color:var(--ink);
}
.drop .lead{font-size:15px;color:var(--ink)}
.drop .hint{font-size:11.5px;color:var(--faint)}
#preview{max-height:240px;width:auto;max-width:100%;border-radius:10px;display:none}
.drop.has-image{padding:16px;min-height:0}
.drop.has-image .prompt{display:none}
.drop.has-image #preview{display:block}
.change{display:none;margin:10px 0 0;font-size:11.5px;color:var(--faint)}
.drop.has-image .change{display:block}

.promise{margin:16px 0 0;font-size:14px;color:var(--ink)}

.ask{display:flex;flex-direction:column;align-items:center;margin-top:28px;width:100%}
.email-input{
  width:min(420px,100%);
  height:50px;
  padding:0 18px;
  font:inherit;font-size:15px;color:var(--ink);
  text-align:center;
  background:var(--field);
  border:1px solid var(--line);
  border-radius:12px;
  transition:border-color .2s ease, background .2s ease;
}
.email-input::placeholder{color:var(--faint)}
.email-input:focus{outline:none;border-color:var(--ink);background:var(--bg)}
.ask .btn{margin-top:40px}
.email-why{margin:12px 0 0;font-size:13.5px;color:var(--ink)}
.form-msg{margin:14px 0 0;min-height:1.2em;font-size:12.5px;color:var(--ink)}
.small-note{margin:6px 0 0;font-size:11.5px;color:var(--faint)}
.small-note a{color:inherit;text-decoration:underline;text-underline-offset:2px}

/* one styling per email: the ask step is replaced by the limit note */
.limit{display:none}
#app[data-state="limit"] .ask{display:none}
#app[data-state="limit"] .limit{display:block;margin-top:28px}
.limit p{margin:0 auto;max-width:44ch;font-size:14px;line-height:1.55;color:var(--ink);text-wrap:pretty}
.limit a{text-decoration:underline;text-underline-offset:2px}

/* ---------- styling: the in-between screen ---------- */
.thumb{
  position:relative;
  width:min(420px,100%);
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
  background:var(--field);
  aspect-ratio:4/3;
}
.thumb img{width:100%;height:100%;object-fit:cover;display:block;filter:saturate(.85)}
.thumb::after{
  content:"";position:absolute;inset:0;
  background:linear-gradient(100deg,transparent 30%,rgba(255,255,255,.45) 50%,transparent 70%);
  background-size:220% 100%;
  animation:sheen 2.8s ease-in-out infinite;
}
@keyframes sheen{from{background-position:120% 0}to{background-position:-120% 0}}

/* loading — a place setting turning slowly */
.loader{
  width:56px;height:56px;color:var(--ink);
  transform-origin:50% 50%;
  animation:turn 2.6s linear infinite;
}
@keyframes turn{to{transform:rotate(1turn)}}
.styling .loader{margin-top:36px}

/* the status line of the styling screen; ".stage-line", not ".stage":
   the body itself carries class "stage" (see body.stage above), and the
   mockup's short class name leaked its margin onto the body */
.stage-line{margin:20px 0 0;min-height:1.5em;font-size:15px;color:var(--ink);transition:opacity .4s ease}
.stage-line.fade{opacity:0}

.bar{width:min(240px,70%);height:2px;margin:18px 0 0;background:var(--line);border-radius:2px;overflow:hidden}
.bar i{display:block;height:100%;width:0;background:var(--ink)}
#app[data-state="styling"] .bar i{animation:fill 60s cubic-bezier(.2,.6,.3,1) forwards}
@keyframes fill{to{width:92%}}

.wait-note{margin:22px 0 0;max-width:40ch;font-size:13px;line-height:1.55;color:var(--faint);text-wrap:pretty}
.wait-note b,.result b{font-weight:500;color:var(--ink);display:inline-block;max-width:100%;overflow-wrap:anywhere}

/* ---------- result: the styled board and the offer ---------- */
.result{
  width:100%;
  flex-direction:column;
  align-items:center;
  display:none;
}
#app:is([data-state="result"],[data-state="quote"],[data-state="quoted"]) .result{display:flex}
.result h1{margin-bottom:12px}
.sent-line{margin:0 0 24px;font-size:14px;line-height:1.5;color:var(--ink);text-wrap:pretty}

.board{
  width:min(320px,100%);margin:0;
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
  background:var(--field);
}
.board img{display:block;width:100%;height:auto}

.board-cap{margin:12px 0 0;font-size:12.5px;color:var(--faint)}
.offer-title{
  margin:40px 0 6px;
  font-family:"Cormorant Garamond",Georgia,serif;font-weight:500;
  font-size:1.6rem;line-height:1.2;text-wrap:balance;
}
.offer-sub{margin:0;max-width:44ch;font-size:14px;line-height:1.55;color:var(--ink);text-wrap:pretty}
#app[data-state="quoted"] .offer{display:none}
.actions{display:flex;justify-content:center;margin-top:26px}
.actions .btn{min-width:330px}
#app[data-state="quote"] #quoteBtn{background:var(--bg);color:var(--ink);border-color:var(--ink)}
#app[data-state="quoted"] .actions{display:none}

/* quote request */
.quote{display:none;width:min(420px,100%);margin:40px auto 0;text-align:left}
#app[data-state="quote"] .quote{display:block}
.quote-title{
  margin:0 0 6px;text-align:center;
  font-family:"Cormorant Garamond",Georgia,serif;font-weight:500;font-size:1.45rem;text-wrap:balance;
}
.quote-sub{margin:0 0 22px;text-align:center;font-size:12.5px;color:var(--faint);text-wrap:pretty}
.field{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:14px 0;border-top:1px solid var(--line);
}
.field-col{flex-direction:column;align-items:stretch;gap:6px}
.field.last{border-bottom:1px solid var(--line)}
.field-k{font-size:14px;color:var(--ink)}
.field-k i{font-style:normal;color:var(--faint);font-size:12px;margin-left:4px}
.field textarea{
  width:100%;resize:vertical;min-height:64px;
  font:inherit;font-size:14px;line-height:1.5;color:var(--ink);
  background:none;border:none;padding:4px 0;
}
.field textarea::placeholder{color:var(--faint)}
.field textarea:focus{outline:none}
.stepper{display:flex;align-items:center;gap:14px}
.stepper button{
  width:32px;height:32px;border-radius:50%;
  background:var(--bg);border:1px solid var(--line-strong);color:var(--ink);
  font:inherit;font-size:16px;line-height:1;cursor:pointer;
}
.stepper button:hover{border-color:var(--ink)}
.stepper output{min-width:2.2ch;text-align:center;font-size:16px;font-variant-numeric:tabular-nums}
.quote .small-note{text-align:center;margin-top:14px}
.quote .submit{display:flex;justify-content:center;margin-top:24px}

.quoted{display:none;margin:40px auto 0;max-width:44ch;font-size:15px;line-height:1.6;color:var(--ink);text-wrap:pretty}
#app[data-state="quoted"] .quoted{display:block}

.again{
  margin-top:44px;padding:4px;
  font:inherit;font-size:12px;letter-spacing:.06em;color:var(--faint);
  background:none;border:none;cursor:pointer;text-decoration:underline;text-underline-offset:3px;
}
.again:hover{color:var(--ink)}

/* privacy — quiet, bottom right; a white backing so the fixed link
   never overlaps page text unreadably on narrow screens */
.privacy{
  position:fixed;
  right:20px;bottom:16px;
  font-size:11px;
  letter-spacing:.06em;
  color:var(--faint);
  text-decoration:none;
  background:var(--bg);
  padding:2px 4px;
}
.privacy:hover{color:var(--ink)}

/* ---- result page (addition, same design language) ---- */
.result-wrap{
  display:flex;
  flex-direction:column;
  align-items:center;
  width:min(720px,100%);
}
.result-photo{
  max-height:70svh;
  width:auto;
  max-width:100%;
  border:1px solid var(--line);
  border-radius:10px;
}
.result-note{
  margin:8px 0 0;
  font-size:13px;
  color:var(--faint);
  max-width:440px;
}
.action{
  display:inline-block;
  margin-top:22px;
  padding:13px 30px;
  border:1px solid var(--line);
  border-radius:999px;
  font-size:11px;
  font-weight:500;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--ink);
  text-decoration:none;
  transition:border-color .2s ease;
}
.action:hover{border-color:var(--ink)}

/* processing state on the result page */
.loader-wrap{
  display:flex;flex-direction:column;align-items:center;gap:13px;
  margin:24px 0 0;
}
.loader-cap{
  margin:0;font-size:11px;letter-spacing:.16em;
  text-transform:uppercase;color:var(--faint);
}

/* ---- privacy page (ported 1:1) ---- */
.privacy-body .page{
  max-width:560px;
  margin:0 auto;
  padding:96px 28px 120px;
}
.privacy-body .back{
  display:inline-block;
  margin-bottom:56px;
  font-size:11px;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:var(--faint);
  text-decoration:none;
}
.privacy-body .back:hover{color:var(--ink)}

.privacy-body h1{
  margin:0 0 8px;
  font-size:clamp(2rem,5vw,2.9rem);
  line-height:1.12;
}
.privacy-body .sub{
  margin:0 0 44px;
  font-size:13px;
  letter-spacing:.02em;
  color:var(--faint);
}

.privacy-body h2{
  margin:40px 0 10px;
  font-family:"Cormorant Garamond",Georgia,serif;
  font-weight:500;
  font-size:1.4rem;
  letter-spacing:-.005em;
}
.privacy-body p{margin:0 0 16px;font-size:15px}
.privacy-body .fine{
  margin-top:56px;
  padding-top:24px;
  border-top:1px solid var(--line);
  font-size:12.5px;
  color:var(--faint);
}
.privacy-body .fine a{text-decoration:underline;text-underline-offset:2px}

@media (max-width:480px){
  .btn,.actions .btn{width:100%;min-width:0}
  .actions{width:100%}
  /* the fixed corner link would sit over the email field / offer text;
     a plain in-flow link at the end of the page cannot overlap anything */
  main{padding-bottom:56px}
  .privacy{
    position:static;
    display:block;
    text-align:center;
    padding:0 0 28px;
  }
  /* 40px taps on touch screens; the mockup's 32px stays on desktop */
  .stepper button{width:40px;height:40px;font-size:18px}
}
@media (max-width:360px){
  /* the default placeholder is a full sentence; let it fit the
     narrowest phones without being cut mid-word (390+ unchanged) */
  .email-input{font-size:13px;padding:0 14px}
}
@media (prefers-reduced-motion:reduce){
  *{transition-duration:.001s!important}
  .loader,.thumb::after{animation:none}
  #app[data-state="styling"] .bar i{animation:none;width:60%}
}
