/* ==========================================================================
   CNC one-pager — single stylesheet, no framework.
   Brand colors live in the variables below; swap them when the client's
   logo/colors arrive.
   ========================================================================== */

:root {
  /* Brand green sampled from brand/Meglic_logo_Color.png (#9FCC3A).
     The bright green fails WCAG contrast on white (1.9:1), so light
     sections use the darkened variant for text and icons (4.7:1). */
  --accent:       #9fcc3a;   /* on dark backgrounds and button fills */
  --accent-dark:  #55801c;   /* text/icons on light backgrounds */
  --ink:          #1c2026;   /* body text on light */
  --ink-soft:     #5b6470;
  --paper:        #ffffff;
  --paper-alt:    #f4f5f7;
  --dark:         #14181d;   /* dark sections */
  --dark-soft:    #1d232b;
  --on-dark:      #eceff3;
  --on-dark-soft: #9aa5b1;
  --line:         #e3e6ea;
  --line-dark:    #2b333d;

  --radius: 10px;
  --container: 1100px;
  --shadow: 0 10px 30px rgba(16, 20, 26, .10);
}

/* ---------- reset & base ---------- */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

img { max-width: 100%; display: block; }

h1, h2, h3 {
  line-height: 1.15;
  margin: 0 0 .6em;
  font-weight: 800;
  letter-spacing: -.015em;
}

h1 { font-size: clamp(1.8rem, 7.6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

a { color: var(--accent-dark); }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent-dark);
  color: #fff;
  padding: .6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* small uppercase label above headings */
.kicker {
  color: var(--accent-dark);
  font-weight: 700;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  margin-bottom: .5rem;
}
.section-dark .kicker { color: var(--accent); }

.section-intro {
  color: var(--ink-soft);
  max-width: 46rem;
  margin-bottom: 2rem;
}
.section-dark .section-intro { color: var(--on-dark-soft); }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  padding: .8rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #101408;
}
.btn-primary:hover { background: #aeda4a; }

.btn-ghost {
  color: var(--on-dark);
  border: 1px solid var(--line-dark);
}
.btn-ghost:hover { border-color: var(--on-dark-soft); }

/* ---------- header ----------
   Light header: the logo is black text on a transparent background,
   so it needs a light surface. */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.logo { display: flex; align-items: center; }
.logo img {
  height: 46px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
}
.site-nav a:hover { color: var(--ink); }

.site-nav .nav-cta {
  color: #101408;
  background: var(--accent);
  padding: .5rem 1rem;
  border-radius: calc(var(--radius) - 3px);
}
.site-nav .nav-cta:hover { background: #aeda4a; color: #101408; }

/* hamburger — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: .5rem;
  cursor: pointer;
}
.nav-toggle-bar {
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */

.hero {
  background:
    radial-gradient(60rem 30rem at 85% -10%, rgba(159, 204, 58, .14), transparent 60%),
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(255, 255, 255, .028) 79px 80px),
    var(--dark);
  color: var(--on-dark);
  padding: clamp(4rem, 10vw, 7.5rem) 0 0;
}

.hero-sub {
  color: var(--on-dark-soft);
  font-size: 1.15rem;
  max-width: 36rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 2rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin-top: clamp(3rem, 7vw, 5rem);
  padding-block: 1.6rem;
  border-top: 1px solid var(--line-dark);
}
.stat strong {
  display: block;
  font-size: 1.35rem;
  color: var(--accent);
  letter-spacing: -.01em;
}
.stat span { color: var(--on-dark-soft); font-size: .9rem; }

/* ---------- sections ---------- */

.section { padding: clamp(3.5rem, 8vw, 5.5rem) 0; }
.section-alt { background: var(--paper-alt); }
.section-dark {
  background: var(--dark);
  color: var(--on-dark);
}

/* ---------- service cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.2rem;
  margin-top: 2rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--paper);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.card-icon {
  width: 2.2rem;
  height: 2.2rem;
  color: var(--accent-dark);
  margin-bottom: .9rem;
}
.card p {
  color: var(--ink-soft);
  font-size: .95rem;
  margin: 0;
}

.materials {
  margin-top: 2.2rem;
  padding: 1.1rem 1.4rem;
  background: var(--paper-alt);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink-soft);
}

/* ---------- reasons ("Zakaj izbrati nas") ---------- */

.reasons {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.reasons li {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  padding: 1rem 1.2rem;
  background: var(--dark-soft);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  font-weight: 600;
}
.reasons svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  margin-top: .2rem;
  color: var(--accent);
}

/* ---------- machine table (unused for now — ready for a future
   "Strojni park" section once the client provides machine specs) ---------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .97rem;
  min-width: 540px;
}
th, td {
  text-align: left;
  padding: .85rem 1.2rem;
  border-bottom: 1px solid var(--line-dark);
}
tbody tr:last-child td { border-bottom: 0; }
th {
  background: var(--dark-soft);
  color: var(--on-dark-soft);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}
td { color: var(--on-dark); }
tbody tr:hover td { background: rgba(255, 255, 255, .025); }

.capabilities {
  list-style: none;
  padding: 0;
  margin: 1.6rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: .8rem 2.2rem;
  color: var(--on-dark-soft);
  font-size: .95rem;
}
.capabilities strong { color: var(--on-dark); }

/* ---------- gallery placeholders ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.2rem;
}

.gallery-item {
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  /* diagonal stripes = obviously a placeholder */
  background: repeating-linear-gradient(45deg, #eceef1 0 14px, #e2e5e9 14px 28px);
  border: 1px dashed #c7ccd3;
}
.gallery-item figcaption {
  color: var(--ink-soft);
  font-size: .85rem;
  font-weight: 600;
}

/* ---------- about ---------- */

.about {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 3rem;
  align-items: center;
}

.about-photo {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(45deg, #e8eaee 0 14px, #dde0e5 14px 28px);
  border: 1px dashed #c7ccd3;
  color: var(--ink-soft);
  font-size: .85rem;
  font-weight: 600;
}

/* ---------- contact ---------- */

.contact {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
}

.contact-info dl { margin: 0 0 1.8rem; }
.contact-info dl div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: .5rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--line-dark);
}
.contact-info dt {
  color: var(--on-dark-soft);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding-top: .1rem;
}
.contact-info dd { margin: 0; }
.contact-info dd a { color: var(--accent); text-decoration: none; }
.contact-info dd a:hover { text-decoration: underline; }

.contact-map {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(45deg, #1d232b 0 14px, #20262f 14px 28px);
  border: 1px dashed var(--line-dark);
  color: var(--on-dark-soft);
  font-size: .85rem;
  font-weight: 600;
}

/* ---------- footer ---------- */

.site-footer {
  background: #0e1216;
  color: var(--on-dark-soft);
  font-size: .85rem;
  padding: 1.8rem 0;
  text-align: center;
}
.site-footer p { margin: .25rem 0; }

/* ---------- scroll-reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
/* if JS is disabled or reduced motion, everything stays visible */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- mobile ---------- */

@media (max-width: 760px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: .5rem 1.25rem 1rem;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .8rem 0; }
  .site-nav .nav-cta {
    text-align: center;
    margin-top: .6rem;
  }

  .about,
  .contact { grid-template-columns: 1fr; gap: 1.8rem; }

  .hero-stats { gap: 1.4rem 2rem; }
}
