/* Solar Monitor, solarmonitor.ge */

@font-face { font-family: "FiraGO"; src: url("/fonts/firago-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "FiraGO"; src: url("/fonts/firago-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "FiraGO"; src: url("/fonts/firago-semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "FiraGO"; src: url("/fonts/firago-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --cell: #10244A;        /* silicon panel blue */
  --cell-deep: #0A1833;
  --cell-line: rgba(140, 175, 235, 0.09);
  --sun: #F5B324;
  --sun-soft: #FFE7AE;
  --leaf: #2E9B6A;
  --amber: #E0892B;
  --sky: #F1F4F8;
  --paper: #FFFFFF;
  --ink: #0F1B2E;
  --muted: #4F5E76;
  --rule: #D6DEE9;
  --on-cell: #E9EEF7;
  --on-cell-muted: #A9B7CF;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 10px;
  --font: "FiraGO", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--sky);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
img, svg { display: block; }
small { font-size: 0.62em; font-weight: 500; }

:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 4px; }
.contact :focus-visible { outline-color: var(--ink); }

.wrap { width: min(100%, var(--wrap)); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--sun); color: var(--ink); padding: 10px 14px; border-radius: 6px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 44px; padding: 0.6em 1.15em;
  border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s;
}
.ico { width: 1em; height: 1em; flex: none; }
.btn-sun, .btn-dash { background: var(--sun); color: var(--ink); }
.btn-sun:hover, .btn-dash:hover { background: var(--sun-soft); }
.btn-ghost { color: var(--on-cell); border-color: rgba(233, 238, 247, 0.35); }
.btn-ghost:hover { border-color: var(--on-cell); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--cell); }

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

.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--cell) 94%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(140, 175, 235, 0.14);
  color: var(--on-cell);
}
.top-row { display: flex; align-items: center; gap: 24px; min-height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 1.14rem; letter-spacing: -0.01em; white-space: nowrap; }
.brand .mark { width: 34px; height: 34px; }

.nav { display: flex; gap: 22px; margin-left: auto; font-size: 0.95rem; }
.nav a { text-decoration: none; color: var(--on-cell-muted); padding: 6px 0; }
.nav a:hover { color: var(--on-cell); }

.top-actions { display: flex; align-items: center; gap: 14px; }
.langs { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(233, 238, 247, 0.07); }
.lang-opt {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 34px; padding: 4px 10px; border-radius: 999px;
  font-size: 0.88rem; font-weight: 500; line-height: 1; text-decoration: none;
  color: var(--on-cell-muted);
}
a.lang-opt:hover { color: var(--on-cell); background: rgba(233, 238, 247, 0.08); }
.lang-opt.is-current { color: var(--on-cell); background: rgba(233, 238, 247, 0.16); }
.flag { display: inline-flex; width: 21px; height: 14px; border-radius: 3px; overflow: hidden; flex: none; box-shadow: 0 0 0 1px rgba(233, 238, 247, 0.25); }
.flag svg { width: 100%; height: 100%; }
.btn-dash { min-height: 40px; padding: 0.5em 1em; font-size: 0.95rem; }

@media (max-width: 960px) {
  .nav { display: none; }
  .top-actions { margin-left: auto; }
}
/* Georgian menu labels are longer, so the menu gives way sooner. */
@media (max-width: 1180px) {
  .lang-ka .nav { display: none; }
  .lang-ka .top-actions { margin-left: auto; }
}
@media (max-width: 480px) {
  .brand span { font-size: 1.02rem; }
  .brand .mark { width: 30px; height: 30px; }
  .lang-code { display: none; }
  .lang-opt { padding: 4px 7px; }
  .btn-dash { padding: 0.5em 0.85em; }
  .btn-dash .ico { display: none; }
  .top-actions { gap: 8px; }
  .top-row { gap: 10px; }
}
@media (max-width: 360px) { .brand span { display: none; } }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  color: var(--on-cell);
  background-color: var(--cell);
  background-image:
    linear-gradient(to bottom, transparent 55%, var(--cell-deep)),
    linear-gradient(var(--cell-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--cell-line) 1px, transparent 1px);
  background-size: 100% 100%, 72px 72px, 72px 72px;
  background-position: 0 0, -1px -1px, -1px -1px;
  padding: clamp(40px, 7vw, 88px) 0 clamp(36px, 5vw, 64px);
  overflow: hidden;
}

.hero h1 {
  font-size: clamp(2.3rem, 4.6vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: -0.028em;
  max-width: 15ch;
}
.lang-ka .hero h1 { font-size: clamp(1.9rem, 3.6vw, 3.2rem); line-height: 1.16; letter-spacing: -0.01em; max-width: 19ch; }

.lead { margin-top: 22px; max-width: 58ch; font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--on-cell-muted); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-chart { min-width: 0; }
@media (max-width: 1060px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-chart { margin-top: 16px; }
}

.day { margin: 0; }
.day-plot { position: relative; aspect-ratio: 1200 / 760; margin-top: 36px; }
@media (max-width: 1060px) { .day-plot { aspect-ratio: 1200 / 420; } }
@media (max-width: 700px) { .day-plot { aspect-ratio: 1200 / 640; } }
.day-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

.day-base { stroke: rgba(233, 238, 247, 0.28); stroke-width: 1; }
.day-future { fill: none; stroke: rgba(245, 179, 36, 0.45); stroke-width: 2; stroke-dasharray: 2 6; stroke-linecap: round; }
.day-area { fill: url(#fillSun); }
.day-past { fill: none; stroke: var(--sun); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.day-now { stroke: rgba(245, 179, 36, 0.5); stroke-width: 1; stroke-dasharray: 3 4; }

.sun {
  position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px;
  border-radius: 50%; background: var(--sun);
  box-shadow: 0 0 0 6px rgba(245, 179, 36, 0.22), 0 0 42px 12px rgba(245, 179, 36, 0.45);
}
.sun.is-night { background: #C9D4E8; box-shadow: 0 0 0 5px rgba(201, 212, 232, 0.16); }
.sun-time {
  position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%);
  font-size: 0.85rem; font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--ink); background: var(--sun); padding: 2px 8px; border-radius: 6px; white-space: nowrap;
}
.sun.is-night .sun-time { background: #C9D4E8; }
.sun.edge-l .sun-time { left: -4px; transform: none; }
.sun.edge-r .sun-time { left: auto; right: -4px; transform: none; }

.day-hours { position: relative; height: 26px; margin-top: 8px; font-size: 0.78rem; color: var(--on-cell-muted); font-variant-numeric: tabular-nums; }
.day-hours span { position: absolute; transform: translateX(-50%); }
@media (max-width: 560px) { .day-hours span:nth-child(even) { display: none; } }

.readout {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 40px;
  margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(233, 238, 247, 0.14);
}
.readout-title { flex: 1 1 100%; font-size: 0.92rem; color: var(--on-cell-muted); }
.readout dl { display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 0; }
.readout dt { font-size: 0.82rem; color: var(--on-cell-muted); }
.readout dd { margin: 0; font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; color: var(--paper); }
.readout dd small { color: var(--on-cell-muted); }
.readout-night { flex-basis: 100%; font-size: 0.92rem; color: var(--sun-soft); }

/* One load moment: today's curve traces in, then the sun appears. */
@media (prefers-reduced-motion: no-preference) {
  .day.is-live .day-past { stroke-dasharray: 1; animation: trace 1.8s cubic-bezier(.4, 0, .2, 1) both; }
  .day.is-live .day-area { animation: fade 1.2s .7s both; }
  .day.is-live .sun { animation: rise .6s 1.5s cubic-bezier(.3, 1.4, .5, 1) both; }
}
@keyframes trace { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: scale(.3); } }

/* ---------- Sections ---------- */

.section { padding: clamp(64px, 9vw, 120px) 0; }
.section h2 { font-size: clamp(1.75rem, 3.2vw, 2.6rem); line-height: 1.12; letter-spacing: -0.02em; max-width: 22ch; }
.lang-ka .section h2 { font-size: clamp(1.5rem, 2.7vw, 2.2rem); line-height: 1.25; letter-spacing: 0; }
.section-lead { margin-top: 16px; color: var(--muted); max-width: 52ch; font-size: 1.1rem; }

/* Steps: a real sequence, so it is numbered. */
.how { background: var(--paper); }
.steps {
  list-style: none; margin: 48px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px;
  counter-reset: step;
}
.steps li { position: relative; counter-increment: step; padding-top: 72px; }
.steps li::before {
  content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--cell); color: var(--sun);
  font-weight: 700; font-size: 1.2rem;
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; top: 24px; left: 64px; right: -24px;
  border-top: 2px dashed var(--rule);
}
.steps h3 { font-size: 1.25rem; line-height: 1.3; }
.steps p { margin-top: 10px; color: var(--muted); max-width: 36ch; }
@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr; gap: 36px; }
  .steps li { padding: 0 0 0 72px; min-height: 48px; }
  .steps li:not(:last-child)::after { top: 60px; bottom: -28px; left: 23px; right: auto; border-top: 0; border-left: 2px dashed var(--rule); }
}

/* Features + dashboard mock */
.features-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(40px, 6vw, 80px); align-items: start; }
@media (max-width: 980px) { .features-grid { grid-template-columns: 1fr; } }

.feature-list { margin: 40px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.feature-list div { padding: 18px 0 20px; border-top: 1px solid var(--rule); }
.feature-list dt { font-weight: 600; line-height: 1.35; }
.feature-list dd { margin: 6px 0 0; color: var(--muted); font-size: 0.97rem; }
@media (max-width: 560px) { .feature-list { grid-template-columns: 1fr; } }

.mock {
  margin: 0; position: sticky; top: 100px;
  background: var(--paper); border-radius: 14px;
  box-shadow: 0 1px 0 var(--rule), 0 24px 60px -24px rgba(16, 36, 74, 0.35);
  overflow: hidden; font-size: 0.92rem;
}
@media (max-width: 980px) { .mock { position: static; } }
.mock-bar { background: var(--cell); color: var(--on-cell-muted); padding: 10px 18px; font-size: 0.8rem; }
.mock-body { padding: 20px 22px 24px; display: grid; gap: 22px; }
.mock-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.mock-plant { font-weight: 600; font-size: 1.1rem; }
.mock-plant span { font-weight: 400; color: var(--muted); margin-left: 6px; font-size: 0.95rem; }
.status { font-size: 0.82rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.status-warn { background: #FCEBD6; color: #8A4A07; }

.mock-kpis { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mock-kpis div { background: var(--sky); border-radius: 8px; padding: 12px 14px; }
.mock-kpis dt { font-size: 0.78rem; color: var(--muted); line-height: 1.3; }
.mock-kpis dd { margin: 4px 0 0; font-size: 1.45rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.mock-kpis dd small { color: var(--muted); }
@media (max-width: 440px) { .mock-kpis dd { font-size: 1.15rem; } .mock-body { padding: 16px; } }

.mock-label { font-size: 0.78rem; color: var(--muted); margin-bottom: 8px; }
.bars { width: 100%; height: 120px; }
.bar { fill: var(--cell); }
.bar-today { fill: var(--sun); }
.bar-empty { fill: var(--rule); }

.mock-cols { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; }
@media (max-width: 520px) { .mock-cols { grid-template-columns: 1fr; } }
.alerts, .plants { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.alerts li { padding: 8px 10px 8px 12px; border-left: 3px solid; border-radius: 4px; line-height: 1.4; font-size: 0.86rem; }
.alerts .warn { border-color: var(--amber); background: #FDF3E7; }
.alerts .ok { border-color: var(--leaf); background: #EAF6F0; }
.plants li { display: flex; align-items: center; gap: 8px; font-size: 0.86rem; padding: 4px 0; border-bottom: 1px solid var(--sky); }
.p-name { flex: 1; }
.p-cap { color: var(--muted); font-variant-numeric: tabular-nums; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot-ok { background: var(--leaf); }
.dot-warn { background: var(--amber); }

/* Who it's for */
.who { background: var(--paper); }
.who-list { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 56px); }
.who-list svg { width: 120px; height: 80px; color: var(--cell); margin-bottom: 20px; }
.who-list h3 { font-size: 1.3rem; }
.who-list p { margin-top: 8px; color: var(--muted); max-width: 38ch; }
@media (max-width: 820px) { .who-list { grid-template-columns: 1fr; } }

/* Inverters */
.inverters { padding: clamp(48px, 7vw, 88px) 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.inverters h2 { font-size: clamp(1.25rem, 2vw, 1.55rem); max-width: none; }
.lang-ka .inverters h2 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); }
.brands-wrap { margin-top: 30px; }
.brands { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 24px 56px; }
.brands li { display: flex; align-items: center; height: 64px; flex: none; }
.brands img { display: block; }

/* When the names don't fit on one line, they scroll right to left. */
.brands-wrap.is-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.brands-wrap.is-marquee .brands { flex-wrap: nowrap; width: max-content; animation: marquee var(--marquee-time, 30s) linear infinite; }
.brands-wrap.is-marquee:hover .brands { animation-play-state: paused; }
.brands-wrap.is-marquee .brands li { padding-right: 56px; }
.brands-wrap.is-marquee .brands { gap: 0; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .brands-wrap.is-marquee { overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .brands-wrap.is-marquee .brands { flex-wrap: wrap; width: auto; animation: none; gap: 24px 56px; }
  .brands-wrap.is-marquee .brands li { padding-right: 0; }
  .brands-wrap.is-marquee .brands > li[aria-hidden] { display: none; }
}
.note { margin-top: 22px; color: var(--muted); }

/* FAQ */
.faq-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px; }
@media (max-width: 820px) { .faq-wrap { grid-template-columns: 1fr; gap: 24px; } }
.faq-list details { border-top: 1px solid var(--rule); }
.faq-list details:last-child { border-bottom: 1px solid var(--rule); }
.faq-list summary {
  list-style: none; cursor: pointer; padding: 20px 44px 20px 0; position: relative;
  font-weight: 600; font-size: 1.1rem; line-height: 1.4;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 12px; height: 12px; margin-top: -9px;
  border-right: 2px solid var(--cell); border-bottom: 2px solid var(--cell); transform: rotate(45deg);
  transition: transform .2s;
}
.faq-list details[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.faq-list details p { padding: 0 44px 22px 0; color: var(--muted); max-width: 64ch; }
@media (prefers-reduced-motion: reduce) { .faq-list summary::after { transition: none; } }

/* Contact */
.contact { background: var(--sun); color: var(--ink); padding: clamp(56px, 8vw, 96px) 0; }
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px 64px; align-items: end; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; align-items: start; } }
.contact h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); line-height: 1.1; letter-spacing: -0.02em; }
.lang-ka .contact h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.25; letter-spacing: 0; }
.contact-grid > div > p { margin-top: 14px; max-width: 50ch; font-size: 1.1rem; }
.contact-actions { display: grid; justify-items: start; gap: 12px; }
.email { font-weight: 600; font-size: 1.1rem; text-underline-offset: 4px; }
.already { font-size: 0.97rem; }
.already a { font-weight: 600; text-underline-offset: 3px; }

/* Footer */
.foot { background: var(--cell-deep); color: var(--on-cell-muted); padding: 32px 0; font-size: 0.92rem; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; }
.brand-small { color: var(--on-cell); font-size: 1rem; }
.brand-small .mark { width: 26px; height: 26px; }
.foot .langs { margin-left: auto; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--on-cell); text-decoration: underline; }
@media (max-width: 700px) { .foot .langs { margin-left: 0; } }

/* 404 */
.missing { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; padding: 24px; }
.mark-big { width: 72px; height: 72px; margin-bottom: 8px; }
.missing h1 { font-size: 2rem; }
.missing p { color: var(--muted); }
