:root {
  --ink: #1A1B1C;
  --navy: #22386D;
  --navy-deep: #1A2C58;
  --blue: #2E4C8E;
  --lilac: #C9D6FF;
  --lilac-soft: #E4EAFF;
  --bg: #F3F5FA;
  --surface: #FFFFFF;
  --line: #E1E5EF;
  --text: #1A1F2E;
  --muted: #5B6478;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20, 30, 60, .06), 0 8px 24px -12px rgba(20, 30, 60, .18);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }

.wrap { width: min(1180px, 100% - 40px); margin: 0 auto; }
@media (max-width: 640px) { .wrap { width: min(1180px, 100% - 28px); } }

/* Top bar */
.top { background: var(--navy); color: #fff; }
.top-inner { display: flex; align-items: center; justify-content: center; height: 60px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 22px; width: auto; display: block; }
.brand-meta { height: 19px; }
.brand-x { opacity: .55; font-weight: 500; }

/* Hero (dark band continuing the top bar) */
.hero { background: linear-gradient(180deg, var(--navy) 0%, #1C2F60 100%); color: #fff; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.045) 1.5px, transparent 1.5px), linear-gradient(90deg, rgba(255,255,255,.045) 1.5px, transparent 1.5px); background-size: 72px 72px; pointer-events: none; }
.hero-inner { position: relative; display: grid; justify-items: center; text-align: center; padding: 0 0 44px; max-width: 760px; }
.prize-stage { position: relative; width: min(640px, 100%); height: 200px; overflow: hidden; display: grid; place-items: center; }
/* display-only: no controls, no interaction; overscan hides the viewer chrome in the corners */
/* product shots cross-fading through four angles; a slow drift sells the "turning" feel */
.glasses { position: relative; width: min(292px, 60%); aspect-ratio: 852 / 395; animation: drift 7s ease-in-out infinite; }
.glasses img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .9s ease; filter: drop-shadow(0 26px 22px rgba(0, 0, 0, .45)); }
.glasses img.on { opacity: 1; }
@keyframes drift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .glasses { animation: none; } .glasses img { transition: none; } }
.hero-pill { display: inline-flex; align-items: center; gap: 6px; margin: -14px 0 16px; padding: 8px 16px; border-radius: 999px; background: var(--lilac); color: #1E2F5E; font-size: 13px; font-weight: 700; letter-spacing: .02em; }
h1 { margin: 0 0 14px; font-size: clamp(30px, 4.6vw, 48px); line-height: 1.08; letter-spacing: -.02em; font-weight: 800; color: #fff; }
.lede { margin: 0 auto; font-size: 17px; color: rgba(255,255,255,.8); max-width: 600px; }
.hero-links { display: flex; justify-content: center; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.hero-links .btn.primary { background: #fff; color: var(--navy); }
.hero-links .btn.primary:hover { background: var(--lilac-soft); }
.hero-links .btn.secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.hero-links .btn.secondary:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.hero-meta { margin: 22px 0 0; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: rgba(255,255,255,.55); }
@media (max-width: 640px) {
  /* phones: the hero owns the first screen, nothing from the light section peeks in below */
  .hero { min-height: calc(100vh - 60px); min-height: calc(100svh - 60px); display: grid; align-content: center; }
  .prize-stage { height: 150px; }
  .hero-inner { padding: 0 0 84px; } /* bottom-heavy padding shifts the centred block up */
  .hero-links { width: 100%; }
  .hero-links .btn { flex: 1 1 100%; }
}

.top, .hero, main, .foot { overflow-x: clip; } /* nothing inside may widen the page on phones */

/* Layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: 28px; align-items: start; padding: 36px 0 60px; max-width: 980px; margin: 0 auto; scroll-margin-top: 16px; }
.preview-col { position: sticky; top: 20px; }
@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .preview-col, .form-col, .preview-card { min-width: 0; max-width: 100%; }
  /* keep the live preview pinned while the form scrolls underneath */
  .preview-col { position: sticky; top: 8px; z-index: 5; }
  .preview-card { padding: 10px; }
  .canvas-frame { width: fit-content; max-width: 100%; margin: 0 auto; }
  #poster { width: auto; height: auto; max-height: 42vh; max-width: 100%; }
  .preview-actions { margin-top: 10px; }
  .preview-actions .btn { height: 42px; flex: 1 1 140px; }
  .preview-card .fineprint { display: none; }
}

.preview-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px; box-shadow: var(--shadow); }
.canvas-frame { position: relative; border-radius: 14px; overflow: hidden; background: var(--navy); touch-action: none; }
#poster { display: block; width: 100%; max-width: 100%; height: auto; cursor: grab; user-select: none; -webkit-user-select: none; }
#poster.dragging { cursor: grabbing; }
.drag-hint { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); background: rgba(10, 18, 40, .72); color: #fff; font-size: 12px; font-weight: 500; padding: 6px 12px; border-radius: 999px; pointer-events: none; white-space: nowrap; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; }
.preview-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.preview-actions .btn { flex: 1 1 200px; }
.fineprint { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }

/* Panels */
.form-col { display: grid; gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.panel-head h2 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.step { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 999px; background: var(--lilac-soft); color: var(--navy); font-size: 13px; font-weight: 700; flex: none; }
.step.gift { background: #FFF1C2; color: #7A5A00; }

/* Segmented */
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg { position: relative; display: block; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; transition: border-color .15s, background .15s; }
.seg strong { font-size: 14px; font-weight: 600; }
.seg small { font-size: 12px; color: var(--muted); }
.seg input:checked + span { border-color: var(--navy); background: var(--lilac-soft); }
.seg input:focus-visible + span { outline: 2px solid var(--navy); outline-offset: 2px; }
@media (max-width: 400px) { .segmented { grid-template-columns: 1fr; } }

/* Dropzone */
.dropzone { display: block; border: 1.5px dashed #B9C3DA; border-radius: 12px; background: #FAFBFE; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--navy); background: var(--lilac-soft); }
.dz-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 22px 16px; color: var(--muted); }
.dz-inner strong { color: var(--text); font-weight: 600; font-size: 14px; margin-top: 4px; }
.dz-inner span { font-size: 12.5px; }
#dzThumb { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.photo-controls { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.range-row { display: flex; align-items: center; gap: 10px; flex: 1; font-size: 13px; font-weight: 600; color: var(--muted); }
.range-row input { flex: 1; accent-color: var(--navy); }

/* Fields */
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input { height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
.field input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(34, 56, 109, .12); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid2 .field { margin-bottom: 0; }
@media (max-width: 400px) { .grid2 { grid-template-columns: 1fr; } }

textarea { width: 100%; resize: vertical; min-height: 160px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; outline: none; line-height: 1.5; font-size: 14px; }
textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(34, 56, 109, .12); }
.caption-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.caption-actions .btn { flex: 1 1 180px; }
.howto { margin: 16px 0 0; padding-left: 20px; font-size: 13.5px; color: var(--muted); display: grid; gap: 6px; }
.howto strong { color: var(--text); font-weight: 600; }
.howto em { font-style: normal; font-weight: 600; color: var(--navy); }

/* Share row */
.share-label { margin: 18px 0 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: center; }
.share-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.btn.share { height: 48px; color: #fff; }
.btn.share.linkedin { background: #0A66C2; } .btn.share.linkedin:hover { background: #084F98; }
.btn.share.instagram { background: linear-gradient(45deg, #F58529, #DD2A7B 55%, #8134AF); } .btn.share.instagram:hover { filter: brightness(1.06); }
.btn.share.x { background: #0F1419; } .btn.share.x:hover { background: #000; }
.howto-note { margin: 12px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.howto-note strong { color: var(--text); font-weight: 600; }
.caption-actions { justify-content: center; }
.caption-actions .btn { flex: 0 1 220px; }
@media (max-width: 400px) { .share-row { grid-template-columns: 1fr; } }

/* Rules */
.rules { background: linear-gradient(180deg, #FFFDF5, #fff); }
.panel-head { justify-content: flex-start; }
.rules ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; }
.rules strong { font-weight: 600; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 999px; border: 1.5px solid transparent; font-weight: 600; font-size: 14.5px; cursor: pointer; text-decoration: none; transition: transform .05s, background .15s, border-color .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-deep); }
.btn.secondary { background: #fff; color: var(--navy); border-color: #C9D0E2; }
.btn.secondary:hover { background: var(--lilac-soft); border-color: var(--navy); }
.btn.linkedin { background: #0A66C2; color: #fff; }
.btn.linkedin:hover { background: #084F98; }
.btn.ghost { background: transparent; color: var(--navy); border-color: transparent; }
.btn.ghost:hover { background: var(--lilac-soft); }
.btn.small { height: 36px; padding: 0 12px; font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* Footer */
.foot { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 20px 0 36px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
.foot a { color: var(--navy); font-weight: 600; text-decoration: none; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

[hidden] { display: none !important; }
