/* =========================================================
   NEXIL GLASS — editorial architectural
   ========================================================= */

:root {
  /* palette */
  --paper:        #F6F4EF;
  --paper-warm:   #EDE8DE;
  --ink:          #17233D;
  --ink-body:     #4F4D48;
  --ink-muted:    #6F6C64;
  --ink-faint:    #8B8880;
  --hair:         #DAD4C6;
  --hair-warm:    #D2CCBC;
  --green:        #4E9E1F;

  --night:        #0F1A2E;
  --night-deep:   #0B1424;
  --night-text:   #F3F0E8;
  --night-body:   #93A0B8;
  --night-muted:  #7E8DA8;
  --night-line:   #28374F;
  --lime:         #7BC043;

  /* layout */
  --maxw: 1440px;
  --gutter: clamp(20px, 6.6vw, 96px);
  --edge: max(var(--gutter), calc((100vw - var(--maxw)) / 2));

  /* type */
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans:  "Archivo", -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono:  "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

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

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0; }
ul, ol, dl, dd, figure { margin: 0; padding: 0; }
li { list-style: none; }

::selection { background: var(--ink); color: var(--paper); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper);
  padding: 12px 20px; font-family: var(--mono); font-size: 12px;
}
.skip:focus { left: 12px; top: 12px; }

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

/* ---------------------------------------------------------
   Shared bits
   --------------------------------------------------------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow-green { color: var(--green); }
.eyebrow-lime  { color: var(--lime); }

.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); flex: none;
}

.rule { display: block; height: 1px; background: var(--hair); width: 100%; }
.rule-dark   { background: var(--night-line); }
.rule-footer { background: #29313F; }

.arrow {
  width: 14px; height: 14px; flex: none;
  background: currentColor;
  color: #A8A399;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8h10.5M9 3.8l4.2 4.2L9 12.2' stroke='black' stroke-width='1.3' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8h10.5M9 3.8l4.2 4.2L9 12.2' stroke='black' stroke-width='1.3' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  letter-spacing: .015em;
  padding: 15px 26px;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .22s ease, color .22s ease, border-color .22s ease;
  white-space: nowrap;
}
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: #24345A; }
.btn-outline {
  border-color: var(--ink); color: var(--ink);
  padding: 11px 20px; font-size: 12px; letter-spacing: .03em;
}
.btn-outline:hover { background: var(--ink); color: var(--paper); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; color: var(--ink);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color .22s ease;
}
.link-arrow .arrow { color: var(--ink); transition: transform .22s ease; }
.link-arrow:hover { border-color: var(--ink); }
.link-arrow:hover .arrow { transform: translateX(3px); }

/* ---------------------------------------------------------
   Header
   --------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--hair);
  transition: background-color .25s ease, box-shadow .25s ease;
}
.site-header.is-scrolled {
  background: rgba(246, 244, 239, .92);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
          backdrop-filter: saturate(160%) blur(14px);
}

.header-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  min-height: 88px;
  padding-inline: var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px;
}

.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark { width: 26px; height: 26px; flex: none; }
.logo-word {
  font-family: var(--sans); font-size: 15px; font-weight: 700;
  letter-spacing: .12em; color: var(--ink);
  display: inline-flex; gap: .18em;
}
.logo-word-accent { color: var(--green); }

.nav { display: flex; align-items: center; gap: 38px; }
.nav a {
  font-size: 13px; color: #3A4055;
  position: relative; padding-block: 4px;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: left;
  transition: transform .28s cubic-bezier(.2,.7,.2,1);
}
.nav a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px; margin-right: -10px;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 6px;
}
.nav-toggle span {
  display: block; width: 22px; height: 1px; background: var(--ink);
  transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child  { transform: translateY(-3.5px) rotate(-45deg); }

.mobile-nav {
  border-top: 1px solid var(--hair);
  padding: 8px var(--gutter) 24px;
  display: flex; flex-direction: column; gap: 2px;
}
.mobile-nav a:not(.btn) {
  padding: 14px 0;
  font-size: 16px;
  border-bottom: 1px solid var(--hair);
}
.mobile-nav .btn { margin-top: 18px; align-self: flex-start; }

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(340px, 44%, 640px);
  padding-left: var(--edge);
  min-height: min(772px, calc(100vh - 89px));
}

.hero-copy {
  display: flex; flex-direction: column; justify-content: center;
  gap: 24px;
  padding: 64px 60px 64px 0;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(40px, 5.2vw, 76px);
  line-height: 1.04;
  letter-spacing: -.017em;
  color: var(--ink);
  max-width: 100%;
  text-wrap: balance;
}

.lede {
  font-size: 15px; line-height: 1.75;
  color: var(--ink-body);
  max-width: 430px;
}

.hero-actions {
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
  margin-top: 4px;
}

.trust { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; max-width: 470px; }
.trust p {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em;
  color: var(--ink-faint); text-transform: uppercase;
}

.hero-media { position: relative; overflow: hidden; background: var(--paper-warm); }
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}

/* ---------------------------------------------------------
   Generic section
   --------------------------------------------------------- */
.section {
  padding: clamp(72px, 8.6vw, 124px) var(--edge);
}
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: clamp(32px, 5.5vw, 80px);
  padding-bottom: 52px;
}
.section-head > div { flex: 1 1 auto; }
.section h2 {
  font-family: var(--serif);
  font-size: clamp(34px, 3.9vw, 54px);
  line-height: 1.1;
  letter-spacing: -.015em;
  margin-top: 18px;
  max-width: 100%;
  text-wrap: balance;
}
.section h2.h2-sm { font-size: clamp(30px, 3.3vw, 46px); }
.section h2.h2-lg { font-size: clamp(34px, 4.2vw, 58px); max-width: 20ch; }

.section-intro {
  font-size: 13.5px; line-height: 1.78;
  color: var(--ink-muted);
  max-width: 400px;
  flex: 0 0 auto;
}

/* ---------------------------------------------------------
   Capabilities
   --------------------------------------------------------- */
.cap-row {
  display: grid;
  grid-template-columns: 34px minmax(150px, 300px) minmax(130px, 200px) minmax(0, 1fr) 14px;
  gap: 24px;
  align-items: center;
  padding: 26px 0;
  border-top: 1px solid var(--hair);
}
.cap-list li:last-child { border-bottom: 1px solid var(--hair); }

.cap-index {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: .1em; color: var(--green);
}
.cap-name {
  font-size: clamp(17px, 1.5vw, 21px);
  font-weight: 500; letter-spacing: -.01em; color: var(--ink);
}
.cap-spec {
  font-family: var(--mono); font-size: 10px; line-height: 1.7;
  letter-spacing: .06em; color: var(--ink-faint);
}
.cap-desc { font-size: 13.5px; line-height: 1.63; color: #57554F; }
.cap-row:hover .arrow { color: var(--green); transform: translateX(3px); }
.cap-row .arrow { transition: color .22s ease, transform .22s ease; }

/* ---------------------------------------------------------
   Plant
   --------------------------------------------------------- */
.plant { background: var(--paper-warm); }

.addr {
  font-family: var(--mono); font-size: 9.5px; line-height: 1.9;
  letter-spacing: .1em; color: var(--ink-faint);
  flex: 0 0 auto;
  text-transform: uppercase;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-top: 8px;
}
.stat {
  display: flex; flex-direction: column; gap: 12px;
  padding-right: 24px;
}
.stat + .stat {
  border-left: 1px solid var(--hair-warm);
  padding-left: 36px;
}
.stat-value {
  font-family: var(--serif);
  font-size: clamp(48px, 5.2vw, 74px);
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--ink);
}
.stat-label {
  font-family: var(--mono); font-size: 9.5px; font-weight: 500;
  letter-spacing: .14em; color: var(--green);
  text-transform: uppercase;
}
.stat-note {
  font-size: 12.5px; line-height: 1.6;
  color: var(--ink-muted);
  max-width: 210px;
}

.certs { display: flex; flex-direction: column; gap: 16px; margin-top: clamp(48px, 6vw, 76px); }
.certs-label {
  font-family: var(--mono); font-size: 9.5px; font-weight: 500;
  letter-spacing: .16em; color: var(--green);
}
.certs-list {
  font-family: var(--mono); font-size: 10px; line-height: 2;
  letter-spacing: .08em; color: #7C7972;
  text-transform: uppercase;
  max-width: 1100px;
}

/* ---------------------------------------------------------
   BIPV
   --------------------------------------------------------- */
.bipv {
  background: var(--night);
  color: var(--night-text);
  display: flex; flex-direction: column;
  gap: clamp(36px, 4.6vw, 52px);
}
.bipv .section-head { padding-bottom: 0; }
.bipv h2 { color: var(--night-text); }
.bipv .section-intro { color: var(--night-body); }

.bipv-media {
  width: 100%; height: clamp(220px, 26vw, 368px);
  overflow: hidden;
  margin-inline: calc(-1 * var(--edge));
  width: calc(100% + 2 * var(--edge));
  max-width: 100vw;
}
.bipv-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }

.bipv-tech {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: clamp(40px, 5.5vw, 80px);
  align-items: start;
}

.diagram { display: flex; flex-direction: column; gap: 20px; }
.diagram-label {
  font-family: var(--mono); font-size: 9.5px; font-weight: 500;
  letter-spacing: .14em; color: var(--lime);
}

.stack { display: flex; flex-direction: column; gap: 5px; }
.layer {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}
.layer-name {
  font-family: var(--mono); font-size: 9px; letter-spacing: .1em;
  color: #8FA0BB; text-align: right;
}
.layer-name--key { color: var(--lime); font-weight: 500; }
.layer-bar {
  display: block; height: var(--h, 10px); width: 100%;
  transition: filter .2s ease;
}
.layer-bar--glass { background: #E8EDF5; opacity: .3; }
.layer-bar--pvb   { background: rgba(123, 192, 67, .45); }
.layer-bar--cdte  { background: rgba(123, 192, 67, .85); }
.layer-bar--back  { background: #E8EDF5; opacity: .22; }

.diagram-caption {
  font-size: 12px; line-height: 1.75;
  color: var(--night-muted);
  max-width: 620px;
}

.spec { display: flex; flex-direction: column; }
.spec-row {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 15px 0;
  border-top: 1px solid var(--night-line);
}
.spec-row:last-child { border-bottom: 1px solid var(--night-line); }
.spec-row dt { font-size: 12px; color: var(--night-body); }
.spec-row dd {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .05em;
  color: var(--night-text); margin: 0;
}
.spec-row dd.accent { color: var(--lime); }

/* ---------------------------------------------------------
   Applications
   --------------------------------------------------------- */
.apps {
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
  gap: clamp(40px, 5vw, 72px);
  align-items: start;
}
.apps-media { overflow: hidden; height: clamp(320px, 39vw, 560px); }
.apps-media img { width: 100%; height: 100%; object-fit: cover; }

.app-item {
  display: grid;
  grid-template-columns: 26px minmax(120px, 190px) minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 24px 0;
  border-top: 1px solid var(--hair);
}
.apps-list li:last-child { border-bottom: 1px solid var(--hair); }

.app-index {
  font-family: var(--mono); font-size: 9.5px; font-weight: 500;
  letter-spacing: .1em; color: var(--green);
}
.app-name {
  font-size: 17px; font-weight: 500; letter-spacing: -.01em; color: var(--ink);
}
.app-note { font-size: 12.5px; line-height: 1.6; color: var(--ink-muted); }

/* ---------------------------------------------------------
   CTA
   --------------------------------------------------------- */
.cta {
  background: var(--ink);
  color: var(--night-text);
  padding: clamp(64px, 7vw, 96px) var(--edge);
  display: flex; justify-content: space-between; align-items: center;
  gap: clamp(40px, 6vw, 80px);
  flex-wrap: wrap;
}
.cta-copy { display: flex; flex-direction: column; gap: 20px; flex: 1 1 520px; }
.cta h2 {
  font-family: var(--serif);
  font-size: clamp(40px, 4.7vw, 68px);
  line-height: 1.03;
  letter-spacing: -.015em;
}
.cta-body {
  font-size: 13.5px; line-height: 1.78;
  color: var(--night-body);
  max-width: 460px;
}

.cta-contact {
  display: flex; flex-direction: column; gap: 20px;
  flex: 0 1 372px;
}
.cta-email {
  font-size: clamp(17px, 1.5vw, 21px); font-weight: 500;
  letter-spacing: -.01em; color: var(--night-text);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px; align-self: flex-start;
  transition: border-color .22s ease;
}
.cta-email:hover { border-color: var(--lime); }
.cta-phone {
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em;
  color: var(--night-body); text-transform: uppercase;
}
.cta-address {
  font-size: 12px; line-height: 1.75; color: var(--night-muted);
}

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */
.site-footer {
  background: var(--night-deep);
  color: var(--night-body);
  padding: clamp(48px, 5vw, 72px) var(--edge) 40px;
  display: flex; flex-direction: column;
  gap: clamp(36px, 4vw, 52px);
}
.footer-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 64px;
}
.footer-brand { display: flex; flex-direction: column; gap: 16px; max-width: 380px; }
.footer-logo {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; font-weight: 700; letter-spacing: .19em; color: var(--night-text);
}
.footer-logo svg { width: 24px; height: 24px; flex: none; }
.footer-tag { font-size: 12px; line-height: 1.75; color: var(--night-muted); max-width: 320px; }

.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 12px; min-width: 150px; }
.footer-col h4 {
  font-family: var(--mono); font-size: 9px; font-weight: 500;
  letter-spacing: .14em; color: #6B7891;
  margin-bottom: 2px;
}
.footer-col a { font-size: 12px; color: #96A3BA; transition: color .2s ease; }
.footer-col a:hover { color: var(--night-text); }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; flex-wrap: wrap;
}
.footer-bottom p {
  font-family: var(--mono); font-size: 9px; letter-spacing: .11em;
  color: #6B7891; text-transform: uppercase;
}

/* ---------------------------------------------------------
   Reveal
   --------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal.is-in { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1180px) {
  .section-intro { max-width: 340px; }
  .cap-row { grid-template-columns: 30px minmax(140px, 240px) minmax(0, 1fr) 14px; }
  .cap-spec { display: none; }
  .apps { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (max-width: 1024px) {
  .header-inner { min-height: 72px; }
  .nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }

  .hero {
    grid-template-columns: 1fr;
    padding-left: 0;
    min-height: 0;
  }
  .hero-copy {
    padding: 56px var(--edge) 48px;
    gap: 22px;
  }
  .hero h1 { max-width: none; }
  .hero-media { height: min(78vw, 520px); }

  .section-head { flex-direction: column; align-items: flex-start; gap: 28px; padding-bottom: 40px; }
  .section-intro { max-width: 560px; }

  .bipv-tech { grid-template-columns: 1fr; gap: 40px; }
  .spec { max-width: 520px; }

  .apps { grid-template-columns: 1fr; gap: 36px; }
  .apps-media { height: min(64vw, 460px); }
}

@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .stat { padding-right: 0; }
  .stat + .stat { padding-left: 24px; }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }

  .cap-row {
    grid-template-columns: 26px minmax(0, 1fr) 14px;
    grid-template-areas:
      "i n a"
      "i s a"
      "d d d";
    gap: 4px 16px;
    align-items: baseline;
    padding: 22px 0;
  }
  .cap-index { grid-area: i; }
  .cap-name  { grid-area: n; }
  .cap-spec  { grid-area: s; display: block; }
  .cap-desc  { grid-area: d; margin-top: 10px; }
  .cap-row .arrow { grid-area: a; align-self: center; }

  .layer { grid-template-columns: 86px minmax(0, 1fr); gap: 12px; }
  .layer-name { font-size: 8px; letter-spacing: .08em; }

  .app-item {
    grid-template-columns: 22px minmax(0, 1fr);
    grid-template-areas:
      "i n"
      ". d";
    gap: 6px 14px;
    align-items: baseline;
    padding: 20px 0;
  }
  .app-index { grid-area: i; }
  .app-name  { grid-area: n; }
  .app-note  { grid-area: d; }

  .cta { flex-direction: column; align-items: flex-start; }
  .cta-contact { flex-basis: auto; width: 100%; }

  .footer-top { flex-direction: column; gap: 40px; }
  .footer-cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 24px;
    width: 100%;
  }
  .footer-col { min-width: 0; }
  .certs-list { font-size: 9px; line-height: 2.1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; row-gap: 32px; }
  .stat + .stat {
    border-left: 0; padding-left: 0;
    border-top: 1px solid var(--hair-warm); padding-top: 32px;
  }
  .hero-actions { gap: 18px; }
  .btn { width: 100%; }
  .link-arrow { width: auto; }
  .hero-actions .btn { width: auto; }
}
