/* ==========================================================================
   SOLAR EPITOME — design tokens
   Black-and-white base, with the logo's pink used sparingly as the one
   accent — on tags, links, buttons and the cell busbar lines.
   ========================================================================== */

:root {
  /* surfaces — true black / white / grays */
  --bg:        #ffffff;
  --surface:   #f6f6f6;
  --surface-2: #eeeeee;
  --line:      #dcdcdc;
  --line-soft: rgba(0,0,0,0.06);

  /* ink */
  --ink:       #0d0d0d;
  --ink-dim:   #52525b;
  --ink-faint: #8a8a8f;

  /* accent — logo pink, used sparingly */
  --pink:        #d63384;
  --pink-bright: #e857a3;
  --pink-soft:   #f4c9de;
  /* legacy aliases kept so component rules below stay in sync */
  --cell:        var(--ink);
  --cell-bright: var(--pink);
  --copper:      var(--pink);
  --copper-bright: var(--pink-bright);
  --aluminium:   #8a8a8f;
  --logo-pink:   var(--pink-bright);

  /* type — Avenir / TT Commons Pro aren't freely webfont-licensed, so
     General Sans (Fontshare) stands in: same geometric-grotesque family
     feel, clean and versatile for both display and body. */
  --font-display: 'General Sans', 'Avenir Next', 'Segoe UI', sans-serif;
  --font-body: 'General Sans', 'Avenir Next', 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --radius: 3px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* subtle busbar-line grain across the whole page, evoking the fine
   metallic fingers printed on a cell surface */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: repeating-linear-gradient(
    90deg,
    var(--line-soft) 0px,
    var(--line-soft) 1px,
    transparent 1px,
    transparent 96px
  );
  opacity: 0.5;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); line-height: 1.05; }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.15; }
h3 { font-size: 1.25rem; }

p { margin: 0; color: var(--ink-dim); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper-bright);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--copper-bright);
  display: inline-block;
}

section { position: relative; z-index: 1; padding: 96px 0; }
section + section { border-top: 1px solid var(--line); }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  max-width: var(--container);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.brand .mark { width: 30px; height: 30px; flex-shrink: 0; }
.brand .mark circle { fill: var(--logo-pink); }
.brand .word { display: flex; flex-direction: column; line-height: 1.05; }
.brand .word small {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  gap: 34px;
  font-size: 0.9rem;
  color: var(--ink-dim);
}
.nav-links a { position: relative; padding: 4px 0; transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--cell-bright); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--copper);
}

.nav-cta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  border: 1px solid var(--line);
  padding: 9px 18px;
  border-radius: var(--radius);
  color: var(--ink);
  transition: border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.nav-cta:hover { border-color: var(--copper); color: var(--copper-bright); }

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

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 20px 32px;
    gap: 18px;
  }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  padding: 13px 24px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-primary { background: var(--pink); color: #ffffff; font-weight: 600; }
.btn-primary:hover { background: var(--pink-bright); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--cell-bright); color: var(--cell-bright); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- hero ---------- */
.hero {
  padding: 88px 0 72px;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.hero p.lede {
  margin-top: 22px;
  font-size: 1.08rem;
  max-width: 46ch;
  color: var(--ink-dim);
}
.hero h1 { margin-top: 18px; }
.hero .btn-row { margin-top: 34px; }

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
}

/* ---------- spec strip ---------- */
.spec-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.spec-strip div {
  padding: 26px 28px;
  border-left: 1px solid var(--line);
}
.spec-strip div:first-child { border-left: none; }
.spec-strip .num {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  color: var(--cell-bright);
  display: block;
}
.spec-strip .label {
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-top: 4px;
  display: block;
}
@media (max-width: 760px) {
  .spec-strip { grid-template-columns: repeat(2, 1fr); }
  .spec-strip div:nth-child(3) { border-left: none; }
}

/* ---------- section heading pattern ---------- */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.section-head h2 { max-width: 20ch; }
.section-head p { max-width: 38ch; }

/* ---------- product grid ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  padding: 32px;
  transition: background 0.2s;
}
.card:hover { background: var(--surface-2); }
.card.has-photo { padding: 0; }
.card.has-photo .card-body { padding: 28px 32px 32px; }
.card .tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--copper-bright);
}
.card h3 { margin-top: 14px; }
.card p { margin-top: 10px; font-size: 0.93rem; }
.card .spec {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
}

/* ---------- exploded module diagram (signature element) ---------- */
.module-diagram {
  position: relative;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.module-diagram .stack { position: relative; width: 240px; height: 300px; }
.layer {
  position: absolute;
  left: 0; right: 0;
  border-radius: 4px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 32px -18px rgba(0,0,0,0.25);
  transition: transform 0.4s ease;
}
.layer .layer-label {
  position: absolute;
  left: calc(100% + 16px);
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-faint);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.layer .layer-label::before { content: ""; width: 14px; height: 1px; background: var(--line); }

.layer-glass { top: 0; height: 70px; background: linear-gradient(135deg, rgba(0,0,0,0.05), rgba(0,0,0,0.01)); }
.layer-cell  { top: 62px; height: 70px; background: repeating-linear-gradient(90deg, #17171a 0 26px, var(--pink) 26px 28px); }
.layer-back  { top: 124px; height: 70px; background: var(--surface-2); }
.layer-frame { top: 186px; height: 70px; background: linear-gradient(135deg, rgba(214,51,132,0.16), rgba(214,51,132,0.04)); border-color: var(--pink); }

.module-diagram:hover .layer-glass { transform: translateY(-14px); }
.module-diagram:hover .layer-frame { transform: translateY(14px); }

@media (max-width: 900px) {
  .module-diagram { height: 320px; }
  .layer .layer-label { font-size: 0.62rem; left: calc(100% + 10px); }
}

/* ---------- feature list (why us) ---------- */
.feature {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 24px;
  padding: 34px 0;
}
.feature + .feature { border-top: 1px solid var(--line); }
.feature .fmark { font-family: var(--font-mono); color: var(--ink-faint); font-size: 0.8rem; }
.feature h3 { margin-bottom: 8px; }
.feature p { max-width: 62ch; }
@media (max-width: 640px) { .feature { grid-template-columns: 1fr; } }

/* ---------- credentials block ---------- */
.credentials {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.credentials div { background: var(--surface); padding: 20px 26px; }
.credentials .k { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; color: var(--ink-faint); text-transform: uppercase; }
.credentials .v { margin-top: 6px; font-size: 0.95rem; color: var(--ink); }
@media (max-width: 640px) { .credentials { grid-template-columns: 1fr; } }

/* ---------- forms ---------- */
.form-shell {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 40px;
  border-radius: var(--radius);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-row.full { grid-template-columns: 1fr; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

.field { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.field input, .field select, .field textarea {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--cell-bright);
}
.checklist {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 20px;
  margin-top: 12px;
}
@media (max-width: 640px) { .checklist { grid-template-columns: 1fr; } }
.checklist label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--ink-dim);
  text-transform: none;
  font-family: var(--font-body);
  letter-spacing: 0;
}
.checklist input { accent-color: var(--copper); width: 16px; height: 16px; }

.form-note { margin-top: 18px; font-size: 0.82rem; color: var(--ink-faint); }
.form-success {
  display: none;
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid var(--pink);
  background: rgba(214,51,132,0.06);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--pink);
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.cta-band h2 { max-width: 24ch; }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 40px;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 18px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-grid a, .footer-grid p { font-size: 0.9rem; color: var(--ink-dim); }
.footer-grid a:hover { color: var(--ink); }
.footer-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--ink-faint);
  font-family: var(--font-mono);
}

/* ---------- product photography ---------- */
.card-photo {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08);
  transition: filter 0.5s ease, transform 0.5s ease;
  display: block;
}
.card:hover .card-photo img {
  filter: grayscale(0);
  transform: scale(1.03);
}

/* full-bleed photography band with dark overlay */
.field-band {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: flex-end;
  background: #0d0d0d;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.field-band img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.55) contrast(1.1);
  opacity: 0.75;
}
.field-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.15) 60%);
}
.field-band .container { position: relative; z-index: 1; padding-bottom: 56px; padding-top: 56px; }
.field-band .eyebrow { color: var(--pink-bright); }
.field-band h2 { color: #ffffff; max-width: 26ch; }
.field-band p { color: rgba(255,255,255,0.72); max-width: 50ch; margin-top: 14px; }

/* supporting photo used beside a section head */
.supporting-photo {
  border: 1px solid var(--line);
  overflow: hidden;
  aspect-ratio: 3 / 4;
}
.supporting-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.85) contrast(1.1);
  transition: filter 0.5s ease;
}
.supporting-photo:hover img { filter: grayscale(0.15); }

/* photography strip for inner-page headers */
.header-photo {
  margin-top: 40px;
  border: 1px solid var(--line);
  overflow: hidden;
  aspect-ratio: 21 / 8;
}
.header-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.7) contrast(1.1);
}
@media (max-width: 760px) { .header-photo { aspect-ratio: 4 / 3; } }

/* ---------- top flags bar ---------- */
.top-bar {
  background: #0d0d0d;
  border-bottom: 1px solid var(--line);
}
.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 9px 32px;
  flex-wrap: wrap;
}
.top-bar-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.flag-group { display: flex; align-items: center; gap: 16px; }
.flag-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.02em;
}
.flag-item svg { width: 20px; height: 14px; border-radius: 2px; flex-shrink: 0; box-shadow: 0 0 0 1px rgba(255,255,255,0.15); }

/* ---------- clients ---------- */
.client-group + .client-group { margin-top: 40px; }
.client-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 16px;
}
.client-group-head svg { width: 22px; height: 15px; border-radius: 2px; box-shadow: 0 0 0 1px var(--line); }
.client-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.client-card {
  background: var(--surface);
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.2s, color 0.2s;
}
.client-card:hover { background: var(--surface-2); color: var(--pink); }
@media (max-width: 860px) { .client-grid { grid-template-columns: repeat(2, 1fr); } }

/* page-header used on inner pages */
.page-header {
  padding: 64px 0 48px;
}
.page-header .eyebrow { margin-bottom: 18px; }
.page-header p.lede { margin-top: 18px; max-width: 56ch; font-size: 1.05rem; }
