/* ============================================================
   SMARTSIGN — DESIGN SYSTEM STYLES
   Self-contained premium dark/light layout styles
   ============================================================ */

:root,
[data-theme="dark"] {
  --bg: #050810;
  --bg-soft: #080d17;
  --surface: rgba(255,255,255,.045);
  --surface-strong: rgba(255,255,255,.075);
  --border: rgba(255,255,255,.09);
  --border-strong: rgba(255,255,255,.17);
  --text: #eef3ff;
  --muted: #91a0ba;
  --amber: #ffb703;
  --cyan: #18d4ff;
  --green: #52ed7a;
  --red: #ff5365;
  --header-height: 72px;
  --shadow: 0 28px 80px rgba(0,0,0,.48);
}

[data-theme="light"] {
  --bg: #f7f9fd;
  --bg-soft: #ffffff;
  --surface: rgba(10,20,40,.035);
  --surface-strong: rgba(10,20,40,.065);
  --border: rgba(10,20,40,.1);
  --border-strong: rgba(10,20,40,.18);
  --text: #111827;
  --muted: #5f6e86;
  --amber: #d88400;
  --cyan: #007fa8;
  --green: #17863b;
  --red: #c73647;
  --shadow: 0 28px 70px rgba(43,60,90,.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--muted);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}
body.modal-open { overflow: hidden; }
img, video, canvas { display: block; max-width: 100%; }
button, input, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }

.page-shell { width: min(1240px, calc(100% - 40px)); margin-inline: auto; }
.section { padding: 108px 0; }
.section-alt { background: var(--bg-soft); }
.section-anchor { scroll-margin-top: calc(var(--header-height) + 18px); }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  height: var(--header-height);
  z-index: 1000;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.site-header.scrolled { box-shadow: 0 12px 40px rgba(0,0,0,.18); }
.nav-shell {
  width: min(1320px, calc(100% - 34px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-family: Outfit, sans-serif; font-weight: 900; font-size: 1.25rem; }
.brand > span:last-child span { color: var(--green); }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: linear-gradient(145deg, var(--amber), #ffda61); color: #111; box-shadow: 0 0 26px rgba(255,183,3,.25); }
.main-nav { flex: 1; display: flex; justify-content: center; gap: 22px; }
.main-nav a { color: var(--muted); font-size: .83rem; font-weight: 700; position: relative; padding: 25px 0; white-space: nowrap; }
.main-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 16px; height: 2px; border-radius: 99px; background: var(--amber); transform: scaleX(0); transition: transform .25s ease; }
.main-nav a:hover, .main-nav a.active { color: var(--text); }
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-button, .menu-button, .model-reset {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
}
.icon-button { width: 40px; height: 40px; }
.menu-button { display: none; width: 42px; height: 42px; padding: 10px; }
.menu-button span { display: block; height: 2px; background: currentColor; margin: 5px 0; border-radius: 20px; transition: transform .25s ease, opacity .25s ease; }
.menu-button[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-button[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-button[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid var(--amber);
  border-radius: 11px;
  background: var(--amber);
  color: #111;
  font-weight: 800;
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
  box-shadow: 0 10px 28px rgba(255,183,3,.18);
}
.button:hover { transform: translateY(-2px); box-shadow: 0 16px 35px rgba(255,183,3,.28); filter: brightness(1.05); }
.button-small { min-height: 40px; padding-inline: 18px; font-size: .86rem; }
.button-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); box-shadow: none; }
.button-ghost:hover { border-color: var(--amber); color: var(--amber); box-shadow: none; }

.hero {
  position: relative;
  min-height: 100vh;
  padding: calc(var(--header-height) + 66px) 0 78px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    radial-gradient(circle at 80% 20%, rgba(24,212,255,.09), transparent 34%),
    radial-gradient(circle at 18% 75%, rgba(255,183,3,.08), transparent 32%);
  background-size: 72px 72px, 72px 72px, auto, auto;
}
.ambient { position: absolute; border-radius: 50%; filter: blur(10px); opacity: .55; pointer-events: none; }
.ambient-one { width: 420px; height: 420px; right: -130px; top: 110px; background: radial-gradient(circle, rgba(24,212,255,.12), transparent 66%); }
.ambient-two { width: 370px; height: 370px; left: -150px; bottom: -60px; background: radial-gradient(circle, rgba(255,183,3,.11), transparent 65%); }
.hero-grid { display: grid; grid-template-columns: .92fr 1.08fr; align-items: center; gap: 56px; position: relative; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--amber); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.eyebrow > span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 15px currentColor; }
.hero h1, .section-heading h2, .cta-card h2, .modal-panel h2 { margin: 18px 0 0; font-family: Outfit, sans-serif; color: var(--text); letter-spacing: -.045em; line-height: .98; }
.hero h1 { font-size: clamp(3.2rem, 6.2vw, 6.5rem); font-weight: 900; }
.hero h1 strong, .section-heading h2 strong { color: var(--amber); font-weight: inherit; }
.hero-lead { max-width: 610px; margin: 28px 0 0; font-size: clamp(1rem, 1.7vw, 1.17rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 34px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.hero-badges > span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text); font-size: .77rem; font-weight: 700; }
.dot { width: 7px; height: 7px; border-radius: 50%; }
.dot.amber { background: var(--amber); }.dot.cyan { background: var(--cyan); }.dot.green { background: var(--green); }.dot.red { background: var(--red); }

.model-card { position: relative; border: 1px solid var(--border); border-radius: 24px; background: linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,255,255,.018)); box-shadow: var(--shadow); overflow: hidden; }
.model-card::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 44%, rgba(24,212,255,.1), transparent 45%); }
.model-toolbar { min-height: 66px; padding: 13px 18px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 16px; position: relative; z-index: 3; }
.model-label { display: block; color: var(--text); font-weight: 800; font-size: .9rem; }
.model-note { display: block; margin-top: 2px; font-size: .7rem; }
.model-reset { padding: 8px 11px; font-size: .72rem; }
.model-viewport { position: relative; height: 620px; overflow: hidden; cursor: grab; touch-action: pan-y; }
.model-viewport:active { cursor: grabbing; }
#product-canvas { width: 100%; height: 100%; }
.model-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .36; filter: saturate(.8) contrast(1.05); }
.model-loader { position: absolute; inset: auto 0 24px; text-align: center; font-size: .75rem; color: var(--muted); }
.model-hotspots { position: absolute; inset: 66px 0 0; pointer-events: none; }
.hotspot { position: absolute; padding: 7px 10px; border-radius: 8px; background: color-mix(in srgb, var(--bg) 88%, transparent); border: 1px solid var(--border-strong); color: var(--text); font-size: .69rem; font-weight: 700; backdrop-filter: blur(10px); animation: float 4s ease-in-out infinite; }
.hotspot::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.hs-solar { top: 11%; right: 4%; }.hs-camera { top: 36%; right: 4%; animation-delay: .5s; }.hs-display { top: 57%; left: 4%; animation-delay: 1s; }.hs-signal { bottom: 12%; right: 7%; animation-delay: 1.5s; }

.metric-strip { border-block: 1px solid var(--border); background: var(--bg-soft); }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.metric-grid article { padding: 30px 18px; text-align: center; position: relative; }
.metric-grid article + article::before { content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px; background: var(--border); }
.metric-grid strong { display: block; color: var(--text); font-family: Outfit, sans-serif; font-size: 1.7rem; }
.metric-grid span { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }

.section-heading { max-width: 720px; margin: 0 auto 54px; text-align: center; }
.section-heading.align-left { max-width: none; text-align: left; }
.section-heading h2 { font-size: clamp(2.2rem, 4.7vw, 4.5rem); font-weight: 900; }
.section-heading p { max-width: 640px; margin: 18px auto 0; }
.section-heading.align-left p { margin-left: 0; }

.workflow-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.workflow-card, .feature-card, .application-card { position: relative; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); transition: transform .3s ease, border-color .3s ease, background .3s ease, box-shadow .3s ease; }
.workflow-card:hover, .feature-card:hover, .application-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--amber) 45%, var(--border)); background: var(--surface-strong); box-shadow: 0 22px 50px rgba(0,0,0,.18); }
.workflow-card { padding: 30px 26px; overflow: hidden; }
.workflow-card b { position: absolute; right: 20px; top: 14px; font-family: Outfit, sans-serif; font-size: 3rem; color: rgba(255,183,3,.09); }
.workflow-card > span, .feature-card > span { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,183,3,.09); border: 1px solid rgba(255,183,3,.25); color: var(--amber); font-size: 1.1rem; }
.workflow-card h3, .feature-card h3, .application-card h3, .video-copy h3 { color: var(--text); margin: 18px 0 7px; font-family: Outfit, sans-serif; }
.workflow-card p, .feature-card p, .application-card p, .video-copy p { margin: 0; font-size: .9rem; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature-card { padding: 26px 23px; }

.video-section { background: linear-gradient(180deg, var(--bg), var(--bg-soft)); }
.featured-video, .video-card { border: 1px solid var(--border); border-radius: 18px; background: var(--surface); overflow: hidden; box-shadow: 0 18px 50px rgba(0,0,0,.2); }
.featured-video { display: grid; grid-template-columns: 1.55fr .75fr; margin-bottom: 22px; }
.video-grid { display: grid; grid-template-columns: minmax(0, 820px); justify-content: center; gap: 18px; }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #020305; overflow: hidden; }
.video-frame video { width: 100%; height: 100%; object-fit: cover; }
.featured-video .video-frame { aspect-ratio: auto; min-height: 450px; }
.play-overlay { position: absolute; inset: 0; border: 0; background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.7)); color: white; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; transition: opacity .25s ease, background .25s ease; }
.play-overlay:hover { background: rgba(0,0,0,.42); }
.play-overlay.hidden { opacity: 0; pointer-events: none; }
.play-overlay span { width: 76px; height: 76px; display: grid; place-items: center; border-radius: 50%; background: var(--amber); color: #111; font-size: 1.6rem; box-shadow: 0 0 42px rgba(255,183,3,.38); }
.play-overlay small { font-size: .83rem; font-weight: 800; }
.play-overlay.compact span { width: 58px; height: 58px; font-size: 1.2rem; }
.video-copy { padding: 24px; }
.featured-video .video-copy { display: flex; flex-direction: column; justify-content: center; padding: 34px; }
.video-copy > span { color: var(--amber); text-transform: uppercase; letter-spacing: .08em; font-weight: 800; font-size: .68rem; }
.video-copy h3 { font-size: 1.15rem; }
.featured-video .video-copy h3 { font-size: 1.8rem; }

.gallery-grid { display: grid; grid-template-columns: 1.15fr 1fr 1fr; grid-auto-rows: 260px; gap: 16px; }
.gallery-item { position: relative; margin: 0; border: 1px solid var(--border); border-radius: 17px; overflow: hidden; background: #05070c; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.gallery-item:hover img { transform: scale(1.045); }
.gallery-tall { grid-row: span 2; }
.gallery-model { grid-column: span 2; }
.gallery-item figcaption { position: absolute; inset: auto 0 0; padding: 38px 17px 15px; background: linear-gradient(transparent, rgba(0,0,0,.82)); color: white; font-weight: 700; font-size: .8rem; }
.mini-model { width: 100%; height: 100%; }

.application-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.application-card { padding: 26px; text-align: center; }
.application-card > span { font-size: 2rem; }

.spec-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 17px; }
.spec-table { width: 100%; border-collapse: collapse; min-width: 660px; }
.spec-table th, .spec-table td { padding: 16px 22px; text-align: left; border-bottom: 1px solid var(--border); }
.spec-table th { background: var(--surface-strong); color: var(--text); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.spec-table td { font-size: .9rem; }
.spec-table td:last-child { color: var(--text); font-weight: 700; }
.spec-table tr:last-child td { border-bottom: 0; }

.faq-shell { max-width: 940px; }
.faq-list { display: grid; gap: 12px; }
.faq-item { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); overflow: hidden; }
.faq-item button { width: 100%; border: 0; background: transparent; color: var(--text); padding: 20px 22px; display: flex; justify-content: space-between; align-items: center; text-align: left; font-weight: 800; }
.faq-item button span { font-size: 1.35rem; color: var(--amber); transition: transform .25s ease; }
.faq-item > div { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.faq-item > div > p { overflow: hidden; margin: 0; padding: 0 22px; transition: padding .3s ease; }
.faq-item.open > div { grid-template-rows: 1fr; }
.faq-item.open > div > p { padding: 0 22px 20px; }
.faq-item.open button span { transform: rotate(45deg); }

.cta-section { padding: 0 0 100px; }
.cta-card { border: 1px solid var(--border); border-radius: 22px; padding: 48px; display: flex; justify-content: space-between; align-items: center; gap: 34px; background: radial-gradient(circle at 85% 10%, rgba(24,212,255,.12), transparent 35%), radial-gradient(circle at 15% 95%, rgba(255,183,3,.1), transparent 36%), var(--bg-soft); box-shadow: var(--shadow); }
.cta-card > div:first-child > span { color: var(--amber); font-weight: 800; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.cta-card h2 { font-size: clamp(2rem, 4vw, 3.7rem); }
.cta-card p { max-width: 720px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; flex-shrink: 0; }

.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 64px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; }
.footer-grid > div { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.footer-grid strong { color: var(--text); }
.footer-grid a:not(.brand):hover { color: var(--amber); }
.footer-brand { margin-bottom: 10px; }
.footer-bottom { margin-top: 42px; padding-top: 20px; border-top: 1px solid var(--border); font-size: .78rem; }

.modal { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.72); backdrop-filter: blur(10px); opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease; }
.modal.open { opacity: 1; visibility: visible; }
.modal-panel { width: min(560px, 100%); max-height: min(760px, calc(100vh - 40px)); overflow-y: auto; position: relative; padding: 38px; border: 1px solid var(--border-strong); border-radius: 20px; background: var(--bg-soft); box-shadow: var(--shadow); transform: translateY(18px); transition: transform .25s ease; }
.modal.open .modal-panel { transform: translateY(0); }
.modal-close { position: absolute; right: 15px; top: 15px; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--text); font-size: 1.2rem; }
.modal-panel h2 { font-size: 2.2rem; margin-bottom: 12px; }
.modal-panel form { display: grid; gap: 14px; margin-top: 24px; }
.modal-panel label { display: grid; gap: 6px; color: var(--text); font-size: .82rem; font-weight: 700; }
.modal-panel input, .modal-panel textarea { width: 100%; border: 1px solid var(--border-strong); border-radius: 10px; padding: 12px 13px; background: var(--surface); color: var(--text); outline: none; }
.modal-panel input:focus, .modal-panel textarea:focus { border-color: var(--amber); }
.form-note { min-height: 22px; color: var(--green); font-size: .82rem; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .72s ease, transform .72s cubic-bezier(.2,.8,.2,1); }
.reveal.visible { opacity: 1; transform: none; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

@media (max-width: 1160px) {
  .main-nav { gap: 15px; }
  .main-nav a { font-size: .75rem; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 980px) {
  :root { --header-height: 66px; }
  .menu-button { display: block; }
  .btn-nav-cta { display: none; }
  .main-nav { position: fixed; top: var(--header-height); left: 16px; right: 16px; display: grid; gap: 0; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: color-mix(in srgb, var(--bg-soft) 96%, transparent); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .22s ease, visibility .22s ease, transform .22s ease; }
  .main-nav.open { opacity: 1; visibility: visible; transform: none; }
  .main-nav a { padding: 12px; border-radius: 8px; }
  .main-nav a::after { display: none; }
  .main-nav a:hover, .main-nav a.active { background: var(--surface-strong); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-lead { margin-inline: auto; }
  .hero-actions, .hero-badges { justify-content: center; }
  .model-card { max-width: 760px; margin: 0 auto; }
  .workflow-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-video { grid-template-columns: 1fr; }
  .featured-video .video-frame { min-height: 0; aspect-ratio: 16/9; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-tall { grid-row: span 1; }
  .gallery-model { grid-column: span 2; }
  .application-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-card { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 680px) {
  .page-shell { width: min(100% - 26px, 1240px); }
  .section { padding: 78px 0; }
  .nav-shell { width: calc(100% - 22px); gap: 12px; }
  .brand { font-size: 1.05rem; }
  .brand-mark { width: 31px; height: 31px; }
  .nav-actions .button-small { display: none; }
  .hero { padding-top: calc(var(--header-height) + 48px); }
  .hero h1 { font-size: clamp(2.8rem, 14vw, 4.8rem); }
  .model-viewport { height: 470px; }
  .hotspot { display: none; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-grid article:nth-child(3)::before { display: none; }
  .workflow-grid, .feature-grid, .video-grid, .application-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 270px; }
  .gallery-model { grid-column: auto; }
  .cta-card { padding: 30px 22px; }
  .cta-actions { width: 100%; }
  .cta-actions .button { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .modal-panel { padding: 30px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}