/* ==========================================================================
   Energis Advisory — design system
   Neo-brutalist: hard offset shadows, 2px ink borders, high-contrast yellow.
   ========================================================================== */

:root {
  --cream:  #FBF8F0;
  --panel:  #F3EFE2;
  --yellow: #FFD23F;
  --yellow-hi: #FFDD66;
  --ink:    #16150F;
  --ink-2:  #2C2A20;
  --ink-3:  #23211A;
  --text:   #3A382E;
  --text-2: #57544A;
  --muted:  #8A8677;
  --muted-2:#6B675C;
  --gold:   #B08A00;
  --border: #16150F;
  --radius: 12px;

  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Archivo Black', 'Archivo', sans-serif;

  --wrap: 1080px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

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

:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

/* ----- layout helpers ---------------------------------------------------- */
.wrap { max-width: var(--wrap); margin: 0 auto; }

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--muted);
  text-transform: uppercase;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 40px);
  letter-spacing: -0.5px;
  color: var(--ink);
  line-height: 1.1;
}

/* ----- buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 700;
  border-radius: 9px;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: var(--font);
  transition: background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.btn-dark {
  background: var(--ink);
  color: var(--yellow);
  font-size: 16px;
  padding: 15px 28px;
}
.btn-dark:hover { background: var(--ink-2); }

.btn-outline {
  background: var(--cream);
  color: var(--ink);
  border-color: var(--ink);
  font-size: 16px;
  padding: 13px 26px;
}
.btn-outline:hover { background: #fff; }

.btn-accent {
  background: var(--yellow);
  color: var(--ink);
  font-size: 15px;
  padding: 13px 24px;
}
.btn-accent:hover { background: var(--yellow-hi); }

/* ==========================================================================
   Nav
   ========================================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--cream);
  border-bottom: 2px solid var(--border);
  padding: 12px 40px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
}
.brand .brand-name {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1;
  letter-spacing: 0.5px;
}
.brand .brand-sub {
  font-size: 9px;
  line-height: 1;
  letter-spacing: 3.4px;
  font-weight: 600;
  color: var(--muted-2);
}
.brand-stack { display: flex; flex-direction: column; gap: 3px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}
.nav-link {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 14.5px;
  border-bottom: 3px solid transparent;
  padding: 3px 0;
  transition: border-color .15s ease;
}
.nav-link:hover,
.nav-link[aria-current="page"] { border-bottom-color: var(--yellow); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  background: var(--ink);
  color: var(--yellow);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 8px;
  transition: background .15s ease;
}
.nav-cta:hover { background: var(--ink-2); }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--ink);
}

/* ==========================================================================
   Hero (home)
   ========================================================================== */
.hero {
  background: var(--yellow);
  border-bottom: 2px solid var(--border);
  padding: 96px 40px 104px;
  position: relative;
  overflow: hidden;
}
.hero-bolt {
  position: absolute;
  right: -40px;
  top: -60px;
  opacity: 0.14;
  transform: rotate(12deg);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 26px;
  align-items: flex-start;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--yellow);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 2.5px;
  padding: 8px 14px;
  border-radius: 999px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 8vw, 72px);
  line-height: 1.02;
  letter-spacing: -1.5px;
  color: var(--ink);
  max-width: 15ch;
  text-wrap: balance;
}
.hero .lede {
  font-size: 19px;
  line-height: 1.6;
  color: var(--text);
  max-width: 52ch;
}
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: 88px 40px; }
.section-head { display: flex; flex-direction: column; gap: 12px; }

/* services */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.stack-40 { display: flex; flex-direction: column; gap: 40px; }
.stack-36 { display: flex; flex-direction: column; gap: 36px; }

.service-card {
  background: var(--cream);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 5px 5px 0 var(--ink);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.service-card h3 { font-size: 20px; font-weight: 700; color: var(--ink); }
.service-card p  { font-size: 15px; line-height: 1.6; color: var(--text-2); }

/* founder */
.founder {
  background: var(--panel);
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
  padding: 88px 40px;
}
.founder-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 60px;
  align-items: center;
}
.founder-photo-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}
.avatar {
  width: 300px;
  height: 300px;
  max-width: 100%;
  border: 2px solid var(--border);
  border-radius: 50%;
  box-shadow: 7px 7px 0 var(--yellow);
  overflow: hidden;
  background: var(--cream);
}
.founder-role {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--muted);
}
.founder-body { display: flex; flex-direction: column; gap: 18px; }
.founder-body p {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--text);
}
blockquote {
  margin: 8px 0 0;
  padding: 18px 22px;
  border-left: 5px solid var(--yellow);
  background: var(--cream);
  border-radius: 0 10px 10px 0;
  font-size: 18px;
  line-height: 1.55;
  font-weight: 600;
  color: var(--ink);
}

/* blog teasers */
.teaser-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}
.text-link {
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  border-bottom: 3px solid var(--yellow);
  padding-bottom: 2px;
}
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.post-card {
  text-decoration: none;
  background: var(--cream);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .15s ease, transform .15s ease;
}
.post-card:hover { box-shadow: 5px 5px 0 var(--yellow); transform: translate(-1px, -1px); }
.post-thumb { height: 160px; border-bottom: 2px solid var(--border); }
.post-body { display: flex; flex-direction: column; gap: 9px; padding: 20px; }
.post-cat  { font-size: 12px; font-weight: 700; letter-spacing: 2px; color: var(--gold); }
.post-title { font-size: 18px; font-weight: 700; line-height: 1.3; color: var(--ink); }
.post-meta { font-size: 13px; color: var(--muted); }

/* ==========================================================================
   Blog index
   ========================================================================== */
.page-hero {
  background: var(--yellow);
  border-bottom: 2px solid var(--border);
  padding: 64px 40px;
}
.page-hero-inner { display: flex; flex-direction: column; gap: 14px; }
.page-hero .eyebrow { color: #7A6410; }
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(38px, 7vw, 54px);
  letter-spacing: -1px;
  color: var(--ink);
}
.page-hero p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  max-width: 56ch;
}

.featured-post {
  text-decoration: none;
  background: var(--cream);
  border: 2px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: stretch;
  transition: box-shadow .15s ease, transform .15s ease;
}
.featured-post:hover { box-shadow: 7px 7px 0 var(--yellow); transform: translate(-1px, -1px); }
.featured-thumb { min-height: 300px; border-right: 2px solid var(--border); }
.featured-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 36px;
  justify-content: center;
}
.tag-row { display: flex; gap: 10px; align-items: center; }
.badge {
  background: var(--ink);
  color: var(--yellow);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 5px 10px;
  border-radius: 999px;
}
.featured-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: var(--ink);
}
.featured-excerpt { font-size: 15.5px; line-height: 1.6; color: var(--text-2); }
.featured-meta { font-size: 13.5px; color: var(--muted); }

/* ==========================================================================
   Article
   ========================================================================== */
.article-header {
  background: var(--yellow);
  border-bottom: 2px solid var(--border);
  padding: 64px 40px;
}
.article-header-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.back-link { text-decoration: none; color: var(--ink); font-weight: 700; font-size: 14px; }
.back-link:hover { text-decoration: underline; }
.article-header .eyebrow { color: #7A6410; letter-spacing: 2.5px; }
.article-header h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 6vw, 46px);
  line-height: 1.08;
  letter-spacing: -1px;
  color: var(--ink);
  text-wrap: balance;
}
.article-byline { font-size: 14.5px; color: var(--text-2); }

.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 40px 72px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-2);
}
.article-hero-img {
  width: 100%;
  height: 340px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.article-body h2 {
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: 27px;
  letter-spacing: -0.3px;
  color: var(--ink);
}
.article-body blockquote {
  margin: 8px 0;
  padding: 20px 24px;
  background: var(--panel);
  font-size: 19px;
}
.article-cta {
  margin-top: 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  background: var(--yellow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.article-cta span { font-weight: 700; font-size: 17px; color: var(--ink); max-width: 34ch; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding: 72px 40px 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: start;
}
.footer-about { display: flex; flex-direction: column; gap: 20px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand .brand-name { font-family: var(--font-display); font-size: 21px; line-height: 1; letter-spacing: 0.5px; }
.footer-brand .brand-sub { font-size: 9.5px; line-height: 1; letter-spacing: 3.4px; font-weight: 600; color: #A39F92; }
.footer-about p { font-size: 15.5px; line-height: 1.6; color: #C9C5B8; max-width: 38ch; }
.footer-contact-lines { display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; color: #C9C5B8; }
.footer-contact-lines a { color: inherit; text-decoration: none; }
.footer-contact-lines a:hover { color: var(--yellow); }

.footer-form-col { display: flex; flex-direction: column; gap: 18px; }
.footer-form-col h2 { font-family: var(--font-display); font-size: 26px; color: var(--yellow); }

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.contact-form input,
.contact-form textarea {
  background: var(--ink-3);
  border: 1.5px solid var(--text);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--cream);
  font-family: var(--font);
  font-size: 14.5px;
  outline: none;
  transition: border-color .15s ease;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--yellow); }
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #7A766A; }
.field-full { grid-column: span 2; }
.contact-form textarea { resize: vertical; }
.contact-form .btn-submit {
  grid-column: span 2;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--yellow);
  color: var(--ink);
  border: none;
  border-radius: 8px;
  padding: 13px 26px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background .15s ease;
}
.contact-form .btn-submit:hover { background: var(--yellow-hi); }

.form-success {
  border: 2px solid var(--yellow);
  border-radius: 10px;
  padding: 28px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--cream);
}
.hidden { display: none !important; }

.footer-bottom {
  max-width: var(--wrap);
  margin: 56px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--text);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: #7A766A;
}

/* ==========================================================================
   Image placeholders (stand in for real photos until assets are added)
   ========================================================================== */
.img-slot {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(22, 21, 15, 0.32);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(22, 21, 15, 0.05),
      rgba(22, 21, 15, 0.05) 12px,
      rgba(22, 21, 15, 0.02) 12px,
      rgba(22, 21, 15, 0.02) 24px
    ),
    var(--panel);
}
.img-slot.circle { border-radius: 50%; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 860px) {
  .card-grid,
  .post-grid { grid-template-columns: 1fr; }
  .founder-grid { grid-template-columns: 1fr; gap: 36px; }
  .featured-post { grid-template-columns: 1fr; }
  .featured-thumb { border-right: none; border-bottom: 2px solid var(--border); }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--cream);
    border-bottom: 2px solid var(--border);
    padding: 8px 40px 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-link { padding: 12px 0; border-bottom: 1px solid rgba(22,21,15,.1); }
  .nav-link:hover,
  .nav-link[aria-current="page"] { border-bottom-color: rgba(22,21,15,.1); }
  .nav-cta { justify-content: center; margin-top: 12px; }
  .nav-toggle { display: inline-flex; }
  .site-nav { position: sticky; }
}

@media (max-width: 560px) {
  .site-nav { padding: 12px 20px; }
  .hero { padding: 64px 20px 72px; }
  .section, .founder { padding: 56px 20px; }
  .page-hero, .article-header { padding: 48px 20px; }
  .article-body { padding: 40px 20px 56px; }
  .site-footer { padding: 56px 20px 28px; }
  .footer-bottom { flex-direction: column; gap: 6px; }
  .contact-form { grid-template-columns: 1fr; }
  .field-full, .contact-form .btn-submit { grid-column: span 1; }
}
