/* =========================================================================
   Advising.Energy / style.css
   Palette: Pine & Brass
   ink #1C332E · cream #F7F4EC · brass #A9822F · slate #5B6B66 · deep pine #16302B
   ========================================================================= */

:root {
  --ink: #1c332e;
  --pine: #16302b;
  --pine-deep: #102420;
  --cream: #f7f4ec;
  --cream-2: #f1ece0;
  --card: #ffffff;
  --brass: #a9822f;
  --brass-text: #7a5c1c; /* darkened for AA contrast on cream (~5:1) */
  --brass-bright: #c79a3f;
  --slate: #5b6b66;
  --line: #e2dccc;
  --line-dark: rgba(247, 244, 236, 0.16);

  --container: 1120px;
  --radius: 12px;
  --radius-lg: 18px;

  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --shadow-sm: 0 1px 2px rgba(16, 36, 32, 0.06);
  --shadow-md: 0 12px 30px -12px rgba(16, 36, 32, 0.22);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--brass-text); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
.container.narrow { max-width: 760px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  background: var(--pine);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 200;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; color: #fff; }

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--brass-text);
  margin: 0 0 0.9rem;
}
.eyebrow-light { color: var(--brass-bright); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s var(--ease), background-color 0.2s var(--ease),
    border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--brass);
  color: #1a1408;
  border-color: var(--brass);
}
.btn-primary:hover { background: var(--brass-bright); color: #1a1408; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- Focus ---------- */
:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 244, 236, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-serif);
}
.brand:hover { color: var(--ink); }
.brand-mark { display: inline-flex; }
.brand-mark svg { border-radius: 8px; }
.brand-name {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-dot { color: var(--brass-text); }

/* ---------- Nav ---------- */
.site-nav { display: flex; align-items: center; }

.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}
.nav-menu a {
  display: inline-block;
  padding: 0.5rem 0.85rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.98rem;
  border-radius: 8px;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.nav-menu a:hover { background: var(--cream-2); }
.nav-menu a.is-active { color: var(--brass-text); }

.nav-cta {
  margin-left: 0.4rem;
  background: var(--pine);
  color: #fff !important;
}
.nav-cta:hover { background: var(--pine-deep); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 18px;
  height: 2px;
  background: var(--ink);
  transform: translateX(-50%);
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle-bar { top: 50%; margin-top: -1px; }
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateX(-50%) rotate(45deg); top: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateX(-50%) rotate(-45deg); top: 0; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1100px 480px at 82% -8%, rgba(169, 130, 47, 0.10), transparent 60%),
    linear-gradient(180deg, #faf8f1, var(--cream));
  padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--line);
}
.hero-inner { max-width: 860px; }
.hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  margin-bottom: 0.5em;
}
.hero-sub {
  font-size: clamp(1.08rem, 2.4vw, 1.3rem);
  color: var(--slate);
  max-width: 46ch;
  margin-bottom: 2rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 2.75rem;
}
.hero-trust {
  list-style: none;
  margin: 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.75rem;
  font-size: 0.92rem;
  color: var(--slate);
}
.hero-trust li { position: relative; padding-left: 1.1rem; }
.hero-trust li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brass);
}

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-alt { background: var(--cream-2); border-block: 1px solid var(--line); }

.section-head { max-width: 640px; margin-bottom: clamp(2rem, 5vw, 3.25rem); }
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
.section-lede { color: var(--slate); font-size: 1.08rem; margin-top: 0.75rem; }

/* ---------- Cards ---------- */
.card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
}

.card {
  flex: 1 1 300px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
    border-color 0.18s var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #d8cfb5;
}
.card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
.card p { color: var(--slate); font-size: 0.99rem; }
.card-note {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  font-size: 0.86rem !important;
  color: var(--slate);
  font-style: italic;
}
.card-index {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--brass-text);
  margin-bottom: 0.6rem;
  letter-spacing: 0.05em;
}

/* ---------- Approach (dark) ---------- */
.approach {
  background:
    radial-gradient(900px 420px at 88% 0%, rgba(199, 154, 63, 0.16), transparent 60%),
    var(--pine);
  color: #eef2ee;
}
.approach .section-head { margin-bottom: 0; }
.approach-inner {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
}
@media (min-width: 900px) {
  .approach-inner { grid-template-columns: 1.15fr 0.85fr; align-items: start; }
}
.approach h2 {
  color: #fff;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
}
.approach-copy p { color: rgba(238, 242, 238, 0.82); font-size: 1.06rem; }

.approach-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}
.approach-points li {
  padding: 1.15rem 1.25rem;
  background: rgba(247, 244, 236, 0.05);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
}
.approach-points h3 {
  color: #fff;
  font-size: 1.08rem;
  margin-bottom: 0.25rem;
}
.approach-points p {
  color: rgba(238, 242, 238, 0.72);
  font-size: 0.96rem;
  margin: 0;
}

/* ---------- Prose (About) ---------- */
.prose p { font-size: 1.08rem; color: #34433e; }
.prose-note {
  margin-top: 1.5rem;
  padding: 1.1rem 1.25rem;
  background: var(--cream-2);
  border-left: 3px solid var(--brass);
  border-radius: 0 8px 8px 0;
  font-size: 0.95rem !important;
  color: var(--slate);
}

/* ---------- Contact form ---------- */
.contact-form {
  display: grid;
  gap: 1.1rem;
  max-width: 560px;
}
.field { display: grid; gap: 0.4rem; }
.field label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
}
.field input,
.field textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  width: 100%;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(169, 130, 47, 0.18);
}
.field input:user-invalid,
.field textarea:user-invalid { border-color: #b3452f; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.contact-form .btn { justify-self: start; margin-top: 0.25rem; }

.form-status { font-size: 0.95rem; margin: 0; min-height: 1.2em; }
.form-status.is-error { color: #a23a25; }
.form-status.is-success { color: #2f6b3b; }

.form-fallback { font-size: 0.92rem; color: var(--slate); margin: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--pine-deep);
  color: rgba(238, 242, 238, 0.72);
  padding: clamp(3rem, 6vw, 4.5rem) 0 2rem;
  font-size: 0.95rem;
}
.footer-inner {
  display: grid;
  gap: 2rem;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid var(--line-dark);
}
@media (min-width: 760px) {
  .footer-inner { grid-template-columns: 1.4fr 1fr; align-items: start; }
}
.footer-brand .brand-name { color: #fff; font-size: 1.15rem; display: inline-block; margin-bottom: 0.75rem; }
.footer-brand p { margin-bottom: 0.6rem; }
.site-footer a { color: #e9e2cf; }
.site-footer a:hover { color: #fff; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
}
@media (min-width: 760px) {
  .footer-nav { justify-content: flex-end; }
}
.footer-nav a { text-decoration: none; }

.footer-legal { padding-top: 1.75rem; display: grid; gap: 0.75rem; }
.disclaimer {
  font-size: 0.82rem;
  color: rgba(238, 242, 238, 0.55);
  max-width: 70ch;
  margin: 0;
}
.copyright { font-size: 0.82rem; color: rgba(238, 242, 238, 0.55); margin: 0; }

/* ---------- Mobile nav ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 20px 1.25rem;
    box-shadow: var(--shadow-md);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
  }
  .nav-menu.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-menu a {
    padding: 0.9rem 0.5rem;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  .nav-menu li:last-child a { border-bottom: none; }
  .nav-cta {
    margin: 0.9rem 0 0;
    text-align: center;
    border-radius: 999px;
  }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .btn:hover, .card:hover { transform: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .nav-toggle, .hero-actions, .contact-form { display: none; }
  body { color: #000; background: #fff; }
}
