/* BgAway — studio white, ink and marigold. The marching-ants marquee is the one motion motif. */
:root {
  --paper: #ffffff;
  --ink: #16213e;
  --ink-2: #4b5875;
  --marigold: #f6a21e;
  --marigold-hover: #ffb340;
  --marigold-deep: #c47a00;
  --checker: #e6e9ef;
  --line: #d5dbe6;
  --wash: #f5f6f8;
  --note: #fff6e3;
  --danger: #a3261b;
  --radius: 8px;
  --max: 1180px;
  --font-display: "Baloo 2", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Kannada", "Noto Sans Devanagari", "Nirmala UI", Arial, sans-serif;
  --checker-img: conic-gradient(var(--checker) 25%, #fff 0 50%, var(--checker) 0 75%, #fff 0);
}
html[lang="kn"] { --font-display: "Baloo Tamma 2", "Noto Sans Kannada", "Nirmala UI", system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.6 var(--font-body); }
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--ink); text-underline-offset: 3px; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
[hidden] { display: none !important; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--radius); text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 20px; }
@media (min-width: 720px) { .wrap { padding-inline: 32px; } }

/* Header */
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; line-height: 1; }
.brand svg { width: 32px; height: 32px; flex: none; }
.brand span { transform: translateY(2px); }
.langs { display: flex; gap: 2px; }
.langs a { padding: 6px 9px; text-decoration: none; font-size: .9375rem; color: var(--ink-2); border-radius: var(--radius); }
.langs a:hover { color: var(--ink); background: var(--wash); }
.langs a[aria-current="page"] { color: var(--ink); font-weight: 600; border-radius: 0; box-shadow: inset 0 -2px 0 var(--marigold); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 8px 22px; border: 0; border-radius: var(--radius); background: var(--marigold); color: var(--ink); font-weight: 700; font-size: 1rem; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; transition: background-color .15s ease; }
.btn:hover { background: var(--marigold-hover); }
.btn:active { background: var(--marigold-deep); }
.btn-lg { min-height: 58px; padding-inline: 34px; font-size: 1.125rem; }
.btn-line { background: #fff; box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-line:hover { background: var(--wash); }
.btn-line:active { background: var(--checker); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:hover { background: var(--marigold); }
.btn-line:disabled:hover { background: #fff; }
.btn-text { justify-self: start; background: none; border: 0; padding: 6px 0; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Hero */
.hero { display: grid; gap: 24px; padding-block: 8px 56px; align-items: center; }
@media (min-width: 960px) { .hero { grid-template-columns: 5fr 7fr; gap: 56px; padding-block: 28px 88px; } }
.hero h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.125rem, 1.35rem + 3.4vw, 3.875rem); line-height: 1.04; margin: 0 0 14px; }
html[lang="kn"] .hero h1, html[lang="hi"] .hero h1 { line-height: 1.18; font-size: clamp(1.875rem, 1.25rem + 2.8vw, 3.25rem); }
.lede { font-size: 1.125rem; color: var(--ink-2); margin: 0 0 18px; max-width: 34em; }
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.points li { display: flex; gap: 12px; align-items: baseline; font-weight: 600; }
.points li::before { content: ""; flex: none; width: 9px; height: 9px; background: #fff; box-shadow: 0 0 0 1.5px var(--ink); transform: translateY(-2px); }

/* Drop zone: an empty, selected layer */
.drop {
  position: relative; display: grid; place-items: center; min-height: 300px; padding: 40px 24px; text-align: center; cursor: pointer;
  background:
    linear-gradient(90deg, var(--ink) 50%, #fff 0) 0 0 / 14px 2px repeat-x,
    linear-gradient(90deg, var(--ink) 50%, #fff 0) 0 100% / 14px 2px repeat-x,
    linear-gradient(0deg, var(--ink) 50%, #fff 0) 0 0 / 2px 14px repeat-y,
    linear-gradient(0deg, var(--ink) 50%, #fff 0) 100% 0 / 2px 14px repeat-y,
    var(--checker-img) 0 0 / 24px 24px;
  animation: ants 1.2s linear infinite;
}
@media (min-width: 960px) { .drop { min-height: 440px; } }
@keyframes ants { to { background-position: 14px 0, -14px 100%, 0 -14px, 100% 14px, 0 0; } }
.drop:hover, body.is-dragging .drop { animation-duration: .6s; }
.handle { position: absolute; width: 11px; height: 11px; background: #fff; box-shadow: 0 0 0 1.5px var(--ink); }
.handle.tl { left: -4px; top: -4px; } .handle.tr { right: -4px; top: -4px; }
.handle.bl { left: -4px; bottom: -4px; } .handle.br { right: -4px; bottom: -4px; }
.drop-inner { display: grid; justify-items: center; gap: 10px; max-width: 30em; padding: 22px 20px; background: rgba(255, 255, 255, .9); }
.drop-hint { margin: 4px 0 0; font-weight: 600; }
.drop-formats { margin: 0; font-size: .875rem; color: var(--ink-2); }
.hint-touch { display: none; }
@media (pointer: coarse) { .hint-desk { display: none; } .hint-touch { display: block; } }

/* Workspace */
body[data-view="work"] .hero { display: none; }
.work { padding-block: 4px 56px; }
.work-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 14px; }
.work-bar .btn { min-height: 42px; padding-inline: 16px; }
.work-file { margin: 0; font-weight: 600; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 12ch; }
.work-engine { margin: 0; color: var(--ink-2); font-size: .875rem; }
.work-grid { display: grid; gap: 20px; }
@media (min-width: 960px) { .work-grid { grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; } }

.stage { position: relative; display: grid; place-items: center; height: min(58vh, 560px); min-height: 280px; background: var(--checker-img) 0 0 / 22px 22px; box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
@media (min-width: 960px) { .stage { height: min(76vh, 700px); position: sticky; top: 16px; } }
.stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .2s;
  background:
    linear-gradient(90deg, var(--ink) 50%, #fff 0) 0 0 / 14px 2px repeat-x,
    linear-gradient(90deg, var(--ink) 50%, #fff 0) 0 100% / 14px 2px repeat-x,
    linear-gradient(0deg, var(--ink) 50%, #fff 0) 0 0 / 2px 14px repeat-y,
    linear-gradient(0deg, var(--ink) 50%, #fff 0) 100% 0 / 2px 14px repeat-y;
  animation: ants-edge 1s linear infinite;
}
@keyframes ants-edge { to { background-position: 14px 0, -14px 100%, 0 -14px, 100% 14px; } }
.stage.is-busy::after { opacity: 1; }
.stage canvas { box-shadow: 0 0 0 1px rgba(22, 33, 62, .12); }
.stage canvas.is-draggable { cursor: grab; touch-action: none; }
.stage canvas.is-draggable:active { cursor: grabbing; }
.stage canvas:focus-visible { outline: 3px solid var(--marigold); outline-offset: 3px; }

.status { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(88%, 430px); padding: 18px 20px; background: rgba(255, 255, 255, .96); box-shadow: 0 0 0 1px var(--line); }
.status-text { margin: 0; font-weight: 700; }
.status-note { margin: 6px 0 0; color: var(--ink-2); font-size: .9375rem; }
.status-note:empty { display: none; }
.status .btn { margin-top: 14px; }
.status.is-error .status-text { color: var(--danger); }
.bar { height: 6px; margin-top: 12px; background: var(--checker); overflow: hidden; }
.bar > span { display: block; width: 0; height: 100%; background: var(--marigold); transition: width .25s ease; }
.bar.is-indeterminate > span { width: 35%; animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-110%); } to { transform: translateX(300%); } }

/* Panel */
.panel { display: grid; gap: 22px; align-content: start; }
.group { display: grid; gap: 12px; margin: 0; padding: 0; border: 0; min-width: 0; }
.label { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 0; font-weight: 700; font-size: .9375rem; }
.label output { font-weight: 600; color: var(--ink-2); }
fieldset.group > legend.label { margin-bottom: 10px; }
.field { display: grid; gap: 8px; }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); border-radius: var(--radius); box-shadow: inset 0 0 0 1.5px var(--ink); overflow: hidden; }
.seg label { position: relative; display: flex; }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg span { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 6px 8px; text-align: center; font-weight: 600; font-size: .9375rem; line-height: 1.2; }
.seg label + label span { box-shadow: inset 1.5px 0 0 var(--ink); }
.seg input:checked + span { background: var(--ink); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--marigold); outline-offset: -6px; }

.swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.sw { position: relative; display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 4px 6px; border-radius: var(--radius); font-size: .8125rem; line-height: 1.2; color: var(--ink-2); cursor: pointer; }
.sw:hover { background: var(--wash); }
.sw input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip { flex: none; width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(22, 33, 62, .28); }
.chip-transparent { background: var(--checker-img) 0 0 / 10px 10px; }
.chip-custom { background: conic-gradient(#f6a21e, #e8445a, #7a5cff, #1fa3ff, #19b47a, #f6a21e); }
.sw input:checked ~ .chip { box-shadow: inset 0 0 0 1px rgba(22, 33, 62, .28), 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.sw input:checked ~ .sw-name { color: var(--ink); font-weight: 700; }
.sw input:focus-visible ~ .chip { outline: 3px solid var(--marigold); outline-offset: 5px; }
.color-row { display: flex; align-items: center; gap: 10px; font-size: .9375rem; }
.color-row input { width: 44px; height: 36px; padding: 0; border: 1.5px solid var(--ink); border-radius: var(--radius); background: #fff; cursor: pointer; }

.radios { display: grid; gap: 4px; }
.radio, .check { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; }
.radio input, .check input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); flex: none; }
input[type="range"] { width: 100%; margin: 6px 0; accent-color: var(--ink); }
select { min-height: 44px; padding: 0 12px; border: 1.5px solid var(--ink); border-radius: var(--radius); background: #fff; }
.hint { margin: 0; font-size: .875rem; color: var(--ink-2); }
.actions { display: grid; gap: 10px; }
.actions .btn { width: 100%; }
.engine { border-top: 1px solid var(--line); padding-top: 14px; }
.engine summary { cursor: pointer; font-weight: 600; font-size: .9375rem; }
.engine .radios { margin-top: 8px; }
.engine .radio:has(input:disabled) { color: var(--ink-2); cursor: not-allowed; }
.note { margin: 0; padding: 10px 12px; background: var(--note); box-shadow: inset 3px 0 0 var(--marigold); font-size: .875rem; }

/* Content sections */
.section { padding-block: 64px; border-top: 1px solid var(--line); }
.section h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); line-height: 1.1; margin: 0 0 32px; }
html[lang="kn"] .section h2, html[lang="hi"] .section h2 { line-height: 1.25; }
.make { display: grid; gap: 40px; }
.make figure { margin: 0; display: grid; }
@media (min-width: 820px) {
  .make { grid-template-columns: repeat(3, 1fr); grid-template-rows: auto auto; gap: 0 36px; }
  .make figure { grid-row: span 2; grid-template-rows: subgrid; }
  .make .frame { align-self: end; }
}
.frame { display: grid; place-items: center; box-shadow: 0 0 0 1px var(--line); }
.frame svg { width: 62%; height: auto; }
.frame-cut { aspect-ratio: 4 / 5; background: var(--checker-img) 0 0 / 20px 20px; }
.frame-product { aspect-ratio: 1; background: #fff; }
.frame-passport { aspect-ratio: 35 / 45; background: #fff; width: 78%; overflow: hidden; }
.frame-passport svg { width: 100%; align-self: end; }
.make h3, .steps h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.3125rem; line-height: 1.2; margin: 18px 0 6px; }
.make p, .steps p { margin: 0; color: var(--ink-2); max-width: 36em; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; counter-reset: step; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 36px; } }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: block; font-family: var(--font-display); font-weight: 800; font-size: 3rem; line-height: 1; color: var(--marigold-deep); }
.steps h3 { margin-top: 8px; }

.faq { max-width: 780px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { position: relative; list-style: none; padding: 18px 44px 18px 0; font-weight: 700; font-size: 1.0625rem; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  background: linear-gradient(var(--ink), var(--ink)) center / 14px 2px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 2px 14px no-repeat; }
.faq details[open] summary::after { background: linear-gradient(var(--ink), var(--ink)) center / 14px 2px no-repeat; }
.faq details p { margin: 0 0 20px; color: var(--ink-2); max-width: 62ch; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding-block: 28px 40px; font-size: .9375rem; color: var(--ink-2); }
.foot-grid { display: grid; gap: 10px; }
@media (min-width: 820px) { .foot-grid { grid-template-columns: 1fr auto auto; gap: 32px; align-items: baseline; } }
.site-foot p { margin: 0; }
.foot-about { max-width: 60ch; }
.foot-links a { margin-right: 14px; }

/* Page-wide drop target while dragging a file */
.drag-overlay {
  position: fixed; inset: 10px; z-index: 50; display: none; place-items: center; background: rgba(255, 255, 255, .9);
  background-image:
    linear-gradient(90deg, var(--marigold-deep) 50%, #fff 0), linear-gradient(90deg, var(--marigold-deep) 50%, #fff 0),
    linear-gradient(0deg, var(--marigold-deep) 50%, #fff 0), linear-gradient(0deg, var(--marigold-deep) 50%, #fff 0);
  background-size: 16px 3px, 16px 3px, 3px 16px, 3px 16px;
  background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
  background-position: 0 0, 0 100%, 0 0, 100% 0;
  animation: ants-big .7s linear infinite;
}
@keyframes ants-big { to { background-position: 16px 0, -16px 100%, 0 -16px, 100% 16px; } }
.drag-overlay p { margin: 0; padding: 0 24px; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem); text-align: center; }
body.is-dragging .drag-overlay { display: grid; }

.toast { position: fixed; left: 50%; bottom: 20px; z-index: 60; transform: translateX(-50%); max-width: calc(100% - 32px); margin: 0; padding: 10px 16px; border-radius: var(--radius); background: var(--ink); color: #fff; font-size: .9375rem; }

/* Privacy and simple pages */
.doc { max-width: 720px; padding-block: 24px 72px; }
.doc h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 1.5rem + 2vw, 3rem); line-height: 1.08; margin: 0 0 12px; }
.doc h2 { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; line-height: 1.2; margin: 36px 0 8px; }
.doc p, .doc li { color: var(--ink-2); }
.doc .updated { font-size: .9375rem; }

@media (prefers-reduced-motion: reduce) {
  .drop, .stage::after, .drag-overlay { animation: none !important; }
  .bar.is-indeterminate > span { animation: none; width: 100%; opacity: .5; }
  .btn, .bar > span, .stage::after { transition: none; }
}
