/* eSolarEdge — shared styles for index, privacy and legal pages.
   Layout: federal-modern editorial. A full-bleed navy hero with oversized caps over a
   receding rooftop array, then white sections on one centered wrap, with ruled ledgers
   for terms. Deliberately single-theme: the brand colors are set for a light ground. */

:root {
  --ink: #0A1830;
  --ink-2: #3B4A5F;
  --muted: #64738A;
  --paper: #FFFFFF;
  --mist: #F1F4F8;
  --line: #DAE1EA;
  --navy: #061429;
  --navy-2: #0B2246;
  --blue: #0E5198;
  --sky: #3E99C6;
  --sky-soft: #8CC0E6;
  --green: #0FA867;
  --green-ink: #0A7448;
  --green-wash: #E3F5EC;
  --on-dark: #EEF2F7;
  --on-dark-2: #A9B8CC;
  --on-dark-line: rgba(238, 242, 247, .16);
  --flag-red: #B22234;
  --highlight: #FFF0B3;
  --shadow-card: 0 40px 80px -30px rgba(2, 8, 20, .65), 0 2px 6px rgba(2, 8, 20, .2);

  --font-sans: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --fs-mega: clamp(3.4rem, 13vw, 12.25rem);
  --fs-h1: clamp(2.6rem, 6vw, 4.75rem);
  --fs-h2: clamp(2.1rem, 4.4vw, 3.75rem);
  --fs-h3: 1.3rem;
  --fs-lede: clamp(1.125rem, 1.45vw, 1.3rem);
  --fs-body: 1.0625rem;
  --fs-small: .9rem;
  --fs-label: .75rem;

  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1240px;
  --header-h: 72px;
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
  background: var(--paper);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p, ul, ol, h1, h2, h3, h4, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Top strip ---------- */

.top-strip {
  background: var(--navy);
  color: var(--on-dark-2);
  font-size: .78rem;
  letter-spacing: .01em;
}
.top-strip .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  flex-wrap: wrap;
  padding-block: 8px;
}
.top-strip p { display: flex; align-items: center; gap: 10px; }
.top-strip strong { color: var(--on-dark); font-weight: 600; }
@media (max-width: 640px) {
  .top-strip p + p { display: none; }
}

.flag {
  flex: none;
  position: relative;
  width: 19px; height: 12px;
  border-radius: 1.5px;
  background: repeating-linear-gradient(180deg, var(--flag-red) 0 1.2px, #FFFFFF 1.2px 2.4px);
  box-shadow: 0 0 0 .5px rgba(255, 255, 255, .25);
}
.flag::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 8.5px; height: 6.6px;
  background: #3C3B6E;
  border-top-left-radius: 1.5px;
}

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

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}
.brand img { width: 42px; height: 42px; }
.wordmark {
  font-weight: 700;
  font-size: 1.32rem;
  letter-spacing: -.035em;
  line-height: 1;
}
.wordmark span { color: var(--blue); }

.site-nav { display: flex; gap: 4px; }
.site-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .2s, color .2s;
}
.site-nav a:hover { background: var(--mist); color: var(--ink); }

@media (max-width: 880px) {
  .site-nav { display: none; }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 1rem/1 var(--font-sans);
  letter-spacing: -.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .2s; }
.btn:hover svg { transform: translateX(3px); }
.btn-sm { min-height: 40px; padding: 10px 18px; font-size: .92rem; }

.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: var(--blue); }
.btn-light { background: var(--on-dark); color: var(--navy); }
.btn-light:hover { background: #FFFFFF; }
.btn-ghost-dark { border-color: var(--on-dark-line); color: var(--on-dark); background: transparent; }
.btn-ghost-dark:hover { border-color: var(--on-dark-2); }
.btn-outline { border-color: var(--line); color: var(--ink); background: var(--paper); }
.btn-outline:hover { border-color: var(--ink); }

/* ---------- Type helpers ---------- */

.eyebrow {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
}
.on-dark .eyebrow { color: var(--sky-soft); }

.h2 {
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -.04em;
}
.h2 em, .h1 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.012em;
  color: var(--blue);
}
.on-dark .h2 em { color: var(--sky-soft); }

.lede {
  font-size: var(--fs-lede);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 34em;
}

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

.site-footer {
  background: var(--navy);
  color: var(--on-dark-2);
  font-size: var(--fs-small);
}
.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding-block: 72px 56px;
}
.footer-brand { display: grid; gap: 20px; align-content: start; max-width: 26rem; }
.seal {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--on-dark);
  text-decoration: none;
}
.seal-disc {
  display: grid;
  place-items: center;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .08);
}
.seal-disc img { width: 50px; height: 50px; }
.seal .wordmark { font-size: 1.5rem; }
.seal .wordmark span { color: var(--sky-soft); }

.footer-col h2 {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--on-dark);
  margin-bottom: 16px;
}
.footer-col ul { display: grid; gap: 10px; }
.footer-col a { text-decoration: none; color: var(--on-dark-2); transition: color .2s; }
.footer-col a:hover { color: var(--on-dark); text-decoration: underline; text-underline-offset: 3px; }

.footer-base {
  border-top: 1px solid var(--on-dark-line);
}
.footer-base .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  padding-block: 22px;
  font-size: .82rem;
}

@media (max-width: 900px) {
  .footer-main { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-block: 56px 40px; }
}

/* ---------- Legal documents ---------- */

.doc-hero {
  background: var(--mist);
  border-bottom: 1px solid var(--line);
}
.doc-hero .wrap {
  display: grid;
  gap: 18px;
  padding-block: clamp(48px, 7vw, 88px) clamp(40px, 5vw, 64px);
}
.crumbs { display: flex; gap: 8px; font-size: var(--fs-small); color: var(--muted); }
.crumbs a { color: var(--ink-2); text-underline-offset: 3px; }
.h1 {
  font-size: var(--fs-h1);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.045em;
}
.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--muted);
}

.doc-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  padding-block: clamp(48px, 6vw, 80px) clamp(72px, 9vw, 120px);
}
.toc {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  align-self: start;
  font-size: var(--fs-small);
}
.toc h2 {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.toc ol { display: grid; gap: 2px; border-left: 1px solid var(--line); }
.toc a {
  display: block;
  padding: 6px 0 6px 16px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--ink-2);
  text-decoration: none;
  line-height: 1.35;
}
.toc a:hover { color: var(--ink); border-left-color: var(--blue); }

.doc {
  max-width: 44rem;
  min-width: 0;
  color: var(--ink-2);
}
.doc > * + * { margin-top: 1.1em; }
.doc .doc-intro {
  font-size: var(--fs-lede);
  line-height: 1.55;
  color: var(--ink);
}
.doc h2 {
  margin-top: 2.6em;
  padding-top: 1.4em;
  border-top: 1px solid var(--line);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.025em;
  color: var(--ink);
}
.doc h2 .num {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--blue);
}
.doc h3 {
  margin-top: 1.8em;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink);
}
.doc ul { display: grid; gap: .55em; padding-left: 1.25em; list-style: disc; }
.doc li::marker { color: var(--sky); }
.doc strong { color: var(--ink); font-weight: 600; }
.doc a { color: var(--blue); text-underline-offset: 3px; }
.doc .callout {
  padding: 20px 24px;
  background: var(--mist);
  border-radius: 12px;
  color: var(--ink);
}
.doc address { font-style: normal; line-height: 1.7; }
.fill {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--highlight);
  color: var(--ink);
  font-weight: 500;
}

@media (max-width: 860px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; padding: 20px 22px; background: var(--mist); border-radius: 14px; }
  .toc ol { border-left: 0; }
  .toc a { padding-left: 0; border-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
