/* =========================================================
   CNC Cutter promo — black + electric cyan theme
   ========================================================= */

:root {
  --bg:        #5D6B6B;   /* RGB 93, 107, 107 */
  --bg-2:      #31363A;
  --panel:     #363B40;
  --line:      #454B51;
  --text:      #EEF1F4;
  --muted:     #B7BFC7;
  --cyan:      #00E0FF;
  --cyan-dim:  #0B92A8;
  --cyan-glow: rgba(0, 224, 255, 0.35);
  --radius:    14px;
  --maxw:      1180px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 112.5%; } /* 18px base for readability */

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 420;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 { line-height: 1.1; margin: 0 0 .4em; font-weight: 700; letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; }
.accent { color: var(--cyan); }
em { font-style: normal; color: var(--cyan); }

.eyebrow {
  font-family: var(--mono);
  font-size: .82rem;
  letter-spacing: .24em;
  color: var(--cyan);
  margin: 0 0 1rem;
  text-transform: uppercase;
}

.lede { color: var(--muted); font-size: 1.18rem; line-height: 1.7; max-width: 62ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .25s ease, background .2s ease;
  cursor: pointer;
}
.btn-primary {
  background: var(--cyan);
  color: #04252B;
  box-shadow: 0 0 0 rgba(0,224,255,0);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -8px var(--cyan-glow);
}
.btn-ghost {
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  z-index: 50;
  background: linear-gradient(180deg, rgba(93,107,107,.9), rgba(93,107,107,0));
  backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; letter-spacing: .01em; }
.brand-mark {
  width: 18px; height: 18px; border-radius: 4px;
  background: var(--cyan);
  box-shadow: 0 0 14px var(--cyan-glow);
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 5px;
  background: var(--bg); border-radius: 1px;
}
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a { color: var(--muted); font-size: .92rem; transition: color .2s; }
.nav a:hover { color: var(--text); }
.nav .nav-cta {
  color: var(--cyan); border: 1px solid var(--cyan-dim);
  padding: .5rem 1rem; border-radius: 999px;
}
.nav .nav-cta:hover { background: rgba(0,224,255,.08); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); display: block; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 7rem clamp(1rem, 5vw, 3rem) 4rem;
  overflow: hidden; text-align: center;
}
.hero-inner { position: relative; z-index: 2; max-width: 920px; margin: 0 auto; }
.hero-title-wrap { position: relative; margin: 0 0 1.6rem; }
.hero-title {
  font-size: clamp(2.8rem, 8vw, 6rem);
  margin: 0;
}
.hero-underline { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-sub { color: var(--muted); font-size: 1.24rem; line-height: 1.65; max-width: 56ch; margin: 0 auto 2rem; }
.hero-sub strong { color: var(--text); }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.scroll-hint {
  position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%);
  width: 24px; height: 40px; border: 1px solid var(--line); border-radius: 14px; z-index: 2;
}
.scroll-hint span {
  position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px;
  background: var(--cyan); border-radius: 2px; animation: scroll 1.6s infinite;
}
@keyframes scroll { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 10vw, 8rem) clamp(1rem, 5vw, 3rem); max-width: var(--maxw); margin: 0 auto; }
.section-head { margin-bottom: 3rem; max-width: 720px; }
.section-head h2 { font-size: clamp(2rem, 5vw, 3.2rem); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Tool switcher ---------- */
.switcher { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); overflow: hidden; }
.switcher-tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tool-tab {
  flex: 1 1 auto; min-width: 140px;
  background: none; border: 0; border-right: 1px solid var(--line);
  color: var(--muted); padding: 1.1rem 1rem; cursor: pointer;
  font-size: .95rem; font-weight: 600; text-align: left;
  transition: color .2s, background .2s; position: relative;
}
.tool-tab:last-child { border-right: 0; }
.tool-tab .tool-num { font-family: var(--mono); font-size: .7rem; color: var(--cyan-dim); display: block; margin-bottom: .2rem; }
.tool-tab:hover { color: var(--text); background: rgba(255,255,255,.02); }
.tool-tab.is-active { color: var(--text); background: rgba(0,224,255,.06); }
.tool-tab.is-active::after {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
  background: var(--cyan); box-shadow: 0 0 12px var(--cyan-glow);
}
.switcher-stage { display: grid; grid-template-columns: 1.4fr 1fr; gap: 0; }
#toolCanvas { width: 100%; height: auto; display: block; background:
  radial-gradient(circle at 50% 40%, #333940 0%, #24282B 70%); border-right: 1px solid var(--line); }
.switcher-info { padding: 2rem clamp(1.2rem, 3vw, 2.4rem); }
.tool-title { font-size: 1.6rem; }
.tool-desc { color: var(--muted); font-size: 1.08rem; line-height: 1.6; }
.tool-facts { list-style: none; padding: 0; margin: 1.4rem 0 0; }
.tool-facts li {
  padding: .6rem 0 .6rem 1.5rem; position: relative; color: var(--text); font-size: 1.02rem;
  border-top: 1px solid var(--line);
}
.tool-facts li::before { content: "▸"; color: var(--cyan); position: absolute; left: 0; }

/* ---------- Materials ---------- */
.material-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.material-grid li { background: var(--bg-2); padding: 1.6rem 1.4rem; transition: background .2s; }
.material-grid li:hover { background: rgba(0,224,255,.06); }
.material-grid li span { font-weight: 600; }

/* ---------- Laser ---------- */
.laser { position: relative; overflow: hidden; }
.laser-scan { position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: linear-gradient(180deg, transparent, var(--cyan-glow), transparent);
  height: 120px; animation: scanline 6s linear infinite; }
@keyframes scanline { 0% { transform: translateY(-120px); } 100% { transform: translateY(120vh); } }
.laser-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 1.4rem; }
.laser-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; background: var(--bg-2); transition: border-color .2s, transform .2s; }
.laser-card:hover { border-color: var(--cyan-dim); transform: translateY(-4px); }
.laser-card h3 { color: var(--cyan); font-size: 1.3rem; }
.laser-card p { color: var(--muted); margin: 0; }

/* ---------- Specs ---------- */
.specs-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.spec-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.spec-table th, .spec-table td { text-align: left; padding: 1rem 1.4rem; border-bottom: 1px solid var(--line); }
.spec-table thead th { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); background: var(--bg-2); }
.spec-table tbody tr:hover { background: rgba(0,224,255,.04); }
.spec-table td:first-child { font-weight: 600; }
.spec-note { color: var(--muted); font-size: .82rem; padding: 0 1.4rem; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 1rem; }
.gallery-item { margin: 0; aspect-ratio: 4/3; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gallery-item .ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--cyan-dim); font-family: var(--mono); font-size: .8rem; letter-spacing: .1em;
  background: repeating-linear-gradient(45deg, #2c3134, #2c3134 10px, #333940 10px, #333940 20px); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.gallery-item:hover img { transform: scale(1.05); }

/* ---------- Contact (phone / email / social) ---------- */
.contact { max-width: 760px; text-align: center; }
.contact-inner h2 { font-size: clamp(2rem, 5vw, 3rem); }
.contact-inner .lede { margin-left: auto; margin-right: auto; }

.contact-methods { display: flex; flex-direction: column; gap: 1.3rem; align-items: center; margin: 2.6rem 0 1.8rem; }
.contact-line { display: inline-flex; align-items: center; gap: 1rem; font-size: clamp(1.5rem, 4vw, 2rem); color: var(--text); transition: color .2s; }
.contact-line svg { width: 32px; height: 32px; color: var(--cyan); flex: none; }
.contact-line strong { font-weight: 700; letter-spacing: .01em; }
.contact-line:hover { color: var(--cyan); }
/* email rendered as an obvious hyperlink */
.contact-line[href^="mailto"] span { color: var(--cyan); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.contact-line[href^="mailto"]:hover span { color: #fff; }

.social-row { display: flex; gap: 1rem; justify-content: center; margin: .4rem 0 1.8rem; }
.social-btn {
  width: 54px; height: 54px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%; color: var(--text);
  transition: color .2s, border-color .2s, background .2s, transform .2s;
}
.social-btn svg { width: 26px; height: 26px; }
.social-btn:hover { color: var(--cyan); border-color: var(--cyan); background: rgba(0,224,255,.08); transform: translateY(-3px); }

.contact-address { font-style: normal; color: var(--muted); }

/* ---------- Location map (Slovenia cut-out) ---------- */
.location { text-align: center; }
.location .section-head { margin-left: auto; margin-right: auto; }
.map-wrap { max-width: 700px; margin: 2.5rem auto 0; }
.si-map { width: 100%; height: auto; overflow: visible; }

/* the CNC-cut silhouette (path lives in a 0.1-scaled group) */
.si-glow { filter: drop-shadow(0 0 9px var(--cyan-glow)); }
.si-shape {
  fill: rgba(0, 224, 255, .05);
  stroke: var(--cyan);
  stroke-width: 25;            /* /10 by the 0.1 group scale → ~2.5px on screen */
  stroke-linejoin: round;
  stroke-dasharray: var(--len, 60000);
  stroke-dashoffset: var(--len, 60000);
}
/* the cut is driven by JS: a blade rides the outline (see app.js) */
#map-markers { opacity: 0; transition: opacity .7s ease; }
.si-blade { fill: #fff; }
.si-cutpt { fill: #eafeff; filter: drop-shadow(0 0 5px var(--cyan)); }
.si-spark { fill: var(--cyan); }
.city-dot { fill: var(--cyan); stroke: #04252b; stroke-width: 2; }
.city-label {
  fill: #e2e9ee; font-family: var(--mono); font-size: 25px; font-weight: 700;
  paint-order: stroke; stroke: var(--bg); stroke-width: 6px; stroke-linejoin: round;
}

/* red location pin (Hoče/Rogoza) */
.pin-body { fill: #ff3b30; }
.pin-head { fill: var(--bg); }
.pin-loc  { fill: #ff3b30; }
.pin-ring {
  fill: none; stroke: #ff3b30; stroke-width: 3;
  transform-box: fill-box; transform-origin: center;
  animation: pinPulse 2s ease-out infinite;
}
@keyframes pinPulse { 0% { transform: scale(1); opacity: .85; } 100% { transform: scale(5); opacity: 0; } }
.pin-label {
  fill: #ff6a60; font-family: var(--mono); font-size: 25px; font-weight: 700;
  paint-order: stroke; stroke: var(--bg); stroke-width: 6px; stroke-linejoin: round;
}
.pin-sub {
  fill: #e2e9ee; font-family: var(--mono); font-size: 21px; font-weight: 700;
  paint-order: stroke; stroke: var(--bg); stroke-width: 6px; stroke-linejoin: round;
}
@media (prefers-reduced-motion: reduce) {
  .si-shape { stroke-dashoffset: 0 !important; animation: none !important; }
  #map-markers { opacity: 1 !important; animation: none !important; }
  .pin-ring { animation: none !important; }
}

/* ---------- Footer ---------- */
.site-footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 3rem 1rem; border-top: 1px solid var(--line); }

/* ---------- Brand sub + language toggle ---------- */
.brand-sub { color: var(--muted); font-weight: 600; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang button, .lang a {
  background: none; border: 0; color: var(--muted); cursor: pointer; text-decoration: none;
  padding: .35rem .7rem; font-size: .8rem; font-weight: 700; font-family: var(--mono); letter-spacing: .05em;
  transition: color .2s, background .2s;
}
.lang .is-active { background: var(--cyan); color: #04252B; }
.lang a:not(.is-active):hover { color: var(--text); }

/* ---------- Intro ---------- */
.intro-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }

/* ---------- Why cards ---------- */
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.why-card { background: var(--bg-2); padding: 1.8rem 1.6rem; transition: background .2s; }
.why-card:hover { background: rgba(0,224,255,.05); }
.why-card h3 { font-size: 1.15rem; color: var(--cyan); }
.why-card p { color: var(--muted); margin: 0; font-size: 1.04rem; line-height: 1.55; }

/* ---------- Technologies ---------- */
.tech-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.tech-card { position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; background: var(--bg-2); transition: border-color .2s, transform .2s; }
.tech-card:hover { border-color: var(--cyan-dim); transform: translateY(-4px); }
.tech-card-wide { grid-column: 1 / -1; }
.tech-tag { font-family: var(--mono); font-size: .7rem; letter-spacing: .18em; color: var(--cyan); border: 1px solid var(--cyan-dim); border-radius: 999px; padding: .25rem .7rem; }
.tech-card h3 { margin-top: 1rem; font-size: 1.4rem; }
.tech-card > p { color: var(--muted); }
.spec-list { display: grid; gap: 0; margin: 1.4rem 0 0; }
.spec-list > div { display: grid; grid-template-columns: 180px 1fr; gap: 1rem; padding: .8rem 0; border-top: 1px solid var(--line); }
.spec-list dt { font-family: var(--mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan); margin: 0; }
.spec-list dd { margin: 0; color: var(--text); font-size: 1.05rem; }

/* ---------- Material categories ---------- */
.material-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 1.4rem; }
.material-cat { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; background: var(--bg-2); }
.material-cat h3 { font-size: 1.05rem; color: var(--cyan); margin-bottom: 1rem; }
.material-cat ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.material-cat li { font-size: .95rem; color: var(--text); background: rgba(0,224,255,.07); border: 1px solid rgba(0,224,255,.35); border-radius: 999px; padding: .4rem .95rem; transition: background .2s, border-color .2s; }
.material-cat li:hover { background: rgba(0,224,255,.16); border-color: var(--cyan); }

/* ---------- Industries ---------- */
.industry-tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .8rem; }
.industry-tags li { background: rgba(0,224,255,.07); border: 1px solid rgba(0,224,255,.35); border-radius: 999px; padding: .6rem 1.2rem; font-weight: 600; color: var(--text); transition: background .2s, border-color .2s; }
.industry-tags li:hover { background: rgba(0,224,255,.16); border-color: var(--cyan); }

/* ---------- Workflow ---------- */
.flow-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 1.4rem; counter-reset: step; }
.flow-step { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem 1.6rem; background: var(--bg-2); position: relative; }
.flow-step::before { content: ""; position: absolute; top: 0; left: 0; height: 3px; width: 40%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan-glow); }
.flow-step h3 { font-size: 1.1rem; color: var(--cyan); }
.flow-step p { color: var(--muted); margin: 0; font-size: 1.02rem; line-height: 1.55; }

/* ---------- FAQ accordion ---------- */
.faq-list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 0; }
.faq-q { width: 100%; background: var(--bg-2); border: 0; cursor: pointer; color: var(--text); text-align: left; padding: 1.3rem 1.6rem; font-size: 1.02rem; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 1rem; transition: background .2s; }
.faq-q:hover { background: rgba(0,224,255,.05); }
.faq-ic { color: var(--cyan); font-size: 1.4rem; line-height: 1; flex-shrink: 0; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { margin: 0; padding: 0 1.6rem 1.4rem; color: var(--muted); font-size: 1.05rem; line-height: 1.6; }

/* ---------- Files note ---------- */

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .intro-cols { grid-template-columns: 1fr; }
  .tech-grid { grid-template-columns: 1fr; }
  .spec-list > div { grid-template-columns: 1fr; gap: .2rem; }
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .nav.open { display: flex; position: fixed; top: 64px; right: 1rem; left: 1rem; flex-direction: column; gap: 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; align-items: flex-start; }
  .switcher-stage { grid-template-columns: 1fr; }
  #toolCanvas { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-hint span, .laser-scan { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
