/* ==========================================================================
   Urja Polytech — Design System
   Direction: conventional corporate blue. Clean sans type, plain white
   cards, blue/teal accent pair. One coherent theme, no mixed motifs.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #1B4B8F;
  --primary-dark: #123564;
  --tint: #EAF1FB;
  --teal: #0E8074;
  --teal-dark: #0B6459;
  --paper: #FFFFFF;
  --paper-alt: #F4F7FB;
  --ink: #1A2733;
  --ink-soft: #3C4B5C;
  --steel: #5B6B7A;
  --steel-light: #D3DBE3;
  --safety: #F2A900;
  --line: rgba(26, 39, 51, 0.12);
  --shadow: rgba(15, 40, 74, 0.16);

  --font: 'Inter', -apple-system, 'Segoe UI', sans-serif;

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

/* ---- Reset ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@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; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font); font-weight: 700; line-height: 1.18; margin: 0 0 0.5em; color: var(--ink); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--safety); outline-offset: 2px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
main { display: block; }
section { padding: 4rem 0; }
.section-tight { padding: 2.5rem 0; }
.eyebrow { font-size: 0.95rem; font-weight: 600; color: var(--primary); display: block; margin-bottom: 0.6em; }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 60ch; }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font);
  font-size: 0.96rem;
  font-weight: 600;
  padding: 0.85em 1.6em;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-secondary:hover { background: var(--primary); color: #fff; }
.btn-on-dark { background: var(--safety); color: var(--ink); }
.btn-on-dark:hover { background: #ffb929; }

/* ---- Header / Nav ------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s ease;
}
.site-header.is-scrolled { box-shadow: 0 10px 30px -22px var(--shadow); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 0.6em; font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.brand-mark { width: 34px; height: 34px; flex-shrink: 0; object-fit: contain; }
.brand small { display: block; font-size: 0.68rem; letter-spacing: 0.03em; color: var(--steel); font-weight: 400; }
.nav-links { display: flex; gap: 2.2rem; align-items: center; }
.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  position: relative;
  padding-bottom: 4px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 2px;
  background: var(--primary);
  transition: right 0.2s ease;
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { right: 0; }
.nav-links a[aria-current="page"] { color: var(--primary); font-weight: 600; }

.nav-item { position: relative; }
.nav-item > a { display: inline-flex; align-items: center; gap: 0.4em; }
.nav-item .chev { width: 9px; height: 9px; transition: transform 0.2s ease; flex-shrink: 0; }
.nav-item:hover .chev, .nav-item:focus-within .chev { transform: rotate(180deg); }
.dropdown {
  position: absolute; top: calc(100% + 12px); left: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 48px -28px var(--shadow);
  min-width: 230px; padding: 0.5rem;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}
.nav-item:hover .dropdown, .nav-item:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a { display: block; padding: 0.65rem 0.8rem; border-radius: calc(var(--radius) - 4px); font-size: 0.88rem; font-weight: 500; }
.dropdown a::after { display: none; }
.dropdown a:hover, .dropdown a:focus-visible { background: var(--tint); color: var(--primary); }
.nav-toggle {
  display: none;
  background: none; border: 2px solid var(--ink); border-radius: var(--radius);
  width: 42px; height: 38px; cursor: pointer; padding: 0;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--ink); display: block; }

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 76px; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: flex-start; gap: 0;
    padding: 0.5rem 1.5rem 1.5rem;
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 0.85rem 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav-item { width: 100%; }
  .nav-item .chev { display: none; }
  .dropdown {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; background: transparent;
    padding: 0 0 0.4rem 1rem; margin: 0;
  }
  .dropdown a { padding: 0.55rem 0; font-size: 0.85rem; color: var(--steel); border-bottom: none; }
}

/* ---- Photo hero variant (used on non-home pages if needed) --------------- */
.hero-photo { position: relative; overflow: hidden; color: #fff; padding: 6.5rem 0 7.5rem; }
.hero-photo-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero-photo-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(115deg, rgba(18,53,100,0.95) 0%, rgba(18,53,100,0.88) 45%, rgba(18,53,100,0.68) 100%);
}
.hero-photo .container { position: relative; z-index: 2; }
.hero-photo .lede { color: rgba(255,255,255,0.86); }
.hero-photo .eyebrow { color: #BFD6F5; }
.hero-photo h1 { color: #fff; }
.photo-credit {
  position: absolute; z-index: 2; bottom: 0.85rem; right: 0.9rem;
  background: rgba(18, 53, 100, 0.55); color: #fff;
  padding: 0.25em 0.65em; border-radius: 3px;
  font-size: 0.7rem; font-weight: 500;
}

/* ---- Photo banner / split (atmospheric imagery) ---------------------------- */
.photo-banner { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 21 / 9; box-shadow: 0 24px 50px -34px var(--shadow); }
.photo-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-split { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; box-shadow: 0 24px 50px -34px var(--shadow); }
.photo-split img { width: 100%; height: 100%; object-fit: cover; display: block; }
.section-alt { background: var(--paper-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---- Supporting figure (schematic diagram) --------------------------------- */
.figure-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: 0 12px 30px -18px var(--shadow); }
.figure-card svg { width: 100%; height: auto; }
.figure-card figcaption { font-size: 0.78rem; color: var(--steel); margin-top: 0.8rem; text-align: center; }

/* ---- Scroll reveal ----------------------------------------------------------- */
html.js-reveal .reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.22,0.7,0.3,1), transform 0.7s cubic-bezier(0.22,0.7,0.3,1);
}
html.js-reveal .reveal.is-visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

/* ---- Floating quick-CTA (mobile) --------------------------------------------- */
.quick-cta {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 90;
  display: none; align-items: center; gap: 0.5em;
  background: var(--primary); color: #fff;
  padding: 0.8em 1.3em; border-radius: 999px;
  font-size: 0.85rem; font-weight: 600;
  box-shadow: 0 16px 32px -14px var(--shadow);
}
.quick-cta:hover { background: var(--primary-dark); }
@media (max-width: 820px) { .quick-cta { display: inline-flex; } }

/* ---- WhatsApp chat button ----------------------------------------------------- */
.whatsapp-btn {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 95;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 28px -10px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease;
}
.whatsapp-btn:hover { transform: scale(1.08); }
.whatsapp-btn svg { width: 30px; height: 30px; }
@media (max-width: 820px) { .whatsapp-btn { bottom: 5.5rem; } }

/* ---- Video embed --------------------------------------------------------------- */
.video-embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--ink); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-credit { font-size: 0.85rem; color: var(--steel); margin-top: 0.7rem; }

/* ---- Section header (label + accent underline) ---------------------------- */
.section-head { margin: 0 0 2rem; }
.section-head span {
  display: inline-block; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.03em;
  text-transform: uppercase; color: var(--primary); position: relative; padding-bottom: 0.6rem;
}
.section-head span::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 36px; height: 3px;
  background: var(--primary); border-radius: 2px;
}

/* ---- Data table (product variants) ----------------------------------------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.spec-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 560px; }
.spec-table th, .spec-table td { padding: 0.85rem 1.1rem; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.spec-table thead th { background: var(--tint); color: var(--primary); font-weight: 700; font-size: 0.82rem; }
.spec-table tbody tr:last-child td { border-bottom: none; }
.spec-table tbody tr:hover { background: var(--paper-alt); }

/* ---- Info card (specs / process steps) ------------------------------------ */
.info-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: 0 16px 36px -30px var(--shadow);
}
.info-card-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.9rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--line); }
.spec-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.spec-row:last-child { border-bottom: none; }
.spec-row dt { color: var(--steel); }
.spec-row dd { margin: 0; color: var(--ink); font-weight: 600; text-align: right; }

/* ---- Product / category grid --------------------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
@media (max-width: 900px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .card-grid { grid-template-columns: 1fr; } }

.product-card {
  display: block;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.product-card:hover { transform: translateY(-6px); box-shadow: 0 28px 48px -26px var(--shadow); }
.product-card .thumb { aspect-ratio: 4/3; background: var(--paper-alt); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--steel); overflow: hidden; }
.product-card .thumb svg { width: 45%; opacity: 0.55; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.45s cubic-bezier(0.22,0.7,0.3,1); }
.product-card:hover .thumb img { transform: scale(1.07); }
.product-card .body { padding: 1.25rem 1.4rem 1.5rem; }
.tag { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 0.3em 0.7em; border-radius: 5px; margin-bottom: 0.7em; }
.tag-earthing { background: var(--tint); color: var(--primary); }
.tag-solar { background: rgba(14, 128, 116, 0.12); color: var(--teal-dark); }
.product-card h3 { margin-bottom: 0.4em; }
.product-card p { color: var(--steel); font-size: 0.92rem; margin-bottom: 0; }

/* ---- Placeholder media -------------------------------------------------- */
.media-placeholder {
  aspect-ratio: 4/3;
  background: repeating-linear-gradient(135deg, var(--paper), var(--paper) 10px, var(--paper-alt) 10px, var(--paper-alt) 20px);
  border: 1px dashed var(--steel-light);
  border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--steel); text-align: center; gap: 0.6rem; padding: 1rem;
}
.media-placeholder svg { width: 40px; height: 40px; opacity: 0.6; }
.media-placeholder span { font-size: 0.78rem; font-weight: 500; }

.product-photo {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 20px 44px -34px var(--shadow);
  background: var(--paper);
}
.product-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-item .product-photo { transition: border-color 0.15s ease, transform 0.15s ease; }
.gallery-item:hover .product-photo, .gallery-item:focus-visible .product-photo { border-color: var(--primary); transform: translateY(-2px); }

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery-grid { grid-template-columns: 1fr; } }
.gallery-item { cursor: pointer; border: none; background: none; padding: 0; text-align: left; }
.gallery-item .media-placeholder { transition: border-color 0.15s ease; }
.gallery-item:hover .media-placeholder, .gallery-item:focus-visible .media-placeholder { border-color: var(--primary); }
.gallery-caption { font-size: 0.85rem; color: var(--steel); margin-top: 0.5rem; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(18, 33, 51, 0.9); display: none; align-items: center; justify-content: center; z-index: 200; padding: 2rem; }
.lightbox.is-open { display: flex; }
.lightbox-inner { max-width: 720px; width: 100%; background: var(--paper); border-radius: var(--radius); padding: 1.5rem; }
.lightbox-close { position: absolute; top: 1.5rem; right: 1.5rem; background: var(--safety); border: none; width: 42px; height: 42px; border-radius: var(--radius); font-size: 1.3rem; cursor: pointer; }

/* ---- Stats row ------------------------------------------------------------ */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
@media (max-width: 760px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }
.stat-plate { text-align: center; padding: 1.5rem 1rem; }
.stat-plate strong { display: block; font-size: 1.9rem; font-weight: 800; color: var(--primary); }
.stat-plate span { font-size: 0.85rem; color: var(--steel); }

/* ---- Two-column content --------------------------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* ---- Forms ------------------------------------------------------------------ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field.full { grid-column: 1 / -1; }
label { font-size: 0.85rem; font-weight: 600; color: var(--steel); }
input, select, textarea {
  font-family: var(--font); font-size: 1rem; padding: 0.75em 0.9em;
  border: 1.5px solid var(--steel-light); border-radius: var(--radius);
  background: var(--paper); color: var(--ink);
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(27, 75, 143, 0.15); }
textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.85rem; color: var(--steel); margin-top: 1rem; }
.form-status { font-size: 0.9rem; margin-top: 1rem; display: none; padding: 0.8em 1em; border-radius: var(--radius); }
.form-status.is-visible { display: block; }
.form-status.success { background: rgba(14, 128, 116, 0.12); color: var(--teal-dark); }
.form-status.error { background: rgba(181, 45, 45, 0.1); color: #9a2b2b; }

/* ---- Contact info blocks ------------------------------------------------------ */
.contact-plate .spec-row a { color: var(--ink); }

/* ---- CTA band --------------------------------------------------------------- */
.cta-band { background: var(--primary-dark); color: #fff; padding: 3.5rem 0; }
.cta-band h2 { color: #fff; }
.cta-band .lede { color: rgba(255,255,255,0.78); }
.cta-band .container { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }

/* ---- Footer -------------------------------------------------------------------- */
.site-footer { background: var(--primary-dark); color: rgba(255,255,255,0.78); padding: 3.5rem 0 2rem; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(255,255,255,0.15); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: 0.9rem; margin-bottom: 1rem; }
.site-footer a { color: rgba(255,255,255,0.78); }
.site-footer a:hover { color: #fff; }
.site-footer li { margin-bottom: 0.6rem; font-size: 0.92rem; }
.footer-contact { margin-top: 1rem; font-size: 0.92rem; line-height: 1.8; }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 1.5rem; font-size: 0.82rem; flex-wrap: wrap; gap: 0.5rem; }

/* ---- Breadcrumb ------------------------------------------------------------------ */
.breadcrumb { font-size: 0.85rem; color: var(--steel); padding: 1.25rem 0 0; }
.breadcrumb a { color: var(--steel); }
.breadcrumb a:hover { color: var(--primary); }

/* ---- 404 --------------------------------------------------------------------------- */
.error-page { min-height: 60vh; display: flex; align-items: center; }
.error-page .container { text-align: center; }
.error-page h1 { font-size: clamp(3rem, 10vw, 6rem); }

/* ---- FAQ accordion -------------------------------------------------------------------- */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.8rem; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); padding: 0; }
.faq-item summary {
  cursor: pointer; list-style: none; font-weight: 600; font-size: 1rem; color: var(--ink);
  padding: 1.1rem 1.4rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; font-size: 1.3rem; font-weight: 400; color: var(--primary); flex-shrink: 0;
}
.faq-item[open] summary::after { content: '\2212'; }
.faq-item p { padding: 0 1.4rem 1.1rem; color: var(--ink-soft); margin: 0; }

/* ---- Service areas -------------------------------------------------------------------- */
.area-chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.2rem 0 0; }
.area-chips span {
  background: var(--tint); color: var(--primary); font-size: 0.85rem; font-weight: 600;
  padding: 0.45em 0.95em; border-radius: 999px;
}

/* ---- Map embed ------------------------------------------------------------------------ */
.map-embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- Utility ------------------------------------------------------------------------- */
.text-center { text-align: center; }
.mt-lg { margin-top: 3rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
