/* ==========================================================================
   UNYA — Solar PV Development
   Design tokens
   ========================================================================== */

:root {
  /* Color */
  --navy:        #0A1628;
  --navy-2:      #0D1D33;
  --panel:       #12233B;
  --panel-2:     #17293F;
  --paper:       #F6F7F4;
  --paper-2:     #EDEFEA;
  --ink:         #0F1B2D;
  --ink-soft:    #4B5768;
  --muted:       #8B94A3;
  --muted-dark:  #7C8AA0;
  --gold:        #C9A227;
  --gold-soft:   rgba(201, 162, 39, 0.14);
  --green:       #1E8E5A;
  --line:        rgba(15, 27, 45, 0.10);
  --line-strong: rgba(15, 27, 45, 0.16);
  --line-dark:   rgba(255, 255, 255, 0.12);
  --line-dark-strong: rgba(255, 255, 255, 0.22);
  --white: #FFFFFF;

  /* Type */
  --font-display: 'Source Serif 4', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

  /* Layout */
  --container: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius-sm: 3px;
  --radius-md: 4px;
  --radius-lg: 6px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   Reset & base
   ========================================================================== */

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

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

@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;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: inherit;
}
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section { padding: clamp(64px, 9vw, 128px) 0; position: relative; }
.section--dark { background: var(--navy); color: var(--white); }
.section--paper-2 { background: var(--paper-2); }

.section-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head--center { max-width: 640px; margin-left: auto; margin-right: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--gold); display: block; }
.section-head--center .eyebrow::before { display: none; }

.section-title { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; margin-bottom: 14px; }
.section-dek { font-size: 17px; color: var(--ink-soft); max-width: 560px; }
.section-head--center .section-dek { margin-left: auto; margin-right: auto; }
.section--dark .section-dek { color: var(--muted-dark); }

/* ==========================================================================
   Scroll progress
   ========================================================================== */

.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--gold), #E4C465);
  z-index: 900; transition: width 0.08s linear;
}

/* ==========================================================================
   Nav
   ========================================================================== */

.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 800;
  background: rgba(10, 22, 40, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-dark);
}

.nav-row { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }

.brand { display: flex; align-items: center; flex: none; }
.brand-logo { height: 34px; width: auto; }

.nav-links {
  display: flex; align-items: center; gap: 2px;
  overflow-x: auto; scrollbar-width: none; flex: 1; justify-content: center;
}
.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted-dark); padding: 9px 14px; white-space: nowrap; border-radius: var(--radius-sm);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-links a:hover { color: var(--white); }
.nav-links a.is-active { color: var(--gold); background: var(--gold-soft); }

.nav-actions { display: flex; align-items: center; gap: 14px; flex: none; }

.lang-toggle {
  display: flex; border: 1px solid var(--line-dark-strong); border-radius: var(--radius-sm);
  overflow: hidden; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
}
.lang-toggle button { background: none; border: none; color: var(--muted-dark); padding: 7px 10px; transition: color 0.2s var(--ease), background 0.2s var(--ease); }
.lang-toggle button.is-active { background: var(--gold); color: var(--navy); font-weight: 600; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line-dark-strong); border-radius: var(--radius-sm);
  color: var(--white); width: 38px; height: 38px; align-items: center; justify-content: center;
}

.mobile-nav {
  position: fixed; inset: 72px 0 0 0; background: var(--navy); z-index: 799;
  padding: 24px var(--gutter) 40px; display: none; flex-direction: column; gap: 4px; overflow-y: auto;
}
.mobile-nav.is-open { display: flex; }
.mobile-nav a {
  font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted-dark); padding: 14px 4px; border-bottom: 1px solid var(--line-dark);
}
.mobile-nav a.is-active { color: var(--gold); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; font-family: var(--font-mono); font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase; border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), color .2s var(--ease);
  white-space: nowrap;
}
.btn-primary { background: var(--gold); color: var(--navy); }
.btn-primary:hover { background: #DBB238; transform: translateY(-1px); }
.btn-ghost-dark { border-color: var(--line-dark-strong); color: var(--white); background: transparent; }
.btn-ghost-dark:hover { border-color: var(--gold); color: var(--gold); }
.btn-ghost-light { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost-light:hover { border-color: var(--ink); }

/* ==========================================================================
   Hero — full-bleed photo
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding-top: 90px;
}

.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;
}

.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, rgba(6,14,26,0.92) 0%, rgba(6,14,26,0.62) 42%, rgba(6,14,26,0.22) 75%),
    linear-gradient(180deg, rgba(6,14,26,0.35) 0%, rgba(6,14,26,0.05) 30%, rgba(6,14,26,0.65) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-height: calc(100vh - 90px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-copy { max-width: 560px; text-align: left; }

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--navy); background: var(--gold); padding: 8px 14px; border-radius: 999px;
  margin-bottom: 30px; font-weight: 600;
}

.hero-title {
  font-size: clamp(52px, 8.4vw, 108px);
  line-height: 0.95;
  color: var(--white);
  margin-bottom: 24px;
  letter-spacing: 0.01em;
}

.hero-sub {
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.65;
  color: rgba(255,255,255,0.82);
  max-width: 46ch;
  margin-bottom: 40px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}
.hero-scroll-cue .line { width: 1px; height: 26px; background: rgba(255,255,255,0.4); position: relative; overflow: hidden; }
.hero-scroll-cue .line::after {
  content: ''; position: absolute; top: -100%; left: 0; width: 100%; height: 100%;
  background: var(--gold);
  animation: scroll-cue 2.2s ease-in-out infinite;
}
@keyframes scroll-cue { 0% { top: -100%; } 60% { top: 100%; } 100% { top: 100%; } }
@media (prefers-reduced-motion: reduce) { .hero-scroll-cue .line::after { animation: none; top: 0; } }

/* ==========================================================================
   About / capability cards
   ========================================================================== */

.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.capability-card { background: var(--paper); padding: 32px 28px 36px; }

.capability-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--paper-2); border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 26px;
}
.capability-icon svg { width: 19px; height: 19px; stroke: var(--gold); }

.capability-index {
  font-family: var(--font-mono); color: var(--gold); font-size: 13px;
  letter-spacing: 0.06em; display: block; margin-bottom: 10px;
}
.capability-card h3 { font-size: 19px; margin-bottom: 12px; }
.capability-card p { font-size: 14.5px; color: var(--ink-soft); line-height: 1.65; }

/* ==========================================================================
   Projects
   ========================================================================== */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.project-card {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
  display: flex;
  flex-direction: column;
}
.project-card:hover { border-color: var(--gold); transform: translateY(-2px); }

.project-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 26px 0;
}

.project-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--paper-2); border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
}
.project-icon svg { width: 19px; height: 19px; stroke: var(--ink); }

.project-status {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--paper-2);
  border: 1px solid var(--line-strong);
  padding: 7px 12px;
  border-radius: 999px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-soft);
}
.project-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

.project-body { padding: 18px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.project-name { font-size: 21px; margin-bottom: 8px; }
.project-meta {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.03em;
  color: var(--ink-soft); margin-bottom: 22px;
}
.project-meta span { display: inline-block; }
.project-meta .sep { margin: 0 8px; color: var(--muted); }

.project-cta {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink); padding-top: 18px; border-top: 1px solid var(--line);
}
.project-cta svg { width: 13px; height: 13px; stroke: var(--ink); transition: transform 0.2s var(--ease); }
.project-card:hover .project-cta svg { transform: translateX(3px); }

.projects-note {
  margin-top: 40px;
  font-size: 13.5px;
  color: var(--ink-soft);
  border-left: 3px solid var(--gold);
  padding: 4px 0 4px 18px;
}

/* ==========================================================================
   Closing / contact
   ========================================================================== */

.closing { background: var(--navy); color: var(--white); position: relative; overflow: hidden; }

.closing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }

.closing-title { font-size: clamp(32px, 4.4vw, 48px); line-height: 1.1; margin-bottom: 22px; max-width: 16ch; }
.closing-copy { color: var(--muted-dark); font-size: 16px; line-height: 1.7; max-width: 48ch; }

.contact-form { background: var(--panel); border: 1px solid var(--line-dark); border-radius: var(--radius-md); padding: 36px; }

.form-row { margin-bottom: 20px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

label {
  display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted-dark); margin-bottom: 9px;
}

.contact-form input, .contact-form textarea {
  width: 100%; background: var(--navy-2); border: 1px solid var(--line-dark-strong);
  border-radius: var(--radius-sm); padding: 13px 14px; color: var(--white); font-size: 14.5px;
  transition: border-color 0.2s var(--ease);
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #56637A; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--gold); outline: none; }
.contact-form textarea { resize: vertical; min-height: 90px; }

.form-consent {
  display: flex; align-items: flex-start; gap: 10px; font-size: 12.5px; color: var(--muted-dark);
  margin-bottom: 22px; line-height: 1.5;
}
.form-consent input { width: auto; margin-top: 3px; flex: none; }
.form-consent-link { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }
.form-consent-link:hover { color: #DBB238; }

.form-submit {
  width: 100%; background: var(--gold); color: var(--navy); border: none; padding: 15px 24px;
  font-family: var(--font-mono); font-weight: 600; font-size: 12.5px; letter-spacing: 0.06em;
  text-transform: uppercase; border-radius: var(--radius-sm); transition: background 0.2s var(--ease);
}
.form-submit:hover { background: #DBB238; }
.form-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.form-status { margin-top: 16px; font-size: 13.5px; padding: 12px 14px; border-radius: var(--radius-sm); display: none; }
.form-status.is-success { display: block; background: rgba(30,142,90,0.14); color: #6FD6A8; border: 1px solid rgba(30,142,90,0.4); }
.form-status.is-error { display: block; background: rgba(168,80,63,0.14); color: #E29A8B; border: 1px solid rgba(168,80,63,0.4); }

.field-error { color: #E29A8B; font-size: 12px; margin-top: 6px; display: none; }
.form-row.has-error input, .form-row.has-error textarea { border-color: #A8503F; }
.form-row.has-error .field-error { display: block; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer { background: var(--navy); color: var(--muted-dark); border-top: 1px solid var(--line-dark); padding: 44px 0 30px; }
.footer-top {
  display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 24px;
  margin-bottom: 30px; padding-bottom: 30px; border-bottom: 1px solid var(--line-dark);
}
.footer-logo { height: 26px; width: auto; margin-bottom: 12px; }
.footer-sponsor { font-size: 13px; max-width: 42ch; line-height: 1.6; }
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; transition: color 0.2s var(--ease); }
.footer-links a:hover { color: var(--white); }
.footer-legal { font-size: 12px; line-height: 1.7; max-width: 900px; font-style: italic; color: #5C6A80; }

/* ==========================================================================
   Legal page (privacy policy)
   ========================================================================== */

.legal-hero {
  background: var(--navy);
  color: var(--white);
  padding: 150px 0 60px;
}
.legal-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted-dark); margin-bottom: 26px; transition: color 0.2s var(--ease);
}
.legal-back:hover { color: var(--gold); }
.legal-back svg { width: 13px; height: 13px; stroke: currentColor; }
.legal-hero h1 { font-size: clamp(32px, 4vw, 44px); margin-bottom: 12px; }
.legal-meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted-dark); }

.legal-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px var(--gutter) 110px;
}
.legal-article h2 {
  font-size: 21px;
  margin-top: 46px;
  margin-bottom: 14px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.legal-article > h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.legal-article p { font-size: 15px; color: var(--ink-soft); line-height: 1.75; margin-bottom: 14px; }
.legal-article ul, .legal-article ol { padding-left: 22px; margin-bottom: 16px; }
.legal-article li { font-size: 15px; color: var(--ink-soft); line-height: 1.7; margin-bottom: 8px; }
.legal-article strong { color: var(--ink); font-weight: 600; }
.legal-article a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.legal-article a:hover { color: var(--gold); }
.legal-intro { font-size: 16px; color: var(--ink-soft); line-height: 1.75; margin-bottom: 8px; }

/* ==========================================================================
   Reveal-on-scroll
   ========================================================================== */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

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

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .capability-grid { grid-template-columns: 1fr; }
  .closing-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .form-row-2 { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .contact-form { padding: 24px; }
  .closing-grid { gap: 40px; }
  .hero-scroll-cue { display: none; }
  .projects-grid { grid-template-columns: 1fr; }
}
