/* ČipiSolar — shared design system */

:root {
  --cloud: #fcfcf8;
  --ink: #17201a;
  --ink-soft: #4b564c;
  --gold: #fabe00;
  --gold-deep: #d99f00;
  --green: #0a8200;
  --green-deep: #086a00;
  --leaf: #3ca032;
  --pine: #0e2e12;
  --pine-soft: #163b1a;
  --sand: #f3efe2;
  --sand-line: #e4ddc9;
  --line: rgba(23, 32, 26, 0.1);

  --font-display: "Fraunces", "Iowan Old Style", serif;
  --font-headline: "Bodoni Moda", "Fraunces", serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --font-mono: "Manrope", "Segoe UI", sans-serif;

  --container: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--cloud);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}

.h1 {
  font-size: clamp(2.9rem, 5.8vw, 5.1rem);
  font-weight: 700;
  letter-spacing: -0.028em;
}

.h2 {
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  font-weight: 700;
}

.h3 {
  font-size: clamp(1.35rem, 2vw, 1.7rem);
}

p {
  margin: 0;
}

.eyebrow {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-deep);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1.5px;
  background: var(--gold);
}

.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 56ch;
}

.mono-stat {
  font-family: var(--font-mono);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cloud);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 28px;
  max-width: var(--container);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.brand-word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.32rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
}

.brand-word em {
  font-style: normal;
  color: var(--gold-deep);
}

.brand-word b {
  font-weight: 600;
  color: var(--green);
}

.brand-tag {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  text-transform: uppercase;
  margin-top: 1px;
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

nav.main-nav a {
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: 6px 0;
  transition: color 0.2s ease;
}

nav.main-nav a:hover,
nav.main-nav a:focus-visible {
  color: var(--green-deep);
}

nav.main-nav a.active {
  color: var(--ink);
}

nav.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.phone-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 500;
}

.phone-cta svg {
  color: var(--green);
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--ink);
}

a.nav-cta {
  display: none;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn-gold {
  background: var(--gold);
  color: #241a00;
  box-shadow: 0 1px 2px rgba(153, 108, 0, 0.25), 0 10px 24px -10px rgba(250, 190, 0, 0.65);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(153, 108, 0, 0.3), 0 16px 30px -10px rgba(250, 190, 0, 0.75);
}

.btn-gold:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 3px;
}

.btn-outline {
  background: transparent;
  color: var(--cloud);
  border-color: rgba(252, 252, 248, 0.4);
}

.btn-outline:hover {
  border-color: var(--cloud);
  transform: translateY(-2px);
}

.btn-outline:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.btn-ink {
  background: var(--ink);
  color: var(--cloud);
}

.btn-ink:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px -14px rgba(23, 32, 26, 0.55);
}

.btn-ink:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--green);
  color: var(--green-deep);
  background: rgba(10, 130, 0, 0.04);
  transform: translateY(-2px);
}

.btn-ghost:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 3px;
}

/* ---------- Section rhythm ---------- */

section {
  padding: 108px 0;
}

.section-tight {
  padding: 84px 0;
}

.section-dark {
  background: var(--pine);
  color: var(--cloud);
}

.section-dark .eyebrow {
  color: var(--gold);
}

.section-dark .eyebrow::before {
  background: var(--gold);
}

.section-dark h2,
.section-dark h3 {
  color: var(--cloud);
}

.section-dark .lede {
  color: rgba(252, 252, 248, 0.72);
}

.section-sand {
  background: var(--sand);
}

/* ---------- Arc divider (signature motif) ---------- */

.arc-divider {
  width: 100%;
  height: 64px;
  display: block;
  margin: 0;
}

.arc-divider path {
  stroke: var(--sand-line);
  stroke-width: 1.5;
  fill: none;
}

.arc-divider.on-dark path {
  stroke: rgba(252, 252, 248, 0.18);
}

.arc-divider .arc-sun {
  fill: var(--gold);
}

/* ---------- Cards ---------- */

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px;
  box-shadow: 0 1px 2px rgba(23, 32, 26, 0.04), 0 20px 40px -28px rgba(23, 32, 26, 0.25);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 1px 2px rgba(23, 32, 26, 0.06), 0 30px 50px -26px rgba(23, 32, 26, 0.32);
}

/* ---------- Footer ---------- */

footer.site-footer {
  background: var(--pine);
  color: rgba(252, 252, 248, 0.8);
  padding: 64px 0 28px;
}

footer.site-footer a {
  text-decoration: none;
  color: rgba(252, 252, 248, 0.8);
  transition: color 0.2s ease;
}

footer.site-footer a:hover {
  color: var(--gold);
}

footer.site-footer h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(252, 252, 248, 0.5);
  margin-bottom: 18px;
  font-weight: 500;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(252, 252, 248, 0.12);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14.5px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  font-size: 13px;
  color: rgba(252, 252, 248, 0.45);
  font-family: var(--font-mono);
}

.footer-bottom a {
  color: rgba(252, 252, 248, 0.55);
}

/* ---------- Reveal-on-scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  nav.main-nav {
    position: fixed;
    inset: 68px 0 0 0;
    z-index: 99;
    background: var(--cloud);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 28px;
    gap: 4px;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
  }

  nav.main-nav.is-open {
    transform: translateX(0);
  }

  nav.main-nav a {
    width: 100%;
    padding: 14px 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--line);
  }

  .header-actions .phone-cta span {
    display: none;
  }

  .header-actions > a.btn-gold {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  a.nav-cta {
    display: inline-flex;
    margin-top: 20px;
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
  }

  section {
    padding: 72px 0;
  }
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .wrap {
    padding: 0 20px;
  }
}
