/* ============================================================
   VALCOR SYSTEMS — styles
   Fonts: IBM Plex Sans (nav) · Inter (everything else)
   ============================================================ */

:root {
  --white: #ffffff;
  --black: #0b0b0c;

  --font-nav: "IBM Plex Sans", -apple-system, sans-serif;
  --font-body: "Inter", -apple-system, sans-serif;

  --pad-x: clamp(24px, 5vw, 72px);
  --nav-h: 92px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --z-bg: 0;
  --z-content: 1;
  --z-dots: 90;
  --z-nav: 100;
  --z-menu: 110;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--white);
  background: var(--black);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p { margin: 0; }

a { color: inherit; text-decoration: none; }

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: var(--z-menu);
  padding: 10px 18px;
  background: var(--black);
  color: var(--white);
  font-size: 14px;
  border-radius: 4px;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

/* ============================================================
   Scroll snapping — slide-deck feel on larger screens
   ============================================================ */

@media (min-width: 900px) and (min-height: 620px) {
  html { scroll-snap-type: y mandatory; }
  .section { scroll-snap-align: start; }
}

/* ============================================================
   Navbar — transparent, fixed
   ============================================================ */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-nav);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--nav-h);
  padding: 0 var(--pad-x);
  font-family: var(--font-nav);
  color: var(--white);
  background: transparent;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.4);
  transition: color 0.4s var(--ease-out);
}

.nav-dark .nav { text-shadow: none; }

.nav__brand {
  display: flex;
  flex-direction: column;
  justify-self: start;
  font-size: 18px;
  line-height: 1.15;
}
.nav__brand-top { font-weight: 600; letter-spacing: 0.14em; }
.nav__brand-sub { font-weight: 400; letter-spacing: 0.42em; font-size: 11px; opacity: 0.85; }

.nav__links {
  display: flex;
  gap: clamp(28px, 4vw, 56px);
  font-size: 14px;
  font-weight: 500;
}
.nav__links a {
  position: relative;
  padding: 6px 0;
  opacity: 0.9;
  transition: opacity 0.15s ease;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}
.nav__links a:hover { opacity: 1; }
.nav__links a:hover::after,
.nav__links a:focus-visible::after { transform: scaleX(1); }

.nav__right {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-self: end;
}
.nav__talk {
  font-size: 14px;
  font-weight: 500;
  padding: 8px 0;
  opacity: 0.9;
  transition: opacity 0.15s ease;
}
.nav__talk:hover { opacity: 1; }

/* Dark-text mode over light backgrounds (sections 2 & 3) */
.nav-dark .nav,
.nav-dark .nav__burger span { color: var(--black); }
.nav-dark .nav__burger span { background: var(--black); }

/* Burger — mobile only */
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 8px 2px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav__burger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--white);
  transition: transform 0.3s var(--ease-out), background 0.4s;
}
.nav__burger[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

/* Mobile menu overlay */
.mobile-menu[hidden] { display: none; }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-nav) - 1);
  display: flex;
  align-items: center;
  padding: 0 var(--pad-x);
  background: rgba(8, 8, 10, 0.72);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  backdrop-filter: blur(24px) saturate(140%);
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
}
.mobile-menu.is-open { opacity: 1; }
.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.mobile-menu a {
  font-family: var(--font-nav);
  font-size: 28px;
  font-weight: 500;
  color: var(--white);
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.mobile-menu.is-open a { opacity: 1; transform: none; }
.mobile-menu.is-open a:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu.is-open a:nth-child(2) { transition-delay: 0.10s; }
.mobile-menu.is-open a:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu.is-open a:nth-child(4) { transition-delay: 0.20s; }

/* ============================================================
   Sections — full-bleed, background centered like PowerPoint
   ============================================================ */

.section {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.bg {
  position: absolute;
  inset: 0;
  z-index: var(--z-bg);
  background-image: var(--bg-lg);
  background-size: cover;
  background-position: center center; /* the "middle part", never top or bottom */
  background-repeat: no-repeat;
}

@media (max-width: 899px) {
  .bg { background-image: var(--bg-sm); }
}

.section__inner {
  position: relative;
  z-index: var(--z-content);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 24px) var(--pad-x) 72px;
}

/* ============================================================
   Glass CTA buttons — Inter 12px
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  white-space: nowrap;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--white);
  padding: 15px 34px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.38);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease-out);
}
.btn:hover,
.btn:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.65);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }

/* Dark-text glass for light backgrounds */
.btn--dark {
  color: var(--black);
  background: rgba(255, 255, 255, 0.30);
  border-color: rgba(0, 0, 0, 0.30);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn--dark:hover,
.btn--dark:focus-visible {
  background: rgba(255, 255, 255, 0.48);
  border-color: rgba(0, 0, 0, 0.5);
}

/* ============================================================
   1 · Hero
   ============================================================ */

.bg--hero {
  background-image: url("assets/hero_bg1.jpg");
  animation: hero-settle 2.4s var(--ease-out) both;
}
@media (max-width: 899px) {
  .bg--hero { background-image: url("assets/hero_bg1_sm.jpg"); }
}
@keyframes hero-settle {
  from { transform: scale(1.05); }
  to   { transform: scale(1); }
}

.hero__block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
  max-width: 760px;
}

.hero__title {
  font-size: clamp(42px, 6.5vw, 66px);
  line-height: 1.06;
  letter-spacing: 0.01em;
  text-wrap: balance;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.45);
}
.hero__title strong { font-weight: 700; }
.hero__title span { font-weight: 300; letter-spacing: 0.06em; }

.hero__tagline {
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 300;
  line-height: 1.4;
  max-width: 560px;
  text-wrap: balance;
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.45);
}

.hero__block .btn { margin-top: 8px; }

/* Scroll cue */
.hero__scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-content);
}
.hero__scroll span {
  display: block;
  width: 1px;
  height: 44px;
  background: rgba(255, 255, 255, 0.55);
  animation: scroll-cue 2.2s var(--ease-out) infinite;
  transform-origin: top;
}
@keyframes scroll-cue {
  0%   { transform: scaleY(0); opacity: 0; }
  40%  { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(20px); opacity: 0; }
}

/* ============================================================
   2 · Positioning statement — centered, above the midline
   ============================================================ */

.section--center .section__inner {
  align-items: center;
  text-align: center;
}
.section__inner--raised { justify-content: center; }
.section__inner--raised > *:first-child { margin-top: -8vh; }

.statement {
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 300;
  line-height: 1.5;
  max-width: 880px;
  text-wrap: balance;
  color: var(--white);
  text-shadow: 0 1px 30px rgba(0, 0, 0, 0.55), 0 1px 8px rgba(0, 0, 0, 0.35);
  margin-bottom: 44px;
}
.statement strong { font-weight: 700; }

.section--center .btn { align-self: center; }

/* ============================================================
   3 · Split — heading left (white), body right (black)
   ============================================================ */

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 5fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.split__title {
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 600;
  line-height: 1.3;
  color: var(--white);
  text-wrap: balance;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35), 0 2px 28px rgba(0, 0, 0, 0.45);
}

.split__body {
  font-size: clamp(17px, 1.9vw, 20px);
  font-weight: 400;
  line-height: 1.6;
  color: var(--black);
  max-width: 34em;
}

.section__cta {
  display: flex;
  justify-content: center;
  margin-top: clamp(48px, 8vh, 96px);
}

/* ============================================================
   4 · Problem — frosted white panel, black text (like the PPT)
   ============================================================ */

.panel {
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 6px;
  padding: clamp(32px, 5vw, 72px);
  color: var(--black);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.30);
}

.panel__lead {
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 500;
  line-height: 1.4;
  max-width: 30em;
  text-wrap: balance;
  margin-bottom: clamp(24px, 4vh, 44px);
}

.panel__body {
  font-size: clamp(17px, 1.9vw, 20px);
  font-weight: 300;
  line-height: 1.65;
  max-width: 42em;
}
.panel__body + .panel__body { margin-top: 1.2em; }
.panel__body--em { font-weight: 500; }

/* ============================================================
   5 · VALNERGY  +  6 · Vision — left-aligned blocks
   ============================================================ */

/* Left-edge scrim so the copy stays readable over the bright image */
#valnergy .bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 16, 0.62) 0%, rgba(2, 6, 16, 0.25) 42%, rgba(2, 6, 16, 0) 68%);
}

.left-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  max-width: 600px;
}
.left-block--wide { max-width: 720px; }

.left-block__title {
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 300;
  line-height: 1.3;
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.5);
}
.left-block__title strong { font-weight: 700; letter-spacing: 0.02em; }

.left-block__body {
  font-size: clamp(17px, 1.9vw, 20px);
  font-weight: 300;
  line-height: 1.6;
  text-shadow: 0 1px 20px rgba(0, 0, 0, 0.5);
}

.left-block .btn { margin-top: 8px; }

.vision__title {
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 600;
  line-height: 1.35;
  text-wrap: balance;
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.6);
}

.vision__body {
  font-size: clamp(17px, 1.9vw, 20px);
  font-weight: 300;
  line-height: 1.65;
  text-shadow: 0 1px 20px rgba(0, 0, 0, 0.6);
}
.vision__body strong { font-weight: 600; }

/* Footer strip inside the last section */
.footer {
  position: relative;
  z-index: var(--z-content);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--pad-x) 28px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.6);
}
.footer a:hover { color: var(--white); }
.footer__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.footer__sep { opacity: 0.5; }

/* ============================================================
   Contact dialog — dark glass panel
   ============================================================ */

.contact {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 0;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100svh - 48px);
  background: rgba(10, 12, 16, 0.78);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  backdrop-filter: blur(28px) saturate(140%);
  color: var(--white);
  box-shadow: 0 32px 120px rgba(0, 0, 0, 0.5);
}
.contact::backdrop {
  background: rgba(4, 5, 8, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.contact[open] {
  animation: contact-in 0.35s var(--ease-out);
}
@keyframes contact-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(28px, 5vw, 44px);
}

.contact__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}
.contact__close span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.7);
  transition: background 0.15s ease;
}
.contact__close span:first-child { transform: translate(-50%, -50%) rotate(45deg); }
.contact__close span:last-child { transform: translate(-50%, -50%) rotate(-45deg); }
.contact__close:hover span { background: var(--white); }

.contact__title {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
}

.contact__intro {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
  margin-top: -8px;
}

.contact__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 520px) {
  .contact__row { grid-template-columns: 1fr; }
}

.contact__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.contact__field label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}
.contact__field input,
.contact__field textarea {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 300;
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 3px;
  padding: 12px 14px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.contact__field textarea { resize: vertical; min-height: 110px; }
.contact__field input:focus-visible,
.contact__field textarea:focus-visible {
  outline: none;
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.09);
}
.contact__field input.is-invalid,
.contact__field textarea.is-invalid {
  border-color: rgba(255, 120, 110, 0.8);
}

.contact__honey {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.contact__actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 4px;
}
.contact__submit { cursor: pointer; }
.contact__submit[disabled] { opacity: 0.5; cursor: default; }

.contact__status {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.85);
}
.contact__status.is-error { color: rgb(255, 150, 140); }

.contact__alt {
  font-size: 13px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 18px;
}
.contact__alt a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.contact__alt a:hover { color: var(--white); }

/* ============================================================
   Section dots — right edge
   ============================================================ */

.dots {
  position: fixed;
  right: clamp(14px, 2vw, 28px);
  top: 50%;
  transform: translateY(-50%);
  z-index: var(--z-dots);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dots a {
  width: 7px;
  height: 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.45);
  transition: height 0.3s var(--ease-out), background 0.3s ease;
}
.dots a.is-active {
  height: 24px;
  background: var(--white);
}
.nav-dark .dots a { background: rgba(0, 0, 0, 0.35); }
.nav-dark .dots a.is-active { background: var(--black); }

@media (max-width: 720px) {
  .dots { display: none; }
}

/* ============================================================
   Reveal animations — enhancement only, default visible
   ============================================================ */

html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
html.js .reveal.in-view {
  opacity: 1;
  transform: none;
}
html.js .reveal:nth-child(2) { transition-delay: 0.1s; }
html.js .reveal:nth-child(3) { transition-delay: 0.2s; }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 720px) {
  :root { --nav-h: 76px; }

  .nav__links { display: none; }
  .nav__talk { display: none; }
  .nav__burger { display: flex; }
  .nav { grid-template-columns: 1fr auto; }

  .split { grid-template-columns: 1fr; }

  .hero__title { font-size: clamp(38px, 11vw, 52px); }
  .hero__title span { display: block; }

  .section__inner--raised > *:first-child { margin-top: -4vh; }

  .footer { flex-direction: column; gap: 6px; }
}

/* ============================================================
   Reduced motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html.js .reveal { opacity: 1; transform: none; }
  .hero__scroll { display: none; }
}
