/* Tarosoft - Image Frame Work website
   Palette follows the IFW 5 dark theme (deep navy workspace, cyan measurement labels). */
:root {
  --bg: #0a1118;
  --bg-2: #0e1721;
  --panel: #121d28;
  --panel-2: #172533;
  --line: #213341;
  --line-2: #2c4252;
  --text: #e7eef3;
  --muted: #96a9b6;
  --accent: #3fd8ea;
  --accent-ink: #062a31;
  --blue: #3b82ff;
  --ok: #37c871;
  --warn: #ffb84a;
  --radius: 14px;
  --wrap: 1180px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, "Noto Sans Thai", sans-serif;
  --mono: "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -0.02em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 650; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.lead { font-size: 1.14rem; color: var(--muted); max-width: 62ch; }
section { padding: 88px 0; }
.section-head { max-width: 760px; margin-bottom: 44px; }
.alt { background: var(--bg-2); border-block: 1px solid var(--line); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 17, 24, .82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font-weight: 650; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand small { display: block; font-size: .7rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: -3px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--muted); font-size: .95rem; padding: 8px 12px; border-radius: 8px; }
.nav-links a:not(.btn):hover, .nav-links a:not(.btn)[aria-current="page"] { color: var(--text); background: var(--panel); text-decoration: none; }
.nav-links a.btn { color: var(--accent-ink); margin-left: 8px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line-2); color: var(--text); border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.nav-toggle svg { display: block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: .97rem; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 8px 26px rgba(63, 216, 234, .28); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--panel); box-shadow: none; }
.btn.small { padding: 7px 13px; font-size: .88rem; border-radius: 8px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 84px 0 0; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 760px; pointer-events: none;
  background:
    radial-gradient(520px 320px at 22% 30%, rgba(63, 216, 234, .16), transparent 70%),
    radial-gradient(620px 380px at 80% 20%, rgba(59, 130, 255, .18), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 20%, transparent 75%);
}
.hero .wrap { position: relative; z-index: 1; }
.hero-copy { max-width: 800px; margin: 0 auto; text-align: center; }
.hero-copy .lead { margin-inline: auto; }
.hero h1 span { background: linear-gradient(90deg, var(--accent), #7aa7ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; margin-bottom: 22px;
  border: 1px solid var(--line-2); border-radius: 999px; background: rgba(18, 29, 40, .7);
  font-size: .85rem; color: var(--muted);
}
.pill b { color: var(--accent); font-weight: 650; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero .cta-row { justify-content: center; }

.shot {
  margin: 56px auto 0; border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden;
  background: #0d151d; box-shadow: 0 40px 120px rgba(0, 0, 0, .6), 0 0 0 1px rgba(63, 216, 234, .05);
}
.shot img { width: 100%; }
.hero .shot { border-bottom: 0; border-radius: 14px 14px 0 0; }
.shot figcaption { padding: 10px 16px; font-size: .84rem; color: var(--muted); border-top: 1px solid var(--line); }

/* ---------- Fact strip ---------- */
.facts { padding: 0; border-block: 1px solid var(--line); background: var(--bg-2); }
.facts .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 26px 22px; border-left: 1px solid var(--line); }
.fact:first-child { border-left: 0; padding-left: 0; }
.fact b { display: block; font-size: 1.5rem; letter-spacing: -0.02em; }
.fact span { color: var(--muted); font-size: .92rem; }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.card h3 { display: flex; align-items: center; gap: 12px; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.icon {
  flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(63, 216, 234, .1); color: var(--accent); border: 1px solid rgba(63, 216, 234, .22);
}
.icon svg { width: 20px; height: 20px; }
ul.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
ul.ticks li { position: relative; padding-left: 24px; margin: 7px 0; color: var(--muted); }
ul.ticks li::before {
  content: ""; position: absolute; left: 2px; top: .62em; width: 10px; height: 6px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg) translateY(-2px);
}
ul.ticks li b { color: var(--text); font-weight: 600; }
.tag {
  display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; background: rgba(63, 216, 234, .14); color: var(--accent); margin-left: auto;
}

.split { display: grid; grid-template-columns: 1fr 1.25fr; gap: 54px; align-items: center; }
.split .shot { margin: 0; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.swatch { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); padding: 5px 12px 5px 6px; border: 1px solid var(--line); border-radius: 999px; }
.swatch i { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); }

/* ---------- Feature highlights ---------- */
.highlights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.hl { padding: 16px 16px 16px 18px; border: 1px solid rgba(63, 216, 234, .28); border-left: 3px solid var(--accent); border-radius: 12px; background: linear-gradient(180deg, rgba(63, 216, 234, .08), rgba(63, 216, 234, .02)); }
.hl b { display: block; font-size: 1rem; margin-bottom: 4px; }
.hl span { display: block; font-size: .86rem; color: var(--muted); line-height: 1.45; }
@media (max-width: 640px) { .highlights { grid-template-columns: 1fr; } }

/* ---------- Screenshot gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.gallery .shot { margin: 0; display: block; color: inherit; cursor: zoom-in; transition: border-color .2s ease, transform .2s ease; }
.gallery .shot:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); }
.gallery .shot.wide { grid-column: 1 / -1; }
.gallery .cap { display: block; padding: 12px 16px; font-size: .9rem; color: var(--muted); border-top: 1px solid var(--line); }
.gallery .cap b { color: var(--text); margin-right: 6px; }
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(4, 8, 12, .92); cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 48px); width: auto; border-radius: 8px; box-shadow: 0 30px 100px #000; }
@media (max-width: 760px) { .gallery { grid-template-columns: 1fr; } }

/* ---------- Live demo ---------- */
.demo { background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; overflow: hidden; box-shadow: 0 30px 90px rgba(0, 0, 0, .45); }
.demo-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: var(--panel-2); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tab { font: inherit; font-size: .92rem; font-weight: 600; color: var(--muted); background: none; border: 1px solid transparent; border-radius: 8px; padding: 8px 14px; cursor: pointer; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); background: var(--bg); border-color: var(--line-2); }
.demo-note { margin-left: auto; font-size: .8rem; color: var(--muted); padding-right: 6px; }
.demo-body { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); }
.stage { position: relative; background: #05090d; display: grid; place-items: start center; min-height: 320px; }
.stage canvas { width: 100%; height: auto; display: block; touch-action: none; cursor: crosshair; }
.stage.drop { outline: 2px dashed var(--accent); outline-offset: -8px; }
.side { border-left: 1px solid var(--line); padding: 20px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.side h4 { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; font-weight: 650; }
.ctl label { display: flex; justify-content: space-between; font-size: .88rem; color: var(--muted); margin-bottom: 4px; }
.ctl label output { color: var(--text); font-family: var(--mono); font-size: .82rem; }
.ctl + .ctl { margin-top: 10px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.seg button { font: inherit; font-size: .84rem; color: var(--muted); background: none; border: 0; padding: 6px 12px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.check { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--muted); }
.check input { accent-color: var(--accent); }
.result-head { font-size: 1.05rem; font-weight: 650; }
.result-head b { color: var(--accent); font-size: 1.5rem; font-family: var(--mono); margin-right: 6px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpi { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.kpi span { display: block; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.kpi b { font-family: var(--mono); font-size: .92rem; font-weight: 600; }
.table-wrap { border: 1px solid var(--line); border-radius: 8px; overflow: auto; max-height: 216px; background: var(--bg); }
table.data { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: .78rem; }
table.data th, table.data td { padding: 5px 9px; text-align: right; white-space: nowrap; }
table.data th { position: sticky; top: 0; background: var(--panel-2); color: var(--muted); font-weight: 600; font-family: var(--font); }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data tbody tr:nth-child(even) { background: rgba(255, 255, 255, .025); }
table.data tbody tr.sel { background: rgba(63, 216, 234, .2); }
.hint { font-size: .8rem; color: var(--muted); margin: 0; }

/* ---------- Cameras ---------- */
.cam h3 { justify-content: space-between; }
.cam dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: .93rem; }
.cam dt { color: var(--muted); }
.cam dd { margin: 0; }

/* ---------- Application notes ---------- */
.note { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 44px 0; border-top: 1px solid var(--line); }
.note:first-of-type { border-top: 0; }
.note:nth-of-type(even) .note-media { order: 2; }
.note-media { display: grid; gap: 12px; justify-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.note-media img { border-radius: 6px; }
.note .fn { font-family: var(--mono); font-size: .82rem; color: var(--accent); margin-bottom: 10px; display: block; }
.note p { color: var(--muted); }

/* ---------- Download ---------- */
.notice { border: 1px solid rgba(255, 184, 74, .35); background: rgba(255, 184, 74, .07); border-radius: var(--radius); padding: 20px 24px; }
.notice h3 { color: var(--warn); }
.notice ol { margin: 0; padding-left: 20px; color: var(--muted); }
.notice li { margin: 6px 0; }
.notice.info { border-color: rgba(63, 216, 234, .4); background: rgba(63, 216, 234, .07); }
.notice.info h3 { color: var(--accent); }
.notice p { color: var(--muted); margin: 0 0 .6em; }
.notice p:last-child { margin-bottom: 0; }
.notice p b { color: var(--text); }
.dl { display: flex; align-items: center; gap: 16px; }
.dl > div { min-width: 0; }
.dl .btn { margin-left: auto; flex: none; }
.dl p { margin: 0; color: var(--muted); font-size: .92rem; }
.timeline { border-left: 2px solid var(--line-2); margin-left: 8px; padding-left: 26px; }
.rel { position: relative; padding-bottom: 26px; }
.rel::before { content: ""; position: absolute; left: -33px; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.rel h3 { margin-bottom: 2px; }
.rel time { font-size: .85rem; color: var(--muted); }
.rel ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }
details.more > summary { cursor: pointer; color: var(--accent); margin: 4px 0 22px; font-weight: 600; }

/* ---------- CTA & footer ---------- */
.cta-band { text-align: center; padding: 80px 0; background: radial-gradient(600px 260px at 50% 0%, rgba(63, 216, 234, .13), transparent 70%), var(--bg-2); border-top: 1px solid var(--line); }
.cta-band .lead { margin-inline: auto; }
.cta-band .cta-row { justify-content: center; }
.page-head { padding: 72px 0 40px; border-bottom: 1px solid var(--line); background: radial-gradient(560px 240px at 15% 0%, rgba(59, 130, 255, .14), transparent 70%); }
.page-head h1 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
footer { border-top: 1px solid var(--line); padding: 44px 0 34px; font-size: .92rem; color: var(--muted); }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.foot h4 { color: var(--text); font-size: .9rem; margin-bottom: 10px; }
.foot a { color: var(--muted); display: block; padding: 3px 0; }
.foot a:hover { color: var(--accent); }
.copy { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .84rem; }

/* ---------- Reveal on scroll (only when JS is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .g3 { grid-template-columns: repeat(2, 1fr); }
  .split, .note { grid-template-columns: 1fr; gap: 28px; }
  .note:nth-of-type(even) .note-media { order: 0; }
  .demo-body { grid-template-columns: 1fr; }
  .side { border-left: 0; border-top: 1px solid var(--line); }
  .facts .wrap { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(3) { border-left: 0; padding-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
  .foot { grid-template-columns: 1fr 1fr; }
}
.brand, .nav-links a { white-space: nowrap; }
/* Medium widths: keep every menu link visible, just tighter */
@media (min-width: 821px) and (max-width: 1100px) {
  .nav { gap: 14px; }
  .nav-links { gap: 0; }
  .nav-links a { font-size: .86rem; padding: 7px 7px; }
  .nav-links a.btn { margin-left: 6px; padding: 7px 12px; }
  .brand { gap: 9px; font-size: .95rem; }
  .brand img { width: 30px; height: 30px; }
}
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; align-items: stretch;
    background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 12px 20px 18px; gap: 2px;
  }
  .nav-links.open { display: flex; }
  .nav-links a.btn { margin: 8px 0 0; justify-content: center; }
}
@media (max-width: 760px) {
  section { padding: 60px 0; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .demo-note { display: none; }
  .dl { flex-direction: column; align-items: flex-start; }
  .dl .btn { margin-left: 0; }
  .foot { grid-template-columns: 1fr; }
}
