/* The creator's side, in the brand's colours.

   One layout, three sets of tokens: .theme-essenciagua (navy and teal on
   white, Assistant — as essenciagua.fr), .theme-sablesienne (plum and gold on
   cream, EB Garamond over Montserrat — as sablesienne.com), and .theme-neutral
   for a host that has no brand yet. The values come from pros' storefront
   themes, which took them from the live Shopify themes.

   Most creators open their invitation on a phone: everything is designed at
   380px first and simply given room above that. */

:root, .theme-neutral {
  --brand: #2c3e50; --brand-dark: #1d2a36; --accent: #2c7a6b; --accent-dark: #226357;
  --ink: #1f2a33; --ink-soft: #5d6b77; --line: #e3e8ed; --paper: #f6f7f9;
  --surface: #fff; --soft: #eef2f5; --good: #1e7d4f; --bad: #b3261e; --warn: #9a6200;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: var(--font); --display-weight: 700; --radius: 10px; --btn-radius: 8px;
  --btn-case: none; --btn-spacing: 0;
  color-scheme: light;
}
.theme-essenciagua {
  --brand: #002b4b; --brand-dark: #001b30; --accent: #108474; --accent-dark: #0c6c5f;
  --ink: #002b4b; --ink-soft: #4f6577; --line: #e1e8ee; --paper: #f5f8fa; --soft: #eaf3f5;
  --font: "Assistant", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Assistant", sans-serif; --display-weight: 700; --radius: 12px; --btn-radius: 8px;
}
.theme-sablesienne {
  --brand: #871b58; --brand-dark: #6c1246; --accent: #871b58; --accent-dark: #6c1246;
  --gold: #8d704e;
  --ink: #3c2a33; --ink-soft: #7a6570; --line: #ead9c6; --paper: #fbf6ef; --soft: #f5ede2;
  --font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "EB Garamond", Georgia, serif; --display-weight: 600; --radius: 6px; --btn-radius: 4px;
  --btn-case: uppercase; --btn-spacing: .06em;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink);
       font: 16px/1.6 var(--font); }
img { max-width: 100%; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--display); font-weight: var(--display-weight);
             color: var(--brand); line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); letter-spacing: -.01em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
.theme-sablesienne h1 { font-size: clamp(2rem, 6vw, 2.8rem); letter-spacing: 0; }
p { margin: 0 0 1em; }

/* ---- header / footer ---------------------------------------------------- */
.ribbon { background: var(--brand); color: rgba(255,255,255,.85); font-size: 12.5px;
          letter-spacing: .06em; text-align: center; padding: 7px 16px; }
.site-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.site-head .logo img { height: 40px; display: block; }
.theme-sablesienne .site-head .logo img { height: 46px; }
.site-head .logo-text { font-family: var(--display); font-size: 1.3rem; font-weight: 700;
                        color: var(--brand); text-decoration: none; }
.site-head nav { margin-left: auto; display: flex; align-items: center; gap: 14px;
                 font-size: 14.5px; }
.site-head nav a { color: var(--brand); text-decoration: none; font-weight: 600; }
.site-head nav a:hover { color: var(--accent); }
.site-head nav form { margin: 0; }
.site-foot { color: var(--ink-soft); font-size: 13px; text-align: center; padding: 40px 16px 56px; }
.site-foot a { color: var(--ink-soft); }

.wrap { max-width: 1040px; margin: 0 auto; padding-inline: 18px; }
.narrow { max-width: 640px; }
main { padding-block: 28px 20px; }

/* ---- the brand's marks -------------------------------------------------- */
.petals { display: inline-grid; grid-template-columns: 12px 12px; gap: 3px; vertical-align: middle; }
.petals span { width: 12px; height: 12px; border-radius: 60% 0 60% 60%; }
.petals span:nth-child(1) { background: #29b6e7; }
.petals span:nth-child(2) { background: #ac7fb6; transform: rotate(90deg); }
.petals span:nth-child(3) { background: #24a57e; transform: rotate(270deg); }
.petals span:nth-child(4) { background: #a2ba47; transform: rotate(180deg); }
.seal { width: 58px; height: 58px; border: 1.5px solid var(--gold); border-radius: 50%;
        display: inline-flex; align-items: center; justify-content: center;
        box-shadow: 0 0 0 3px rgba(141,112,78,.14); font-family: "EB Garamond", serif;
        font-weight: 700; color: var(--gold); letter-spacing: .04em; }
.eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
           color: var(--accent); margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.theme-sablesienne .eyebrow { color: var(--gold); }

/* ---- hero --------------------------------------------------------------- */
.hero { background: var(--surface); border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; gap: 28px; padding-block: 40px; }
@media (min-width: 820px) { .hero .wrap { grid-template-columns: 1.2fr 1fr; align-items: center;
                                          padding-block: 64px; } }
.hero .lede { font-size: 1.12rem; color: var(--ink-soft); max-width: 36rem; }
.theme-sablesienne .hero { background: var(--soft); }
.hero-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
             padding: 22px; }
.theme-sablesienne .hero-card { background: var(--surface); }

.perks { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.perks li { display: flex; gap: 12px; align-items: flex-start; }
.perks .num { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--brand);
              color: #fff; display: flex; align-items: center; justify-content: center;
              font-weight: 700; font-size: 14px; }
.theme-sablesienne .perks .num { background: var(--gold); font-family: "EB Garamond", serif;
                                 font-size: 17px; }
.perks b { display: block; color: var(--brand); }
.perks span { color: var(--ink-soft); font-size: 14.5px; }

/* ---- blocks ------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
        padding: 22px; margin-bottom: 18px; }
@media (min-width: 640px) { .card { padding: 28px 32px; } }
.card.center { text-align: center; }
.card.highlight { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.muted { color: var(--ink-soft); } .small { font-size: 14px; }
.stack > * + * { margin-top: 12px; }
.grid2 { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } }

/* ---- buttons and forms -------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
       background: var(--accent); color: #fff; border: 0; border-radius: var(--btn-radius);
       padding: 13px 22px; font: 600 15px/1.2 var(--font); text-decoration: none; cursor: pointer;
       text-transform: var(--btn-case); letter-spacing: var(--btn-spacing); text-align: center; }
.btn:hover { background: var(--accent-dark); color: #fff; }
.btn.secondary { background: var(--soft); color: var(--brand); }
.btn.secondary:hover { background: var(--line); }
.btn.ghost { background: none; color: var(--ink-soft); text-decoration: underline; padding-inline: 8px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--brand);
        cursor: pointer; font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }

form.stack label, .field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 5px; }
input[type=text], input[type=email], input[type=tel], input:not([type]), textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; }
input:focus, textarea:focus, select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
                                            border-color: var(--accent); }
textarea { min-height: 110px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; font-weight: 400 !important; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); flex: 0 0 auto; }
.code-input { font-size: 28px !important; letter-spacing: .4em; text-align: center; font-weight: 700;
              font-variant-numeric: tabular-nums; }

.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; background: #e8f5ee;
         color: var(--good); border: 1px solid #c6e6d4; }
.flash.error { background: #fdecea; color: var(--bad); border-color: #f5c6c2; }

/* ---- steps -------------------------------------------------------------- */
.steps { display: flex; gap: 6px; margin: 0 0 22px; padding: 0; list-style: none; counter-reset: s; }
.steps li { flex: 1; text-align: center; font-size: 12px; color: var(--ink-soft); position: relative; }
.steps li::before { counter-increment: s; content: counter(s); display: flex; align-items: center;
                    justify-content: center; width: 30px; height: 30px; margin: 0 auto 6px;
                    border-radius: 50%; background: var(--soft); color: var(--ink-soft);
                    font-weight: 700; font-size: 13px; position: relative; z-index: 1; }
.steps li::after { content: ""; position: absolute; top: 15px; left: calc(50% + 15px);
                   right: calc(-50% + 15px); height: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps li.done::before { content: "✓"; background: var(--accent); color: #fff; }
.steps li.done::after { background: var(--accent); }
.steps li.current::before { background: var(--brand); color: #fff;
                            box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.steps li.current { color: var(--brand); font-weight: 700; }
@media (max-width: 420px) { .steps li span { display: none; } .steps li.current span { display: block; } }

/* ---- codes, products ---------------------------------------------------- */
.code { display: inline-block; font: 700 22px/1 ui-monospace, Menlo, Consolas, monospace;
        letter-spacing: .08em; background: var(--soft); color: var(--brand);
        border: 1.5px dashed var(--accent); border-radius: 8px; padding: 12px 16px; }
.code-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0; }
.copy { font-size: 13px; }
.products { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 14px 0; }
.product { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
           padding: 12px; text-align: center; font-size: 14px; }
.product img { aspect-ratio: 1; object-fit: contain; width: 100%; background: #fff;
               border-radius: calc(var(--radius) - 4px); margin-bottom: 8px; }
.product b { display: block; color: var(--brand); line-height: 1.3; }

/* ---- prose: contract, script ------------------------------------------- */
.prose h2 { font-size: 1.15rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.02rem; margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .35em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 1.6em 0; }
.contract-box { max-height: 52vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px;
                padding: 18px 20px; background: var(--paper); font-size: 14.5px; }

/* ---- video upload ------------------------------------------------------- */
.drop { display: block; border: 2px dashed var(--line); border-radius: var(--radius); padding: 30px 18px;
        text-align: center; background: var(--paper); cursor: pointer; transition: border-color .15s; }
.drop:hover, .drop.over { border-color: var(--accent); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop .big { font-size: 34px; display: block; margin-bottom: 6px; }
.progress { height: 10px; background: var(--soft); border-radius: 99px; overflow: hidden; margin: 12px 0 6px; }
.progress > div { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.versions { list-style: none; padding: 0; margin: 0; }
.versions li { border-top: 1px solid var(--line); padding: 14px 0; }
.versions li:first-child { border-top: 0; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12.5px;
         font-weight: 700; background: var(--soft); color: var(--brand); }
.badge.good { background: #e3f4ea; color: var(--good); }
.badge.warn { background: #fdf1dc; color: var(--warn); }
.feedback { background: #fdf6e7; border-left: 3px solid #e0a526; padding: 10px 14px; border-radius: 6px;
            margin-top: 8px; font-size: 14.5px; }

/* ---- small screens ------------------------------------------------------ */
.code { max-width: 100%; overflow-wrap: anywhere; }
@media (max-width: 520px) {
  .wrap { padding-inline: 14px; }
  .site-head .wrap { min-height: 60px; gap: 10px; }
  .site-head .logo img { height: 30px; }
  .theme-sablesienne .site-head .logo img { height: 34px; }
  .site-head nav { gap: 10px; font-size: 13.5px; }
  .ribbon { font-size: 11px; padding: 6px 12px; }
  .hero .wrap { padding-block: 28px; }
  .card { padding: 18px 16px; }
  .code { font-size: 18px; padding: 10px 12px; }
  .actions .btn { flex: 1 1 100%; }
  .contract-box { max-height: 60vh; padding: 14px; }
}

/* ---- the showcase: best sellers, the gifts flagged ---------------------- */
a.product { display: block; position: relative; color: inherit; text-decoration: none; }
a.product[href]:hover { border-color: var(--accent); }
.product.gift { border-color: var(--accent); background: var(--surface); }
.ribbon-tag { position: absolute; top: 8px; left: 8px; z-index: 1; background: var(--accent);
              color: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
              text-transform: uppercase; border-radius: 99px; padding: 3px 9px; }
.product b { font-size: 13.5px; }
@media (max-width: 520px) { .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.product:not(:has(img)) .ribbon-tag { position: static; display: inline-block; margin-bottom: 6px; }

/* ---- choosing the gift -------------------------------------------------- */
.choices { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin: 12px 0 24px; }
.choice-group { margin: 26px 0 0; font-size: 1.2rem; }
.choose-bar { margin-top: 40px; }
@media (max-width: 520px) { .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.choice { position: relative; cursor: pointer; display: block; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-card { display: flex; flex-direction: column; gap: 6px; height: 100%; text-align: center;
               background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius);
               padding: 12px; font-size: 14px; transition: border-color .12s, box-shadow .12s; position: relative; }
.choice-card img { aspect-ratio: 1; object-fit: contain; width: 100%; background: #fff; border-radius: 6px; }
.choice-card b { color: var(--brand); line-height: 1.3; font-size: 13.5px; }
.choice:hover .choice-card { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.choice input:checked + .choice-card { border-color: var(--accent);
               box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.choice input:focus-visible + .choice-card { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice input:disabled + .choice-card { opacity: .45; cursor: not-allowed; }
.tick { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%;
        background: var(--accent); color: #fff; font-weight: 700; display: none;
        align-items: center; justify-content: center; font-size: 14px; }
.choice input:checked + .choice-card .tick { display: flex; }
.choose-bar { position: sticky; bottom: 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
              background: linear-gradient(to top, var(--paper) 70%, transparent); }

/* ---- the landing's product grid: five a line on a computer ------------- */
.products.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 900px) { .products.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .products.five { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.apply-cta { margin-top: 8px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
