@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --red: #e01522;
  --red-dark: #b80f1a;
  --ink: #14181f;
  --ink-2: #2a2f38;
  --muted: #6b7079;
  --line: #e4e1dc;
  --bg: #f4f3f1;
  --card: #ffffff;
  --soft: #f8f7f5;
  --green: #138a4b;
  --green-bg: #e9f6ef;
  --amber: #b26a00;
  --amber-bg: #fff4e2;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20, 24, 31, .04), 0 12px 32px -18px rgba(20, 24, 31, .25);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif; }
a { color: var(--red); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.15; margin: 0; }
.display { font-family: "Bebas Neue", Impact, sans-serif; font-weight: 400; letter-spacing: .5px; }

/* header */
.top { background: var(--ink); color: #fff; border-bottom: 3px solid var(--red); }
.top-in { max-width: 1080px; margin: 0 auto; padding: 16px 20px; display: flex; align-items: center; gap: 14px; }
.top-in img { height: 28px; width: auto; display: block; }
.top-tag { color: #9aa0a8; font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; border-left: 1px solid #3a404a; padding-left: 14px; }
.top-right { margin-left: auto; font-size: 13px; color: #c9cdd3; }
.top-right a { color: #fff; text-decoration: none; }

.hero { background: linear-gradient(180deg, var(--ink) 0%, #1c212a 100%); color: #fff; }
.hero-in { max-width: 860px; margin: 0 auto; padding: 44px 20px 92px; }
.eyebrow { color: var(--red); font-size: 12px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; margin: 0 0 10px; }
.hero h1 { font-family: "Bebas Neue", Impact, sans-serif; font-weight: 400; font-size: clamp(40px, 7vw, 64px); letter-spacing: .5px; }
.hero p { color: #c9cdd3; max-width: 620px; margin: 14px 0 0; font-size: 16px; }
.steps-mini { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 24px; padding: 0; list-style: none; color: #e6e8eb; font-size: 13.5px; }
.steps-mini li { display: flex; align-items: center; gap: 8px; }
.steps-mini b { width: 22px; height: 22px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-size: 12px; }

.wrap { max-width: 860px; margin: -60px auto 60px; padding: 0 16px; position: relative; }

/* cards + form */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; margin-bottom: 18px; }
.card-h { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.num { font-family: "Bebas Neue", Impact, sans-serif; font-size: 28px; color: var(--red); line-height: 1; }
.card h2 { font-family: "Bebas Neue", Impact, sans-serif; font-weight: 400; font-size: 28px; letter-spacing: .4px; }
.card .sub { color: var(--muted); margin: 2px 0 20px; font-size: 14px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.full { grid-column: 1 / -1; }
label.f { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); }
label.f .req { color: var(--red); }
label.f small { display: block; font-weight: 400; color: var(--muted); margin-top: 2px; }
input[type=text], input[type=email], input[type=tel], input[type=url], input[type=password], textarea, select {
  width: 100%; margin-top: 6px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  font: inherit; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(20, 24, 31, .08); }
.hint { background: var(--soft); border: 1px dashed var(--line); border-radius: 10px; padding: 12px 14px; font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.hint ul { margin: 6px 0 0; padding-left: 18px; }
.counter { font-size: 12px; color: var(--muted); text-align: right; margin-top: 4px; }
.counter.ok { color: var(--green); }

/* choice chips + product tiles */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 9px 14px; border: 1.5px solid var(--line); border-radius: 999px; font-size: 13.5px; font-weight: 500; cursor: pointer; user-select: none; transition: all .15s; background: #fff; }
.chip input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(224, 21, 34, .25); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { position: relative; }
.tile input { position: absolute; opacity: 0; }
.tile span { display: flex; align-items: center; gap: 10px; padding: 16px; border: 1.5px solid var(--line); border-radius: 12px; font-weight: 600; cursor: pointer; transition: all .15s; height: 100%; }
.tile span::before { content: ""; width: 18px; height: 18px; border: 1.5px solid #b9bcc2; border-radius: 5px; flex: none; transition: all .15s; }
.tile input:checked + span { border-color: var(--red); background: #fff6f6; }
.tile input:checked + span::before { background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-6.5' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; border-color: var(--red); }
.tile input:focus-visible + span { box-shadow: 0 0 0 3px rgba(224, 21, 34, .25); }

/* uploads */
.drop { display: block; margin-top: 8px; border: 2px dashed #cfcbc5; border-radius: 14px; padding: 26px 16px; text-align: center; cursor: pointer; background: var(--soft); transition: all .15s; }
.drop:hover, .drop.over { border-color: var(--red); background: #fff6f6; }
.drop b { display: block; font-size: 15px; }
.drop small { color: var(--muted); }
.drop input { display: none; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 12px; }
.thumb { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; aspect-ratio: 1; display: grid; place-items: center; }
.thumb img { width: 100%; height: 100%; object-fit: contain; background: repeating-conic-gradient(#f1f0ee 0 25%, #fff 0 50%) 0 0/14px 14px; }
.thumb .ext { font-family: "Bebas Neue", Impact, sans-serif; font-size: 26px; color: var(--muted); }
.thumb .nm { position: absolute; left: 0; right: 0; bottom: 0; font-size: 11px; background: rgba(255, 255, 255, .92); padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb .x { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; cursor: pointer; font-size: 14px; line-height: 1; }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; align-items: center; }
.sw { display: flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 10px 4px 4px; background: #fff; }
.sw input[type=color] { width: 30px; height: 30px; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%; }
.sw input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.sw input[type=color]::-webkit-color-swatch { border: 1px solid rgba(0, 0, 0, .15); border-radius: 50%; }
.sw code { font-size: 12px; color: var(--ink-2); }
.sw button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 16px; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--red); flex: none; }
.radios { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; padding: 13px 22px; font: 700 15px Inter, sans-serif; cursor: pointer; text-decoration: none; transition: transform .1s, background .15s, opacity .15s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #000; }
.btn-ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-green { background: var(--green); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 16px 30px; font-size: 16px; }

.submit-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.err { background: #fff0f0; color: #a10d16; border: 1px solid #f5c2c5; border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.ok-box { background: var(--green-bg); color: #0d5c33; border: 1px solid #bfe3cf; border-radius: 10px; padding: 12px 14px; }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 10px 16px 40px; }

/* status pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-new { background: #eef3ff; color: #2a55c9; }
.st-in_design { background: #f2efff; color: #6a46c8; }
.st-proof_sent { background: var(--amber-bg); color: var(--amber); }
.st-changes { background: #fff0f0; color: #c4121d; }
.st-approved { background: var(--green-bg); color: var(--green); }

/* login */
.login-body { min-height: 100vh; display: grid; place-items: center; background: var(--ink); padding: 20px; }
.login-card { width: 100%; max-width: 360px; background: #1c212a; border: 1px solid #2c323c; border-radius: 18px; padding: 34px 28px; text-align: center; color: #fff; }
.login-card h1 { font-family: "Bebas Neue", Impact, sans-serif; font-weight: 400; font-size: 34px; margin-bottom: 18px; }
.login-logo { height: 30px; margin-bottom: 18px; }
.login-card input { margin: 0 0 12px; text-align: center; }
.login-card .btn { width: 100%; }
.login-card .err { margin-bottom: 12px; text-align: left; }

.spinner { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

@media (max-width: 680px) {
  .grid { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .card { padding: 22px 18px; }
  .top-tag { display: none; }
  .hero-in { padding: 32px 20px 84px; }
}

/* proof viewer + pins */
.pv { display: flex; flex-direction: column; gap: 12px; }
.pv-label { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: -6px; }
.pv-page { position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: visible; background: repeating-conic-gradient(#f1f0ee 0 25%, #fff 0 50%) 0 0/18px 18px; line-height: 0; }
.pv-page img, .pv-page canvas { display: block; width: 100%; height: auto; border-radius: 11px; user-select: none; -webkit-user-select: none; }
.pv-page.pickable { cursor: crosshair; }
.pv-loading, .pv-file { padding: 40px 16px; text-align: center; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; line-height: 1.5; }
.pv-pin { position: absolute; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid #fff; background: var(--red); color: #fff; font: 700 13px/1 Inter, sans-serif; cursor: pointer; box-shadow: 0 0 0 2px var(--ink), 0 6px 14px rgba(0, 0, 0, .4); display: grid; place-items: center; padding: 0; z-index: 2; }
.pv-pin.team { background: var(--ink); }
.pv-pin.temp { background: #fff; color: var(--red); border-color: var(--red); }
.pv-pin.pulse { animation: pinpulse .9s ease 2; }
@keyframes pinpulse { 50% { box-shadow: 0 0 0 2px var(--ink), 0 0 0 12px rgba(224, 21, 34, .35); } }
.pv-pop { position: absolute; z-index: 5; width: min(300px, calc(100% - 16px)); background: #fff; border-radius: 12px; box-shadow: 0 18px 40px -10px rgba(0, 0, 0, .45); padding: 12px; line-height: 1.5; cursor: default; }
.pv-pop textarea { min-height: 70px; margin: 0 0 8px; font-size: 14px; }
.pv-pop .row { display: flex; gap: 6px; flex-wrap: wrap; }
.pv-pop .row .btn { flex: 1; padding: 9px 10px; font-size: 13px; }
.pv-tip { background: var(--ink); color: #fff; font-size: 13px; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; display: flex; gap: 8px; align-items: center; }
.pinchip { display: inline-grid; place-items: center; white-space: nowrap; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--red); color: #fff; font: 700 11.5px Inter, sans-serif; border: 0; cursor: pointer; }
.pinchip.team { background: var(--ink); }
.msg.flash { animation: msgflash 1.4s ease; }
@keyframes msgflash { 30% { box-shadow: 0 0 0 3px rgba(224, 21, 34, .45); } }

/* language switcher (EN | ES | PT) */
.lang-sw { display: inline-flex; border: 1px solid #3a404a; border-radius: 999px; padding: 2px; gap: 2px; flex: none; }
.lang-sw button { border: 0; background: none; color: #c9cdd3; font: 700 11.5px Inter, sans-serif; letter-spacing: .5px; padding: 5px 9px; border-radius: 999px; cursor: pointer; }
.lang-sw button.on { background: var(--red); color: #fff; }
.top-in .lang-sw { margin-left: auto; }
.top-in .lang-sw + .top-right { margin-left: 14px; }
@media (max-width: 680px) { .top-in .lang-sw + .top-right { display: none; } }

/* draft (not sent yet) notes */
.pv-pin.draft { background: #fff; color: var(--red); border: 2.5px dashed var(--red); box-shadow: 0 0 0 2px #fff, 0 6px 14px rgba(0, 0, 0, .35); }
.drafts { border: 1.5px dashed #f0b4b8; background: #fff8f8; border-radius: 12px; padding: 12px 14px; margin-top: 16px; }
.drafts h3 { font: 700 14px Inter, sans-serif; margin: 0 0 8px; color: var(--ink); }
.draft-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid #f4d6d8; font-size: 14px; }
.draft-row:first-of-type { border-top: 0; }
.draft-row p { margin: 0; flex: 1; white-space: pre-wrap; overflow-wrap: anywhere; }
.draft-row button.rm { border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.pinchip.draft { background: #fff; color: var(--red); border: 1.5px dashed var(--red); }
.sendbar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30; max-width: 560px; margin: 0 auto; background: var(--ink); color: #fff; border-radius: 14px; padding: 12px 12px 12px 16px; display: flex; align-items: center; gap: 12px; box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .5); font-size: 14px; }
.sendbar b { flex: 1; font-weight: 600; }
.sendbar[hidden] { display: none; }
