/* ============================================================
   ERADEH POWER CONSULTING — main.css
   Global styles, design tokens, layout utilities, nav, footer
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@300;400;700&family=Roboto:ital,wght@0,400;0,700;1,400&display=swap');

/* ── Design Tokens ── */
:root {
  --color-primary:       #302F34;
  --color-primary-light: #4a4850;
  --color-accent:        #0A3949;
  --color-accent-hover:  #0d4d63;
  --color-accent-bright: #1a6b8a;   /* lighter teal for hover glows */
  --color-bg-light-grey: #F1F1F1;

  --color-text:          #302F34;
  --color-text-muted:    #6b6970;
  --color-bg:            #ffffff;
  --color-bg-light:      #F7F7F8;   /* slightly warmer than pure #F1F1F1 */
  --color-border:        #e4e3e7;
  --color-white:         #ffffff;

  --font-primary:  'Roboto', 'Segoe UI', system-ui, sans-serif;
  --font-display:  'Oswald', 'Roboto', sans-serif;
  --font-sans:     'Roboto', 'Segoe UI', system-ui, sans-serif;

  --radius-sm:   4px;
  --radius-md:   10px;
  --radius-lg:   18px;
  --radius-xl:   28px;

  --shadow-sm:   0 1px 4px rgba(48,47,52,.07);
  --shadow-md:   0 4px 20px rgba(48,47,52,.10);
  --shadow-lg:   0 12px 40px rgba(48,47,52,.14);
  --shadow-xl:   0 24px 64px rgba(48,47,52,.18);

  --nav-height:  68px;
  --max-width:   1200px;
  --section-gap: 88px;

  /* Transitions */
  --ease-out: cubic-bezier(.22,.68,0,1.2);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom selection */
::selection { background: var(--color-accent); color: #fff; }

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-primary);
  letter-spacing: .01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.75rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1rem, 2vw, 1.2rem); font-family: var(--font-primary); font-weight: 700; letter-spacing: 0; }
h4 { font-size: 1rem; font-family: var(--font-primary); font-weight: 700; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

blockquote {
  border-left: 3px solid var(--color-accent);
  padding-left: 1.5rem;
  font-style: italic;
  color: var(--color-text-muted);
  margin: 1.5rem 0;
  line-height: 1.75;
}

cite {
  display: block;
  margin-top: .875rem;
  font-style: normal;
  font-size: .875rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

/* ── Scroll-reveal animation ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* ── Layout Utilities ── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

.section-padded { padding: var(--section-gap) 0; }
.bg-light        { background: var(--color-bg-light); }

.section-eyebrow {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--color-accent);
  margin-bottom: .75rem;
  font-family: var(--font-primary);
}

.section-title {
  text-align: center;
  margin-bottom: .75rem;
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: 3rem;
  font-size: 1.05rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.section-cta { text-align: center; margin-top: 3rem; }

/* ── Accent divider ── */
.section-title-group {
  text-align: center;
  margin-bottom: 3rem;
}
.section-title-group .section-eyebrow { display: block; margin-bottom: .5rem; }
.section-title-group h2 { margin-bottom: .75rem; }
.section-title-group p  { color: var(--color-text-muted); max-width: 560px; margin: 0 auto; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .7rem 1.6rem;
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: .875rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .22s, color .22s, border-color .22s, box-shadow .22s, transform .18s var(--ease-out);
  border: 2px solid transparent;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  box-shadow: 0 6px 24px rgba(10,57,73,.35);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-1px);
}

.btn-outline-light {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255,255,255,.55);
}
.btn-outline-light:hover {
  background: rgba(255,255,255,.12);
  border-color: var(--color-white);
  transform: translateY(-1px);
}

/* ── Navigation ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-primary);
  height: var(--nav-height);
  transition: box-shadow .3s;
}

.site-header.scrolled {
  box-shadow: 0 2px 24px rgba(0,0,0,.25);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo img {
  height: 38px;
  width: auto;
  transition: opacity .2s;
}
.nav-logo:hover img { opacity: .85; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  color: rgba(255,255,255,.78);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: color .2s;
  position: relative;
  padding-bottom: 2px;
}

/* Active underline indicator */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-accent-bright);
  transform: scaleX(0);
  transition: transform .25s var(--ease-out);
  border-radius: 2px;
}

.nav-links a:hover,
.nav-links a.active { color: var(--color-white); }

.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

.site-header .nav-links .btn-outline {
  color: var(--color-white);
  border-color: rgba(255,255,255,.35);
  padding: .4rem 1.1rem;
  font-size: .78rem;
  background: transparent;
}
.site-header .nav-links .btn-outline::after { display: none; }
.site-header .nav-links .btn-outline:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
}

/* ── Nav Dropdown ── */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  cursor: pointer;
}

.nav-caret {
  font-size: .65rem;
  margin-left: .2rem;
  opacity: .7;
  transition: transform .2s;
}

.nav-dropdown:hover .nav-caret {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: .75rem;
  min-width: 260px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, visibility .2s, transform .2s;
  z-index: 1000;
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-item {
  display: block;
  padding: .6rem .85rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background .15s;
}

.nav-dropdown-item:hover {
  background: rgba(255,255,255,.08);
}

.nav-dropdown-item strong {
  display: block;
  color: #fff;
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: .15rem;
}

.nav-dropdown-item span {
  display: block;
  color: rgba(255,255,255,.55);
  font-size: .72rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.nav-dropdown-item--featured strong {
  color: var(--color-accent-bright, #1a9bbd);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Footer ── */
.site-footer {
  background: var(--color-primary);
  color: rgba(255,255,255,.7);
  padding: 56px 0 36px;
  border-top: 3px solid var(--color-accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: start;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 2rem;
}

.footer-brand .footer-logo {
  height: 34px;
  width: auto;
  margin-bottom: 1.25rem;
}

.footer-brand p {
  font-size: .8rem;
  color: rgba(255,255,255,.4);
  line-height: 1.6;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-col h4 {
  color: var(--color-white);
  font-size: .7rem;
  font-family: var(--font-primary);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 1rem;
  font-weight: 700;
}

.footer-col ul li + li { margin-top: .5rem; }

.footer-col a {
  color: rgba(255,255,255,.5);
  font-size: .825rem;
  transition: color .2s;
}
.footer-col a:hover { color: rgba(255,255,255,.9); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .78rem;
  color: rgba(255,255,255,.35);
}

/* ── Forms ── */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: .7rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: .9rem;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color .2s, box-shadow .2s;
  appearance: none;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(10,57,73,.1);
}

textarea { resize: vertical; min-height: 120px; line-height: 1.6; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-bottom: 1.25rem;
}

.form-group label {
  font-size: .8rem;
  font-weight: 700;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ── Page Hero (inner pages) ── */
.page-hero {
  background: linear-gradient(135deg, #302F34 0%, #0A3949 100%);
  color: var(--color-white);
  padding: 72px 0 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Subtle grid texture overlay */
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: var(--color-white); margin-bottom: .875rem; }
.page-hero p  { color: rgba(255,255,255,.72); font-size: 1.1rem; max-width: 600px; margin: 0 auto; line-height: 1.7; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .footer-grid   { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-links  { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: column; gap: .5rem; text-align: center; }
}

@media (max-width: 768px) {
  :root { --section-gap: 64px; --nav-height: 64px; }

  .container { padding: 0 20px; }

  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: #252428;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem 20px 2rem;
    gap: 1.5rem;
    box-shadow: 0 16px 40px rgba(0,0,0,.3);
    border-top: 1px solid rgba(255,255,255,.06);
  }

  .nav-links.open { display: flex; }
  .nav-links a { font-size: .9rem; }
  .nav-links a::after { display: none; }

  .nav-dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    background: rgba(255,255,255,.05);
    border: none;
    box-shadow: none;
    min-width: 0;
    padding: .5rem 0 .5rem 1rem;
    margin-top: .5rem;
  }
}

@media (max-width: 480px) {
  .footer-links { grid-template-columns: 1fr; }
}
