/* ==========================================================================
   Teksle & Tveito Elektro AS — stylesheet
   Industriell/utilitarian retning: marineblå + oransje, kondensert display-font,
   teknisk grid-struktur, ekte fagfoto.
   ========================================================================== */

:root {
  --color-bg: #F3EFE6;
  --color-surface: #FFFFFF;
  --color-surface-alt: #EAE3D4;
  --color-text: #16233C;
  --color-navy: #16233C;
  --color-navy-dark: #0B1526;
  --color-accent: #E35A26;
  --color-accent-dark: #C1481C;
  --color-accent-muted: #F3C4A6;
  --font-display: 'Big Shoulders Display', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;

  --max-width: 1320px;
  --radius: 3px;
  --ease: cubic-bezier(.4,0,.2,1);
}

/* -------------------------------------------------------------------------
   Reset
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: 0.01em; line-height: 0.98; color: var(--color-navy); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
button { font-family: inherit; }

section[id] { scroll-margin-top: 88px; }

/* -------------------------------------------------------------------------
   Layout helpers
   ------------------------------------------------------------------------- */
.section { padding: clamp(4rem, 8vw, 7.5rem) 0; }
.section-inner, .header-inner, .footer-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 3rem); }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  margin: 0 0 0.9rem;
}
.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); margin-bottom: 1rem; }
.section-lead { font-size: 1.1rem; max-width: 40rem; color: #3B4763; }

/* -------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.85em 1.6em;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  white-space: nowrap;
}
.btn-accent { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.btn-accent:hover { background: var(--color-accent-dark); border-color: var(--color-accent-dark); transform: translateY(-2px); box-shadow: 0 10px 20px -8px rgba(227,90,38,0.5); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); border-color: #fff; transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--color-navy); border-color: var(--color-navy); margin-top: 0.5rem; }
.btn-outline:hover { background: var(--color-navy); color: #fff; transform: translateY(-2px); }
.btn-lg { padding: 1em 2em; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* -------------------------------------------------------------------------
   Header
   ------------------------------------------------------------------------- */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(11,21,38,0.0);
  transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease), backdrop-filter 0.3s var(--ease);
}
header.scrolled {
  background: rgba(11,21,38,0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 24px -12px rgba(0,0,0,0.4);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}
.logo { display: flex; align-items: center; gap: 0.5rem; color: #fff; transition: opacity 0.2s var(--ease); }
.logo:hover { opacity: 0.8; }
.logo-bolt { width: 22px; height: 22px; color: var(--color-accent); flex-shrink: 0; }
.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 0.3em;
}
.logo-amp { color: var(--color-accent); font-weight: 600; }
.logo-sub { font-size: 0.6em; font-weight: 600; letter-spacing: 0.12em; opacity: 0.75; margin-left: 0.1em; }

.main-nav { display: flex; gap: 2.1rem; }
.main-nav a {
  color: #fff;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 0.3rem 0;
  transition: color 0.2s var(--ease);
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--color-accent);
  transition: width 0.25s var(--ease);
}
.main-nav a:hover { color: var(--color-accent-muted); }
.main-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 1.1rem; }
.tel-link { color: #fff; font-weight: 600; font-size: 0.95rem; letter-spacing: 0.01em; transition: color 0.2s var(--ease); }
.tel-link:hover { color: var(--color-accent-muted); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px; height: 34px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span { display: block; width: 100%; height: 2px; background: #fff; transition: transform 0.25s var(--ease), opacity 0.25s var(--ease); }
header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* -------------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,21,38,0.35) 0%, rgba(11,21,38,0.35) 35%, rgba(11,21,38,0.92) 100%),
              linear-gradient(90deg, rgba(11,21,38,0.55) 0%, rgba(11,21,38,0.15) 55%);
}
.hero-grid-overlay {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,0.06) 0, rgba(255,255,255,0.06) 1px, transparent 1px, transparent 80px);
  opacity: 0.5;
}
.hero-content {
  position: relative; z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  padding: 8rem clamp(1.25rem, 4vw, 3rem) 5rem;
  color: #fff;
}
.hero .eyebrow { color: var(--color-accent-muted); }
.hero h1 {
  color: #fff;
  font-size: clamp(3rem, 8vw, 6.4rem);
  margin-bottom: 1.4rem;
}
.accent-text { color: var(--color-accent); }
.hero-lead { font-size: 1.2rem; max-width: 34rem; color: #E4E7EE; margin-bottom: 2.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* -------------------------------------------------------------------------
   Stats bar
   ------------------------------------------------------------------------- */
.stats-bar { background: var(--color-navy); }
.stats-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 2.75rem) clamp(1.25rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  display: flex; flex-direction: column; gap: 0.35rem;
  padding: 0 1.5rem;
  border-left: 1px solid rgba(255,255,255,0.15);
  text-align: left;
}
.stat:first-child { border-left: none; padding-left: 0; }
.stat-num { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.3rem, 2.2vw, 1.7rem); color: #fff; text-transform: uppercase; line-height: 1.05; }
.stat-label { font-size: 0.85rem; color: #A9B2C6; }

/* -------------------------------------------------------------------------
   About
   ------------------------------------------------------------------------- */
.about-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.about-text h2 { font-size: clamp(2.4rem, 5vw, 3.6rem); margin-bottom: 1.4rem; }
.about-text p { font-size: 1.05rem; color: #333F58; }
.about-media { margin: 0; position: relative; }
.about-media img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--radius); }
.about-media figcaption {
  margin-top: 0.9rem;
  font-size: 0.9rem;
  color: #5B6580;
  border-left: 2px solid var(--color-accent);
  padding-left: 0.8rem;
}

/* -------------------------------------------------------------------------
   Services
   ------------------------------------------------------------------------- */
.services { background: var(--color-surface-alt); }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.service-card {
  background: var(--color-surface);
  border: 1px solid rgba(22,35,60,0.1);
  border-top: 3px solid var(--color-accent);
  padding: 2rem 1.75rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.service-card:hover { transform: translateY(-5px); box-shadow: 0 16px 32px -18px rgba(22,35,60,0.35); }
.service-icon { width: 40px; height: 40px; color: var(--color-accent); margin-bottom: 1.2rem; }
.service-card h3 { font-size: 1.35rem; margin-bottom: 0.7rem; }
.service-card p { font-size: 0.95rem; color: #46516B; margin: 0; }

/* -------------------------------------------------------------------------
   Gallery + CTA band
   ------------------------------------------------------------------------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-bottom: 0; }
.gallery-grid figure { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4/5; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.gallery-grid figure:hover img { transform: scale(1.06); }
.gallery-grid figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.2rem 1rem 0.9rem;
  background: linear-gradient(0deg, rgba(11,21,38,0.85), transparent);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
}

.cta-band { position: relative; margin-top: clamp(3.5rem, 7vw, 6rem); overflow: hidden; min-height: 26rem; display: flex; align-items: center; }
.cta-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.cta-band-scrim { position: absolute; inset: 0; background: linear-gradient(120deg, rgba(11,21,38,0.92) 20%, rgba(11,21,38,0.55) 100%); z-index: 1; }
.cta-band-content { position: relative; z-index: 2; max-width: var(--max-width); margin: 0 auto; padding: 4rem clamp(1.25rem, 4vw, 3rem); color: #fff; }
.cta-band-content h2 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 1rem; }
.cta-band-content p { font-size: 1.15rem; color: #DCE0EA; margin-bottom: 1.8rem; }
.cta-band-content a[href^="tel"] { color: var(--color-accent-muted); font-weight: 700; }
.cta-band-content a[href^="tel"]:hover { color: var(--color-accent); }

/* -------------------------------------------------------------------------
   Team
   ------------------------------------------------------------------------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.75rem; }
.team-card {
  background: var(--color-surface);
  border: 1px solid rgba(22,35,60,0.1);
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.team-card:hover { transform: translateY(-5px); box-shadow: 0 16px 32px -18px rgba(22,35,60,0.35); }
.team-card img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.team-card-body { padding: 1.4rem 1.5rem 1.6rem; border-top: 3px solid var(--color-accent); }
.team-card h3 { font-size: 1.3rem; margin-bottom: 0.2rem; }
.team-role { font-size: 0.85rem; font-weight: 600; color: var(--color-accent-dark); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.8rem; }
.team-card-body a { display: block; font-size: 0.9rem; color: #46516B; padding: 0.15rem 0; transition: color 0.2s var(--ease); }
.team-card-body a:hover { color: var(--color-accent); }

/* -------------------------------------------------------------------------
   Trust badges
   ------------------------------------------------------------------------- */
.trust { background: var(--color-navy); }
.trust .eyebrow { color: var(--color-accent-muted); }
.trust h2 { color: #fff; }
.trust .section-lead { color: #B7C0D4; }
.badge-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.badge-row li {
  border: 1.5px solid rgba(255,255,255,0.25);
  color: #fff;
  padding: 0.7em 1.4em;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.badge-row li:hover { border-color: var(--color-accent); background: rgba(227,90,38,0.1); }

/* -------------------------------------------------------------------------
   Contact
   ------------------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.contact-info h2 { font-size: clamp(2.2rem, 4.4vw, 3.2rem); margin-bottom: 1rem; }
.contact-info > p { font-size: 1.05rem; color: #333F58; max-width: 30rem; }
.contact-details { margin-top: 1.8rem; display: flex; flex-direction: column; gap: 0.9rem; }
.contact-details li { display: flex; align-items: center; gap: 0.8rem; font-size: 0.98rem; }
.contact-details svg { color: var(--color-accent); flex-shrink: 0; }
.contact-details a { transition: color 0.2s var(--ease); }
.contact-details a:hover { color: var(--color-accent); }

.map-embed { margin-top: 2rem; }
.map-embed iframe {
  width: 100%; height: 280px; border: 1px solid rgba(22,35,60,0.15); border-radius: var(--radius);
  filter: grayscale(0.15) contrast(1.02);
}
.map-link { display: inline-block; margin-top: 0.7rem; font-size: 0.9rem; font-weight: 600; color: var(--color-accent-dark); transition: color 0.2s var(--ease); }
.map-link:hover { color: var(--color-accent); }

.contact-form { background: var(--color-surface); padding: clamp(1.75rem, 4vw, 2.75rem); border: 1px solid rgba(22,35,60,0.1); border-top: 3px solid var(--color-accent); }
.form-row { margin-bottom: 1.4rem; }
.form-row label {
  display: block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: #46516B; margin-bottom: 0.5rem;
}
.form-row input, .form-row textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.85em 1em;
  border: 1.5px solid rgba(22,35,60,0.18);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  resize: vertical;
}
.form-row input:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(227,90,38,0.15);
}
.form-note { margin-top: 1rem; font-size: 0.8rem; color: #7A8399; }

.form-success {
  text-align: center;
  padding: 2.5rem 1rem;
}
.form-success svg { width: 48px; height: 48px; color: var(--color-accent); margin-bottom: 1rem; }
.form-success h3 { font-size: 1.6rem; margin-bottom: 0.6rem; }
.form-success p { color: #46516B; }

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
footer { background: var(--color-navy-dark); color: #B7C0D4; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-top: 4.5rem;
  padding-bottom: 3rem;
}
.footer-brand p { margin-top: 1rem; font-size: 0.95rem; color: #8A93A8; }
.footer-col h4 {
  color: #fff; font-size: 0.85rem; letter-spacing: 0.1em; margin-bottom: 1.1rem; font-family: var(--font-body); font-weight: 700;
}
.footer-col a, .footer-col p { display: block; font-size: 0.92rem; margin-bottom: 0.6rem; transition: color 0.2s var(--ease); }
.footer-col a:hover { color: var(--color-accent-muted); }
.footer-badges { color: #6E778C; font-size: 0.85rem !important; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.4rem clamp(1.25rem, 4vw, 3rem);
}
.footer-bottom p { max-width: var(--max-width); margin: 0 auto; font-size: 0.82rem; color: #6E778C; }

/* -------------------------------------------------------------------------
   Scroll-reveal animation
   ------------------------------------------------------------------------- */
[data-animate-child] { opacity: 0; transform: translateY(18px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.is-visible [data-animate-child] { opacity: 1; transform: none; }
[data-animate-child]:nth-child(1) { transition-delay: 0.02s; }
[data-animate-child]:nth-child(2) { transition-delay: 0.08s; }
[data-animate-child]:nth-child(3) { transition-delay: 0.14s; }
[data-animate-child]:nth-child(4) { transition-delay: 0.20s; }
[data-animate-child]:nth-child(5) { transition-delay: 0.26s; }
[data-animate-child]:nth-child(6) { transition-delay: 0.32s; }
[data-animate-child]:nth-child(7) { transition-delay: 0.38s; }
[data-animate-child]:nth-child(8) { transition-delay: 0.44s; }

@media (prefers-reduced-motion: reduce) {
  [data-animate-child] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .main-nav { display: none; }
  .header-actions .tel-link { display: none; }
  .nav-toggle { display: flex; }

  header.nav-open .main-nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(11,21,38,0.97);
    padding: 1.5rem clamp(1.25rem, 4vw, 3rem) 2rem;
    gap: 1.2rem;
  }

  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-media { order: -1; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); row-gap: 1.75rem; }
  .stat:nth-child(3) { border-left: none; padding-left: 0; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: 1fr; }
  .stat { border-left: none; padding-left: 0; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 1.25rem; }
  .stat:first-child { border-top: none; padding-top: 0; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-content { padding-top: 6.5rem; }
}
