/* =========================================================
   R A E Financial - stylesheet
   Palette and type derived from the logo identity.
   ========================================================= */

:root {
  /* Colour - sampled from the logo */
  --copper:        #AF6332;  /* primary wordmark copper            */
  --copper-deep:   #8A480C;  /* hover / weight on light grounds    */
  --copper-light:  #D19364;  /* fine accents, rules, on-dark text  */
  --paper:         #FAF8F5;  /* page background, matches logo stock */
  --paper-shade:   #F2EDE6;  /* alternating section tint           */
  --ink:           #33312E;  /* primary reading text               */
  --slate:         #6B6660;  /* muted secondary text               */
  --panel:         #FFFFFF;  /* cards / form fields                 */
  --line:          #E5DCD1;  /* hairline borders                   */

  /* Type */
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Rhythm */
  --container: 1140px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-pad: clamp(4.5rem, 9vw, 8rem);
  --radius: 4px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

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

a { color: var(--copper-deep); text-decoration: none; }
a:hover { color: var(--copper); }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.12; margin: 0; }

p { margin: 0 0 1.1em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Accessibility helpers */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  z-index: 200;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; color: var(--paper); }

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

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

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); }
.brand-mark { width: 40px; height: auto; }
.brand-word {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--copper);
}
.brand-word-light { font-weight: 400; letter-spacing: .02em; }

/* Navigation */
.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 0;
  padding: 0;
}
.nav-menu a {
  font-size: .95rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: .01em;
}
.nav-menu a:hover { color: var(--copper); }

.nav-cta {
  border: 1px solid var(--copper);
  color: var(--copper) !important;
  padding: .5rem 1.1rem;
  border-radius: var(--radius);
  transition: background .25s ease, color .25s ease;
}
.nav-cta:hover { background: var(--copper); color: var(--paper) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle-bar {
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  margin-inline: auto;
  transition: transform .3s ease, opacity .3s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: .98rem;
  font-weight: 500;
  letter-spacing: .01em;
  padding: .8rem 1.6rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .15s ease;
  border: 1px solid transparent;
}
.btn-primary { background: var(--copper); color: var(--paper); }
.btn-primary:hover { background: var(--copper-deep); color: var(--paper); transform: translateY(-1px); }
.btn-ghost { color: var(--copper-deep); border-color: var(--line); background: transparent; }
.btn-ghost:hover { border-color: var(--copper); color: var(--copper); }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  text-align: center;
  padding-top: clamp(3.5rem, 8vw, 6rem);
  padding-bottom: var(--section-pad);
  position: relative;
}
.hero-inner { max-width: 760px; margin-inline: auto; }

.hero-mark { width: clamp(84px, 14vw, 120px); margin: 0 auto 1.6rem; }

.hero-wordmark { display: flex; flex-direction: column; align-items: center; gap: .1rem; margin-bottom: 1.1rem; }
.wordmark-rae {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  letter-spacing: .16em;
  color: var(--copper);
  text-indent: .16em; /* balance the trailing letter-spacing */
}
.wordmark-financial {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 4.5vw, 2.6rem);
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--copper);
  text-indent: .42em;
}

.hero-tagline {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: var(--slate);
  letter-spacing: .02em;
  margin-bottom: 1.8rem;
}
.hero-tagline::after {
  content: "";
  display: block;
  width: 56px;
  height: 1px;
  background: var(--copper-light);
  margin: 1.4rem auto 0;
}

.hero-lede {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--ink);
  max-width: 600px;
  margin: 0 auto 2.2rem;
}

.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* =========================================================
   Generic section
   ========================================================= */
.section { padding-block: var(--section-pad); }
.services { background: var(--paper-shade); }
.about { background: var(--paper-shade); }

.section-head { max-width: 660px; margin-bottom: clamp(2.5rem, 5vw, 3.75rem); }
.services .section-head,
.approach .section-head,
.contact .section-head { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 1rem;
}

.section-title { font-size: clamp(1.9rem, 4.5vw, 2.9rem); color: var(--ink); margin-bottom: 1rem; }
.section-intro { font-size: 1.1rem; color: var(--slate); margin: 0; }

/* =========================================================
   Services
   ========================================================= */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.service-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.4rem 2rem 2.2rem;
  display: flex;
  flex-direction: column;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -22px rgba(138, 72, 12, .35);
  border-color: var(--copper-light);
}
.service-name { font-size: 1.4rem; color: var(--ink); margin-bottom: .6rem; }
.service-audience {
  display: inline-block;
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--copper);
  border: 1px solid var(--copper-light);
  border-radius: 999px;
  padding: .25rem .7rem;
  margin-bottom: .9rem;
}
.service-tagline { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--copper-deep); margin-bottom: .9rem; }
.service-body { font-size: 1rem; color: var(--slate); margin-bottom: 1.6rem; flex-grow: 1; }
.service-link {
  font-weight: 500;
  font-size: .98rem;
  color: var(--copper-deep);
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.service-link .arrow { transition: transform .25s ease; }
.service-link:hover { color: var(--copper); }
.service-link:hover .arrow { transform: translateX(4px); }

/* =========================================================
   Approach
   ========================================================= */
.approach-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
}
.approach-item { position: relative; padding-top: 1.6rem; }
.approach-item::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 36px; height: 2px;
  background: var(--copper);
}
.approach-name { font-size: 1.3rem; color: var(--ink); margin-bottom: .7rem; }
.approach-item p { color: var(--slate); margin: 0; }

/* =========================================================
   About
   ========================================================= */
.about-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.about-copy .section-title { margin-bottom: 1.2rem; }
.about-copy p { color: var(--ink); }
.about-copy p:not(.about-sectors-label) { max-width: 56ch; }

.about-sectors-label {
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--copper);
  margin: 2rem 0 1rem;
}
.sectors {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem .7rem;
  margin: 0; padding: 0;
}
.sectors li {
  font-size: .92rem;
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 999px;
  padding: .4rem 1rem;
}

.about-aside { text-align: center; }
.about-mark { width: clamp(140px, 22vw, 200px); margin: 0 auto 1.2rem; opacity: .96; }
.about-aside-tag {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--copper-deep);
  margin: 0;
}

/* =========================================================
   Contact
   ========================================================= */
.contact-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  max-width: 1000px;
  margin-inline: auto;
}

.contact-form { display: flex; flex-direction: column; gap: 1.2rem; }
.field { display: flex; flex-direction: column; gap: .45rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }

label {
  font-size: .9rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: .01em;
}
.optional { color: var(--slate); font-weight: 400; }

input, select, textarea {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .8rem .9rem;
  width: 100%;
  transition: border-color .2s ease, box-shadow .2s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--copper);
  box-shadow: 0 0 0 3px rgba(175, 99, 50, .14);
}
textarea { resize: vertical; min-height: 120px; }

.btn-submit { align-self: flex-start; margin-top: .4rem; }

.form-status { font-size: .95rem; margin: 0; min-height: 1.4em; }
.form-status.is-success { color: var(--copper-deep); }
.form-status.is-error { color: #B23A2E; }

.contact-direct {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
}
.contact-direct-title { font-size: 1.3rem; color: var(--ink); margin-bottom: 1.2rem; }
.contact-details { margin: 0 0 1.4rem; }
.contact-details dt {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: .25rem;
}
.contact-details dd { margin: 0 0 1.1rem; font-size: 1.05rem; }
.contact-note { font-size: .92rem; color: var(--slate); margin: 0; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}
.footer-inner { text-align: center; }
.footer-brand { display: inline-flex; align-items: center; gap: .6rem; margin-bottom: .8rem; }
.footer-mark { width: 36px; filter: saturate(1.1) brightness(1.15); }
.footer-word {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--copper-light);
}
.footer-tag { font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--paper); opacity: .82; margin-bottom: 1.4rem; }
.footer-company { font-size: .82rem; color: var(--paper); opacity: .6; margin: 0 0 .5rem; }
.footer-legal { font-size: .85rem; color: var(--paper); opacity: .6; margin: 0; }
.footer-legal a { color: var(--copper-light); }
.footer-legal a:hover { color: var(--paper); }

/* =========================================================
   Cookie / privacy banner
   ========================================================= */
.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 150;
  max-width: 720px;
  margin-inline: auto;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px -18px rgba(0,0,0,.5);
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.cookie-banner[hidden] { display: none; }
.cookie-text { font-size: .9rem; margin: 0; line-height: 1.5; }
.cookie-text a { color: var(--copper-light); }
.cookie-text a:hover { color: var(--paper); }
.cookie-accept { flex-shrink: 0; white-space: nowrap; }

@media (max-width: 560px) {
  .cookie-banner { flex-direction: column; align-items: stretch; text-align: left; }
}

/* =========================================================
   Legal / prose page (privacy notice)
   ========================================================= */
.legal { padding-block: clamp(3rem, 7vw, 5.5rem); }
.legal-inner { max-width: 760px; margin-inline: auto; }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); color: var(--ink); margin-bottom: .4rem; }
.legal .legal-meta { color: var(--slate); font-size: .95rem; margin-bottom: 2.5rem; }
.legal h2 { font-size: 1.5rem; color: var(--ink); margin: 2.4rem 0 .8rem; }
.legal p, .legal li { color: var(--ink); }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: .5rem; }
.legal .note {
  background: var(--paper-shade);
  border-left: 3px solid var(--copper);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  font-size: .95rem;
  color: var(--slate);
  margin: 1.5rem 0 2.5rem;
}
.legal a.back { display: inline-block; margin-top: 2.5rem; font-weight: 500; }

/* =========================================================
   Scroll reveal
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 880px) {
  .service-grid { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .approach-grid { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .about-inner { grid-template-columns: 1fr; text-align: center; }
  .about-copy p:not(.about-sectors-label) { max-width: none; }
  .about-copy .section-head, .about-copy { text-align: center; }
  .sectors { justify-content: center; }
  .about-aside { order: -1; }
  .contact-layout { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1.25rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
  }
  .nav-menu.open { max-height: 340px; }
  .nav-menu li { border-bottom: 1px solid var(--line); }
  .nav-menu li:last-child { border-bottom: none; padding-top: .8rem; }
  .nav-menu a { display: block; padding: .9rem 0; }
  .nav-cta { text-align: center; }
  .field-row { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
}

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
