/* Haat. One stylesheet, two sides of one market: .buy (/, dawn, always light) and .sell (/sell/, dusk, always dark and warm). */
:root {
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  --indic: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', 'Noto Sans Devanagari', 'Noto Sans Kannada', 'Noto Sans Tamil', 'Noto Sans Telugu', 'Nirmala UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --teal: #22d3ee;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
/* No prefers-color-scheme switch: the buyer side is always dawn, the seller side always dusk. */
.buy { color-scheme: light; --bg: #f5f2ec; --ink: #121314; --muted: #5f615c; --line: rgba(18, 19, 20, .1); --paper: #fff; --soft: #ebe6dc;
  --accent: #3f6585; --good: #3c7a59; --btn: #121314; --btn-ink: #fff; --scrim: rgba(245, 242, 236, .92); --shade: rgba(40, 30, 20, .18); }
.sell { color-scheme: dark; --bg: #140e0a; --ink: #f6ece2; --muted: #b9a593; --line: rgba(255, 230, 210, .14); --paper: #1f1610; --soft: #2a1d14;
  --accent: #f0915a; --good: #8fd0a6; --btn: #f6ece2; --btn-ink: #140e0a; --scrim: rgba(20, 14, 10, .9); --shade: rgba(0, 0, 0, .45); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 18px/1.55 var(--font); overflow-x: clip; -webkit-font-smoothing: antialiased; }
html:is([lang=hi], [lang=kn], [lang=ta], [lang=te]) body { font-family: var(--indic); line-height: 1.7; }
a { color: inherit; }
h1, h2 { margin: 0; font-weight: 700; letter-spacing: -.04em; line-height: .98; text-wrap: balance; }
html:is([lang=hi], [lang=kn], [lang=ta], [lang=te], [lang=zh-Hans]) :is(h1, h2) { letter-spacing: 0; line-height: 1.25; }
h1 { font-size: clamp(46px, 6.8vw, 96px); max-width: 12ch; }
html:is([lang=hi], [lang=kn], [lang=ta], [lang=te]) h1 { font-size: clamp(38px, 5.4vw, 76px); max-width: 14ch; }
h2 { font-size: clamp(38px, 5.2vw, 72px); }
html:is([lang=hi], [lang=kn], [lang=ta], [lang=te]) h2 { font-size: clamp(32px, 4.2vw, 58px); }
p { margin: 0; }
.wrap { width: min(1240px, 100% - 32px); margin-inline: auto; }

/* nav: brand only (plus the language menu on /sell/), floating over the hero */
.nav { position: absolute; z-index: 5; inset: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px max(16px, calc((100% - 1240px) / 2)); }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -.02em; white-space: nowrap; }
.brand small { font-weight: 500; font-size: 14px; color: var(--muted); letter-spacing: 0; }
.mi { width: 22px; height: 20px; background: currentColor; -webkit-mask: url(/assets/mi.png) center/contain no-repeat; mask: url(/assets/mi.png) center/contain no-repeat; }

/* pills */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 0;
  background: var(--btn); color: var(--btn-ink); font-family: inherit; font-weight: 600; font-size: 15px; line-height: 1; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.pill.lg { min-height: 58px; padding: 0 30px; font-size: 17px; }
.pill:hover { transform: translateY(-1px); box-shadow: 0 12px 30px -12px var(--shade); }
:is(.pill, .link, summary, .langs button, .doors button, .x):focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.link { color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 1.5px solid var(--line); padding-bottom: 2px; transition: border-color .2s; }
.link:hover { border-color: currentColor; }

/* hero: full-bleed media, one line, one button */
.hero { position: relative; height: 100svh; min-height: 560px; max-height: 1100px; overflow: hidden; isolation: isolate; display: flex; align-items: flex-end; }
.hero-media { position: absolute; inset: 0; z-index: -2; background: var(--soft); }
.hero-media > * { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.hero-media .scene3d, .hero-media video { opacity: 0; transition: opacity 1.2s ease; }
.hero-media.live .scene3d, .hero-media.has-video video { opacity: 1; }
.hero-media.has-video .fallback { display: none; }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to top, var(--bg) 0%, var(--scrim) 14%, color-mix(in srgb, var(--scrim) 50%, transparent) 38%, transparent 64%); }
@media (min-width: 900px) { .hero::after { background: linear-gradient(to top, var(--bg) 0%, transparent 34%), linear-gradient(90deg, var(--scrim) 0%, color-mix(in srgb, var(--scrim) 70%, transparent) 34%, transparent 62%); } }
.sell .hero::before { content: ''; position: absolute; inset: 0 0 auto; height: 160px; z-index: -1; background: linear-gradient(to bottom, rgba(20, 14, 10, .55), transparent); }
.hero-copy { padding-bottom: clamp(48px, 9vh, 112px); }
.hero-copy .pill { margin-top: clamp(28px, 4vh, 40px); }

/* scenes: one big line, one visual, detail on demand */
.scene { display: grid; grid-template-columns: 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; padding-block: clamp(110px, 15vw, 210px) 0; }
@media (min-width: 900px) {
  .scene { grid-template-columns: 1fr 1fr; }
  .scene.flip .vis { order: -1; }
}
.scene h2 { max-width: 12ch; }
html:is([lang=hi], [lang=kn], [lang=ta], [lang=te], [lang=zh-Hans]) .scene h2 { max-width: 15ch; }
.vis { position: relative; }

details.more { margin-top: 28px; max-width: 460px; }
details.more summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; color: var(--muted); user-select: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: ''; width: 9px; height: 9px; border-right: 1.75px solid currentColor; border-bottom: 1.75px solid currentColor; transform: translateY(-3px) rotate(45deg); transition: transform .3s var(--ease); }
details.more[open] summary::after { transform: translateY(2px) rotate(-135deg); }
details.more summary:hover { color: var(--ink); }
details.more .body { padding-top: 14px; color: var(--muted); font-size: 18px; }
details.more .body p + p, details.more .body p + .prod { margin-top: 10px; }
.src { font-size: 14px; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* buyer (a): the usable share */
.usable .num { font-size: clamp(76px, 11vw, 156px); font-weight: 700; letter-spacing: -.05em; line-height: .9; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.usable .num small { font-size: .42em; letter-spacing: -.02em; }
.usable .bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--line); margin-top: 28px; }
.usable .bar i { display: block; height: 100%; background: var(--accent); }
.usable .bar i + i { opacity: .35; }
.usable .lbl { margin-top: 12px; font-size: 16px; color: var(--muted); }

/* buyer (b): request and incoming samples */
.req { background: var(--paper); border-radius: 28px; padding: 26px; box-shadow: 0 40px 80px -40px var(--shade); max-width: 480px; }
.req .top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.req .top span { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.clips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.clip { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; background: linear-gradient(135deg, #d7e3ec, #8faabd); overflow: hidden; }
.clip:nth-child(2) { background: linear-gradient(135deg, #e6dccb, #b49d7f); }
.clip:nth-child(3) { background: linear-gradient(135deg, #dfe7dc, #91a88f); }
.clip::after { content: ''; position: absolute; left: 50%; top: 50%; translate: -35% -50%; border: 8px solid transparent; border-left: 13px solid #fff; border-right: 0; }
.clip.ok { outline: 2.5px solid var(--good); outline-offset: 2px; }
.req .ex { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* buyer (c) and seller (b): the real AnchorCam Stereo */
.prod img { display: block; width: 100%; height: auto; border-radius: 28px; box-shadow: 0 40px 90px -40px var(--shade); }
.prod .row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 20px; margin-top: 20px; }
.verified { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 16px; }
.verified::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 12px var(--teal); }
.prod.mini { max-width: 320px; margin-top: 16px; }
.prod.mini img { border-radius: 16px; }
.prod.mini .row { margin-top: 10px; font-size: 16px; }

/* seller (a): requests */
.asks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; max-width: 460px; }
.asks li { display: flex; justify-content: space-between; gap: 16px; padding: 20px 24px; border-radius: 20px; background: var(--paper); font-size: 19px; font-weight: 600; }
.asks li b { color: var(--accent); font-variant-numeric: tabular-nums; }
.asks li:nth-child(2) { margin-left: 24px; opacity: .8; } .asks li:nth-child(3) { margin-left: 48px; opacity: .6; }
.asks + .ex { margin-top: 12px; font-size: 13px; color: var(--muted); }

/* seller (b): record, upload, paid */
.flow { display: flex; align-items: center; max-width: 460px; }
.flow .dot { flex: none; width: clamp(76px, 9vw, 104px); aspect-ratio: 1; border-radius: 50%; background: var(--paper); display: grid; place-items: center; }
.flow .dot svg { width: 42%; height: 42%; }
.flow .dot.paid { background: var(--accent); color: var(--btn-ink); }
.flow .ln { flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 14px); }

/* seller (c): zero */
.zero { font-size: clamp(120px, 18vw, 240px); font-weight: 700; letter-spacing: -.06em; line-height: .85; color: var(--accent); }
.zero small { display: block; font-size: 18px; letter-spacing: 0; color: var(--muted); font-weight: 500; margin-top: 18px; }

/* closing call */
.close-cta { padding-block: clamp(120px, 16vw, 220px) clamp(80px, 10vw, 140px); }
.close-cta .pill { margin-top: 0; }

footer { padding: 28px 0 44px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 15px; color: var(--muted); }

/* scroll reveal (only when JS runs; off with reduced motion) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .12s; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .pill, details.more[open] .body { transition: none; animation: none; }
}

/* sheet: forms, request board, sources open here */
dialog.sheet { border: 0; padding: 0; margin: 0; color: var(--ink); background: var(--bg); width: 100%; max-width: 100%; max-height: 92svh; inset: auto 0 0 0; border-radius: 28px 28px 0 0; overflow: auto; overscroll-behavior: contain; box-shadow: 0 -30px 80px -30px rgba(0, 0, 0, .4); }
@media (min-width: 900px) { dialog.sheet { inset: 0 0 0 auto; width: min(640px, 100%); height: 100%; max-height: 100%; border-radius: 28px 0 0 28px; } }
dialog.sheet::backdrop { background: rgba(10, 8, 6, .42); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
dialog.sheet[open] { animation: up .5s var(--ease); }
@media (min-width: 900px) { dialog.sheet[open] { animation-name: side; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes side { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { dialog.sheet[open] { animation: none; } }
.sheet-in { padding: 28px clamp(20px, 4vw, 44px) 48px; }
.sheet-hd { position: sticky; top: 0; z-index: 2; display: flex; justify-content: flex-end; padding: 14px 14px 0; background: linear-gradient(var(--bg) 70%, transparent); }
.x { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--soft); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.x svg { width: 18px; height: 18px; }
.sheet h3 { margin: 0; font-size: clamp(26px, 3vw, 34px); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.sheet section + section { margin-top: 48px; }

/* request board */
.board { list-style: none; padding: 0; margin: 18px 0 0; border-top: 1px solid var(--line); font-size: 16px; }
.board li { display: grid; grid-template-columns: 2fr 1fr .8fr 1fr; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.board li.hd { font-size: 13px; color: var(--muted); padding: 10px 0; }
.board li.msg { display: block; color: var(--muted); }
.board li.ex, .board li.ex .c-task { color: var(--muted); font-weight: 500; }
.board .c-task { font-weight: 600; }
.board .c-hours, .board .c-price, .board .c-deadline { font-variant-numeric: tabular-nums; }
.sell .board .c-price { color: var(--accent); font-weight: 600; }
@media (max-width: 560px) { .board li { grid-template-columns: 1fr 1fr 1fr; } .board .c-task { grid-column: 1 / -1; } .board li.hd .c-task { display: none; } }

/* forms */
form { display: grid; gap: 16px; margin-top: 22px; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; }
.two { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 520px) { .two { grid-template-columns: 1fr 1fr; } }
input, select, textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; width: 100%; min-width: 0; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.check { grid-template-columns: auto 1fr; align-items: start; gap: 10px; font-weight: 400; }
.check input { width: 20px; height: 20px; margin-top: 2px; }
.hint { color: var(--muted); font-weight: 400; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { min-height: 1.5em; font-size: 15px; }
.status.ok { color: var(--good); } .status.err { color: #e0664f; }
.buy .status.err { color: #c2412d; }

/* two doors on /sell/ */
.doors { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin-top: 20px; }
.doors button { text-align: left; font: inherit; font-size: 16px; font-weight: 700; color: var(--ink); background: transparent; border: 1.5px solid var(--line); border-radius: 18px; padding: 16px 18px; cursor: pointer; }
.doors button span { display: block; margin-top: 4px; font-size: 14px; font-weight: 400; color: var(--muted); }
.doors button[aria-selected=true] { border-color: var(--ink); background: var(--paper); }
.door[hidden] { display: none; }
.door .wa { margin-top: 20px; }
.pill.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px currentColor; }

/* language menu on /sell/ */
.lang { position: relative; }
.lang summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: rgba(20, 14, 10, .35); color: #f6ece2; font-size: 14px; font-weight: 600; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.lang summary::-webkit-details-marker { display: none; }
.lang summary svg { width: 16px; height: 16px; }
.langs { position: absolute; right: 0; top: calc(100% + 8px); display: grid; min-width: 150px; padding: 6px; border-radius: 18px; background: var(--paper); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .6); }
.langs button { font: inherit; font-size: 15px; text-align: left; color: var(--muted); background: none; border: 0; border-radius: 12px; padding: 9px 12px; cursor: pointer; }
.langs button:hover { color: var(--ink); background: var(--soft); }
.langs button[aria-current=true] { color: var(--ink); font-weight: 600; }
button.link { background: none; border-style: solid; border-width: 0 0 1.5px; font: inherit; font-weight: 600; cursor: pointer; padding: 0 0 2px; }
.flow .dot b { font-size: clamp(30px, 3.4vw, 40px); font-weight: 700; }
