/* QR3D Studio — styles */

/* ---------- tokens ---------- */
:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #f1f0eb;
  --ink: #17181c;
  --ink-2: #4b4e57;
  --ink-3: #7a7d86;
  --line: #e2e0d8;
  --accent: #0f6f62;
  --accent-2: #14a08c;
  --accent-soft: #e3f3ef;
  --warn: #9a5b00;
  --warn-bg: #fff4dc;
  --bad: #b3261e;
  --bad-bg: #fde8e6;
  --ok: #1f7a3a;
  --ok-bg: #e6f4ea;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(20, 20, 30, .05), 0 12px 32px -12px rgba(20, 20, 30, .14);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121316;
    --surface: #1b1d21;
    --surface-2: #24262b;
    --ink: #f1f1ee;
    --ink-2: #c3c4c8;
    --ink-3: #8e9097;
    --line: #2f3238;
    --accent: #3cc7b0;
    --accent-2: #14a08c;
    --accent-soft: #163a35;
    --warn: #f0b955;
    --warn-bg: #3a2c12;
    --bad: #ff8a80;
    --bad-bg: #3d1a18;
    --ok: #7fd59a;
    --ok-bg: #173022;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--font); overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; border-radius: 8px; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 50; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-in { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 17px; }
.logo b { color: var(--accent); font-weight: 800; }
.header-nav { display: flex; gap: 20px; }
.header-nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 15px; }
.header-nav a:hover { color: var(--accent); }
@media (max-width: 640px) { .header-nav { display: none; } }

/* ---------- hero ---------- */
.hero { padding-top: 22px; padding-bottom: 16px; }
.hero h1 { font-size: clamp(26px, 4.4vw, 42px); font-weight: 800; }
.hero .sub { margin: 8px 0 0; color: var(--ink-2); max-width: 760px; font-size: clamp(15px, 1.8vw, 17px); }
@media (max-width: 640px) { .hero { padding-top: 14px; padding-bottom: 10px; } .hero .sub { font-size: 14.5px; line-height: 1.5; } }

/* ---------- tool card ---------- */
.tool-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  grid-template-areas: "input preview" "options preview";
  grid-template-rows: auto 1fr; column-gap: 28px; padding: 22px;
}
.panel-input { grid-area: input; }
.panel-preview { grid-area: preview; }
.panel-options { grid-area: options; }
.panel-preview { align-self: start; position: sticky; top: 16px; }
@media (max-width: 900px) {
  .tool-card { grid-template-columns: minmax(0, 1fr); grid-template-areas: "input" "preview" "options"; padding: 14px; }
  .panel-preview { position: static; margin: 12px 0 4px; }
}
.noscript { padding: 12px; background: var(--warn-bg); color: var(--warn); border-radius: 10px; grid-column: 1 / -1; }

.step { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; margin: 4px 0 12px; }
.step span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 14px; flex: none; }
.panel-options .step { margin-top: 22px; }
.panel-options .step:first-child { margin-top: 18px; }
@media (min-width: 901px) { .panel-options .step:first-child { margin-top: 22px; } }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tab { border: 1px solid var(--line); background: var(--surface-2); padding: 7px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.tab.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (max-width: 400px) { .tab { padding: 6px 10px; font-size: 13px; } }

.field { display: block; margin-bottom: 12px; min-width: 0; }
.lbl { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.lbl em { font-style: normal; font-weight: 500; color: var(--ink-3); }
.lbl output { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
input[type=url], input[type=text], select {
  width: 100%; height: 46px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 16px;
  transition: border-color .15s;
}
input[type=url]:focus, input[type=text]:focus, select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.hint { margin: -4px 0 8px; font-size: 13px; color: var(--ink-3); line-height: 1.45; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .row2 { grid-template-columns: 1fr; gap: 0; } }
.field.color input { width: 100%; height: 46px; border: 1.5px solid var(--line); border-radius: 12px; padding: 4px; background: var(--surface); cursor: pointer; }
.group { margin-bottom: 14px; }

.styles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.sty i { width: 30px; height: 30px; display: block; background-color: var(--ink); -webkit-mask-size: cover; mask-size: cover; }
.sty.is-on, .fmt.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.s-clasico { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath d='M2 2h10v10H2zM18 2h10v10H18zM2 18h10v10H2zM18 18h4v4h-4zM24 24h4v4h-4zM18 24h4v4h-4z'/%3E%3C/svg%3E") center/cover; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath d='M2 2h10v10H2zM18 2h10v10H18zM2 18h10v10H2zM18 18h4v4h-4zM24 24h4v4h-4zM18 24h4v4h-4z'/%3E%3C/svg%3E") center/cover; }
.s-redondeado { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Crect x='2' y='2' width='10' height='10' rx='3.5'/%3E%3Crect x='18' y='2' width='10' height='10' rx='3.5'/%3E%3Crect x='2' y='18' width='10' height='10' rx='3.5'/%3E%3Crect x='18' y='18' width='4' height='10' rx='2'/%3E%3Crect x='24' y='24' width='4' height='4' rx='2'/%3E%3C/svg%3E") center/cover; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Crect x='2' y='2' width='10' height='10' rx='3.5'/%3E%3Crect x='18' y='2' width='10' height='10' rx='3.5'/%3E%3Crect x='2' y='18' width='10' height='10' rx='3.5'/%3E%3Crect x='18' y='18' width='4' height='10' rx='2'/%3E%3Crect x='24' y='24' width='4' height='4' rx='2'/%3E%3C/svg%3E") center/cover; }
.s-puntos { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Ccircle cx='23' cy='7' r='5'/%3E%3Ccircle cx='7' cy='23' r='5'/%3E%3Ccircle cx='20' cy='20' r='2'/%3E%3Ccircle cx='26' cy='26' r='2'/%3E%3Ccircle cx='20' cy='26' r='2'/%3E%3C/svg%3E") center/cover; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Ccircle cx='23' cy='7' r='5'/%3E%3Ccircle cx='7' cy='23' r='5'/%3E%3Ccircle cx='20' cy='20' r='2'/%3E%3Ccircle cx='26' cy='26' r='2'/%3E%3Ccircle cx='20' cy='26' r='2'/%3E%3C/svg%3E") center/cover; }
.s-elegante { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath d='M2 6a4 4 0 0 1 4-4h6v6a4 4 0 0 1-4 4H2zM18 2h6a4 4 0 0 1 4 4v6h-6a4 4 0 0 1-4-4zM2 18h6a4 4 0 0 1 4 4v6H6a4 4 0 0 1-4-4zM18 18h4v2a2 2 0 0 1-2 2h-2zM24 24h2a2 2 0 0 1 2 2v2h-4z'/%3E%3C/svg%3E") center/cover; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath d='M2 6a4 4 0 0 1 4-4h6v6a4 4 0 0 1-4 4H2zM18 2h6a4 4 0 0 1 4 4v6h-6a4 4 0 0 1-4-4zM2 18h6a4 4 0 0 1 4 4v6H6a4 4 0 0 1-4-4zM18 18h4v2a2 2 0 0 1-2 2h-2zM24 24h2a2 2 0 0 1 2 2v2h-4z'/%3E%3C/svg%3E") center/cover; }

.emojis { display: flex; flex-wrap: wrap; gap: 6px; }
.emo { width: 42px; height: 42px; display: inline-grid; place-items: center; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 21px; line-height: 1; padding: 0; }
.emo.is-on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent-soft); }
.emo-up { width: auto; padding: 0 10px; display: inline-flex; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.emo-up.is-on { color: var(--ink); }
.emo-x { width: auto; padding: 0 12px; font-size: 13px; font-weight: 600; color: var(--bad); }

.formats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.fmt { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 10px 6px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink-2); }
.fmt svg { width: 46px; height: 30px; color: var(--accent); margin-bottom: 4px; }
.fmt b { font-size: 13.5px; color: var(--ink); }
.fmt small { font-size: 12px; color: var(--ink-3); }

.swatches { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sw { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); padding: 0; }
.sw.is-on { box-shadow: 0 0 0 2.5px var(--accent); }
.sw-custom { position: relative; overflow: hidden; background: conic-gradient(#f44, #fd4, #4d6, #4cf, #64f, #f4c, #f44); }
.sw-custom input { position: absolute; inset: -6px; opacity: 0; cursor: pointer; width: 44px; height: 44px; }

.range input { width: 100%; accent-color: var(--accent); height: 28px; }

.specs { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-2); background: var(--surface-2); border-radius: 12px; padding: 10px 12px; margin: 2px 0 10px; }
.specs b { color: var(--ink); font-variant-numeric: tabular-nums; }
.warns { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.warns li { font-size: 13.5px; line-height: 1.45; padding: 8px 12px; border-radius: 10px; }
.warns .w-ok { background: var(--ok-bg); color: var(--ok); }
.warns .w-warn { background: var(--warn-bg); color: var(--warn); }
.warns .w-bad { background: var(--bad-bg); color: var(--bad); }

/* preview */
.pv-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (max-width: 900px) and (min-width: 520px) { .pv-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 519px) { .pv-grid { grid-template-columns: 0.8fr 1.2fr; gap: 8px; } }
.pv { margin: 0; background: var(--surface-2); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.pv figcaption { margin-top: 8px; font-size: 12px; color: var(--ink-3); text-align: center; line-height: 1.35; }
.qr-2d { width: 100%; max-width: 260px; aspect-ratio: 1; display: grid; place-items: center; }
.qr-2d canvas, .qr-2d svg { width: 100% !important; height: auto !important; border-radius: 8px; }
.pv-2d { padding: 16px; }
@media (min-width: 901px) { .pv-grid { grid-template-columns: 0.75fr 1.25fr; } .pv-2d { justify-content: center; } }
.viewer { position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; touch-action: none;
  background: radial-gradient(120% 90% at 50% 15%, #ffffff 0%, #e9e8e2 70%, #dddcd5 100%); cursor: grab; }
@media (prefers-color-scheme: dark) { .viewer { background: radial-gradient(120% 90% at 50% 15%, #3a3d44 0%, #24262b 70%, #1b1d21 100%); } }
.viewer:active { cursor: grabbing; }
.viewer canvas { display: block; width: 100% !important; height: 100% !important; }
.viewer-msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 16px; font-size: 13px; color: var(--ink-3); }
.viewer.is-ready .viewer-msg { display: none; }

.dl { margin-top: 14px; display: grid; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 14px; font-weight: 700; border: 1.5px solid transparent; transition: transform .08s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; height: 56px; font-size: 17px; width: 100%; box-shadow: 0 6px 18px -8px var(--accent); }
.btn-primary:hover { background: #0c5f54; }
@media (prefers-color-scheme: dark) { .btn-primary { color: #06231f; } .btn-primary:hover { background: #55d6c1; } }
.btn-primary small { font-weight: 600; opacity: .8; font-size: 13px; margin-left: 4px; }
.btn-primary[disabled] { opacity: .6; cursor: progress; }
.dl-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn-ghost { height: 42px; padding: 0 18px; background: var(--surface); border-color: var(--line); color: var(--ink); font-size: 14.5px; }
.btn-ghost:hover { border-color: var(--accent); }
.btn-link { background: none; border: 0; color: var(--ink-2); font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; padding: 6px 4px; margin-left: auto; }
.btn-link:hover { color: var(--accent); }
.dl-status { min-height: 1.2em; margin: 0; font-size: 13px; color: var(--ink-3); text-align: center; }
.dl-status.is-err { color: var(--bad); }

.privacy { margin: 12px 0 0; font-size: 14px; color: var(--ink-2); text-align: center; }

/* ---------- ad placeholders ---------- */
.ad-slot { display: grid; place-items: center; border: 2px dashed var(--line); border-radius: 12px; background: repeating-linear-gradient(45deg, transparent 0 10px, rgba(127, 127, 127, .05) 10px 20px); color: var(--ink-3); }
.ad-slot span { font-size: 12px; font-weight: 800; letter-spacing: .18em; }
.ad-leaderboard { min-height: 100px; margin: 28px auto 0; max-width: 970px; }
.ad-incontent { min-height: 250px; margin: 8px auto; max-width: 728px; }
.ad-modal { border: 0; border-radius: 18px; padding: 22px 20px 18px; width: min(360px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45); text-align: center; }
.ad-modal::backdrop { background: rgba(10, 12, 16, .55); }
.ad-modal-ok { margin: 0 0 12px; font-weight: 700; }
.ad-modal-slot { min-height: 250px; margin-bottom: 14px; }
.ad-modal .btn-ghost { width: 100%; }
.ad-close { position: absolute; top: 6px; right: 8px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--ink-2); font-size: 22px; line-height: 1; display: grid; place-items: center; }
.ad-toast { position: fixed; right: 16px; bottom: 16px; z-index: 40; width: 300px; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 10px; animation: toastIn .3s ease-out; }
.ad-toast .ad-close { top: -12px; right: -10px; width: 28px; height: 28px; font-size: 18px; box-shadow: var(--shadow); }
.ad-toast-slot { min-height: 100px; }
@keyframes toastIn { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ad-toast { animation: none; } }

/* ---------- content sections ---------- */
.section { padding-top: 56px; }
.section > h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; margin-bottom: 20px; }
.steps3 { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.steps3 li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: relative; counter-increment: s; }
.steps3 li::after { content: counter(s); position: absolute; top: 16px; right: 20px; font-size: 40px; font-weight: 800; color: var(--line); line-height: 1; }
.steps3 .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; }
.steps3 .ico svg { width: 24px; height: 24px; }
.steps3 h3 { font-size: 18px; margin-bottom: 6px; }
.steps3 p { margin: 0; color: var(--ink-2); font-size: 15px; }
.ideas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ideas article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.ideas .em { font-size: 30px; line-height: 1; display: block; margin-bottom: 10px; }
.ideas h3 { font-size: 17px; margin-bottom: 6px; }
.ideas p { margin: 0; color: var(--ink-2); font-size: 15px; }
@media (max-width: 900px) { .steps3, .ideas { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .steps3, .ideas { grid-template-columns: 1fr; } .section { padding-top: 40px; } }
.prose { max-width: 820px; }
.prose h3 { font-size: 19px; margin: 24px 0 8px; }
.prose p { color: var(--ink-2); margin: 0 0 12px; }
.prose strong { color: var(--ink); }
.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 28px 16px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 12px; font-size: 24px; color: var(--accent); font-weight: 500; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--ink-2); }

.site-footer { margin-top: 64px; border-top: 1px solid var(--line); background: var(--surface); padding: 22px 0; font-size: 14px; color: var(--ink-2); }
.foot-in { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; align-items: center; }
.foot-in p { margin: 0; }
.foot-in nav { display: flex; gap: 18px; }

/* legal pages */
.legal { max-width: 820px; padding-top: 32px; }
.legal h1 { font-size: 30px; margin-bottom: 16px; }
.legal h2 { font-size: 20px; margin: 24px 0 8px; }
.legal p, .legal li { color: var(--ink-2); }
.todo { background: var(--warn-bg); color: var(--warn); padding: 1px 6px; border-radius: 6px; font-weight: 600; }

/* related tools (cross-links between landing pages) */
.related { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.rel { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; text-decoration: none; color: var(--ink); transition: border-color .15s; }
.rel:hover { border-color: var(--accent); }
.rel .em { grid-row: span 2; font-size: 26px; line-height: 1; }
.rel b { font-size: 15px; }
.rel small { color: var(--ink-3); font-size: 13px; line-height: 1.35; }
