/* ==========================================================================
   Alternativ Edge — one pager
   Tokens → base → components → sections → responsive → motion
   ========================================================================== */

:root {
  /* Brand palette */
  --ink: #16231f;
  --ink-soft: #52635d;
  --forest: #183c32;
  --forest-light: #245547;
  --ivory: #f5f0e6;
  --paper: #fffdf8;
  --terracotta: #c8653c;
  --terracotta-deep: #a54e2a;
  --terracotta-light: #eda17f;
  --line: #c9d2cd;

  /* On-dark surfaces */
  --on-dark: rgba(255, 255, 255, .74);
  --on-dark-line: rgba(255, 255, 255, .22);

  /* Type */
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Fluid type scale */
  --step-h1: clamp(3.25rem, 1.9rem + 6.4vw, 7.25rem);
  --step-h2: clamp(2.35rem, 1.5rem + 3.6vw, 4.6rem);
  --step-h3: clamp(1.6rem, 1.25rem + 1.5vw, 2.5rem);
  --step-lead: clamp(1.1rem, 1rem + .55vw, 1.4rem);
  --step-body: clamp(1rem, .96rem + .2vw, 1.15rem);

  /* Fluid rhythm */
  --gutter: clamp(1.5rem, 5vw, 5.875rem);
  --section-y: clamp(5rem, 10vw, 9.5rem);
  --header-h: 82px;

  /* Effects */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --focus: 0 0 0 3px var(--paper), 0 0 0 5px var(--terracotta);
}

/* --------------------------------------------------------------- base --- */

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

html {
  scroll-behavior: smooth;
  /* Keep anchored sections clear of the sticky header */
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

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

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

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; text-wrap: balance; }
p { text-wrap: pretty; }

h1 {
  max-width: 15ch;
  margin-bottom: .45em;
  font-size: var(--step-h1);
  line-height: .94;
  letter-spacing: -.02em;
}
h1 em { font-style: normal; color: var(--terracotta); }

h2 {
  max-width: 20ch;
  margin-bottom: .55em;
  font-size: var(--step-h2);
  line-height: 1.06;
  letter-spacing: -.01em;
}

:where(a, button, [tabindex]):focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 6px;
  background: var(--forest);
  color: #fff;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: none; }

/* --------------------------------------------------------- components --- */

.eyebrow,
.section-label {
  margin: 0 0 1.5rem;
  color: var(--terracotta);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 48px;
  padding: .75rem 1.5rem;
  border: 1px solid var(--forest);
  border-radius: 999px;
  background: var(--forest);
  color: #fff;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.button:hover {
  background: var(--forest-light);
  border-color: var(--forest-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -12px rgba(22, 35, 31, .55);
}
.button:active { transform: translateY(0); }

.button-small {
  min-height: 42px;
  padding: .55rem 1.1rem;
  font-size: .875rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding-bottom: .35rem;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: color .2s var(--ease), gap .2s var(--ease);
}
.text-link:hover { color: var(--terracotta); gap: .85rem; }

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

/* -------------------------------------------------------------- header --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem;
  min-height: var(--header-h);
  padding: .875rem var(--gutter);
  border-bottom: 1px solid rgba(22, 35, 31, .14);
  background: rgba(255, 253, 248, .88);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  transition: box-shadow .3s var(--ease);
}
.site-header.is-stuck { box-shadow: 0 8px 30px -18px rgba(22, 35, 31, .5); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1;
  white-space: nowrap;
}
/* The logo art is masked rather than drawn, so the mark takes `currentColor`
   and reads correctly on the light header and the dark footer alike.
   The source PNG is a 1080 square whose glyph sits off-centre (901x446 at
   65,290), so percentage mask sizing crops it. Sizing and offsetting in rem
   instead keeps the whole mark visible and scales with the box below. */
.brand-mark {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 1.2375rem;
  background: currentColor;
  -webkit-mask: url("assets/ae-logo.png") no-repeat;
  mask: url("assets/ae-logo.png") no-repeat;
  -webkit-mask-size: 2.8169rem 2.8169rem;
  mask-size: 2.8169rem 2.8169rem;
  -webkit-mask-position: -0.0945rem -0.7193rem;
  mask-position: -0.0945rem -0.7193rem;
}

.site-nav { display: flex; align-items: center; gap: 1.9rem; }
.site-nav a {
  font-size: .9rem;
  text-decoration: none;
  transition: color .2s var(--ease);
}
.site-nav > a:not(.button):hover { color: var(--terracotta); }
/* The in-nav CTA is for the mobile drawer only */
.nav-cta { display: none; }

.nav-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(22, 35, 31, .2);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.nav-toggle-bars { display: grid; gap: 5px; width: 18px; }
.nav-toggle-bars span {
  display: block;
  height: 1.5px;
  background: currentColor;
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.nav-open .nav-toggle-bars span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-open .nav-toggle-bars span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* ---------------------------------------------------------------- hero --- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, .82fr);
  min-height: min(calc(100svh - var(--header-h)), 860px);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(4rem, 9vw, 8rem) var(--gutter);
  background: var(--ivory);
}
.hero-intro {
  max-width: 42ch;
  margin-bottom: 2.25rem;
  color: var(--ink-soft);
  font-size: var(--step-lead);
  line-height: 1.5;
}
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
}

.hero-visual {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  background: var(--forest);
}
.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, transparent 35%, rgba(255, 255, 255, .05));
}

.orbit { position: absolute; border: 1px solid rgba(255, 255, 255, .3); border-radius: 50%; }
.orbit-one { width: 620px; height: 620px; right: -280px; top: -170px; animation: orbit-drift-one 11s ease-in-out infinite alternate; }
.orbit-two { width: 390px; height: 390px; left: -190px; bottom: -100px; animation: orbit-drift-two 8.5s ease-in-out infinite alternate; }

.route {
  position: absolute;
  inset: 19% 12% 26%;
  transform: rotate(-7deg);
  border: 2px solid rgba(255, 255, 255, .62);
  border-radius: 44% 56% 38% 62% / 55% 40% 60% 45%;
  animation: route-breathe 9s ease-in-out infinite;
}

.point {
  position: absolute;
  z-index: 2;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ee936c;
  box-shadow: 0 0 0 9px rgba(238, 147, 108, .18);
}
.point-one { top: 31%; left: 26%; animation: point-pulse 3.4s ease-in-out infinite; }
.point-two { right: 24%; top: 47%; animation: point-pulse 3.4s 1.1s ease-in-out infinite; }
.point-three { left: 39%; bottom: 21%; animation: point-pulse 3.4s 2.2s ease-in-out infinite; }

.region-label {
  position: absolute;
  z-index: 2;
  color: #fff;
  font-size: .8rem;
  letter-spacing: .04em;
}
.label-one { top: 24%; left: 26%; }
.label-two { top: 51%; right: 15%; }
.label-three { left: 39%; bottom: 12%; }

@keyframes orbit-drift-one {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-34px, 24px, 0) scale(1.06); }
}
@keyframes orbit-drift-two {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(30px, -22px, 0) scale(.93); }
}
@keyframes route-breathe {
  0%, 100% { transform: rotate(-7deg) scale(1); opacity: .78; }
  50% { transform: rotate(-4deg) scale(1.035); opacity: 1; }
}
@keyframes point-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 9px rgba(238, 147, 108, .18); }
  50% { transform: scale(1.18); box-shadow: 0 0 0 17px rgba(238, 147, 108, .05); }
}

/* ------------------------------------------------------------ sections --- */

.section { padding: var(--section-y) var(--gutter); }

/* Shared two-column "label + content" layout */
.intro,
.audience,
.section-heading {
  display: grid;
  grid-template-columns: minmax(160px, .32fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 6vw, 7rem);
}

.intro > div > p {
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: var(--step-lead);
}
.intro > div > p:last-child { margin-bottom: 0; }

/* Services — dark band */
.services { background: var(--forest); color: #fff; }
.services .section-label { color: var(--terracotta-light); }
.section-heading { margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.section-heading h2 { margin-bottom: 0; }

.service-list { border-top: 1px solid var(--on-dark-line); }
.service-list article {
  display: grid;
  grid-template-columns: minmax(90px, .18fr) minmax(0, .82fr);
  gap: 1.5rem;
  padding: clamp(1.75rem, 3vw, 2.4rem) 0;
  border-bottom: 1px solid var(--on-dark-line);
  transition: background .3s var(--ease);
}
/* Bleed the hover tint into the gutter without shifting the grid */
.service-list article:hover {
  background: rgba(255, 255, 255, .04);
  box-shadow: 0 0 0 1.25rem rgba(255, 255, 255, .04);
  clip-path: inset(0 -1.25rem);
}
.service-index {
  color: var(--terracotta-light);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding-top: .45rem;
}
.service-list h3 { margin-bottom: .35em; font-size: var(--step-h3); line-height: 1.15; }
.service-list p { max-width: 60ch; margin-bottom: 0; color: var(--on-dark); }

/* Why us */
.why {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(3rem, 8vw, 8rem);
  background: var(--ivory);
}
.why-copy > p {
  max-width: 46ch;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: var(--step-lead);
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.why-grid article {
  min-height: 210px;
  padding: clamp(1.5rem, 2.5vw, 2rem);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background .3s var(--ease);
}
.why-grid article:hover { background: rgba(255, 253, 248, .7); }
.why-grid h3 { margin-bottom: .5em; font-size: 1.7rem; line-height: 1.2; }
.why-grid p { margin-bottom: 0; color: var(--ink-soft); }

/* Audience */
.audience ul {
  max-width: 60ch;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.audience li {
  display: flex;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--step-lead);
  line-height: 1.45;
}
.audience li::before {
  content: "↘";
  flex: 0 0 auto;
  color: var(--terracotta);
}

/* Contact — terracotta band */
.contact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(3rem, 7vw, 7rem);
  background: var(--terracotta-deep);
  color: #21120b;
}
.contact .section-label { color: #fdeee5; }
.contact-heading h2 { color: #fffaf6; }
.contact-heading > p {
  max-width: 46ch;
  margin-bottom: 0;
  color: #fbe6da;
  font-size: var(--step-lead);
}

.contact-cards { display: grid; gap: 1rem; align-content: center; }
.contact-cards article {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: .9rem 1.5rem;
  padding: clamp(1.5rem, 2.5vw, 1.9rem);
  border-radius: 4px;
  background: rgba(255, 253, 248, .92);
}
.meeting-name { margin: 0; font-family: var(--serif); font-size: 2rem; line-height: 1; }
.contact-cards .button { justify-self: end; }
.email-link {
  grid-column: 1 / -1;
  color: var(--ink-soft);
  font-size: .95rem;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color .2s var(--ease);
}
.email-link:hover { color: var(--terracotta); }

/* -------------------------------------------------------------- footer --- */

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  padding: clamp(2rem, 4vw, 2.75rem) var(--gutter);
  background: var(--ink);
  color: #fff;
}
.footer-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 1.9rem;
  color: rgba(255, 255, 255, .7);
  font-size: .875rem;
}
.footer-meta a { color: #fff; text-decoration: none; transition: color .2s var(--ease); }
.footer-meta a:hover { color: var(--terracotta-light); }
footer :where(a):focus-visible { box-shadow: 0 0 0 3px var(--ink), 0 0 0 5px var(--terracotta-light); }

/* ---------------------------------------------------------- responsive --- */

@media (max-width: 1080px) {
  .why { grid-template-columns: 1fr; }
  .why-copy > p { max-width: 60ch; }
}

@media (max-width: 920px) {
  /* Mobile drawer */
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5rem var(--gutter) 1.75rem;
    border-bottom: 1px solid rgba(22, 35, 31, .14);
    background: var(--paper);
    box-shadow: 0 20px 40px -24px rgba(22, 35, 31, .6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }
  .nav-open .site-nav { opacity: 1; visibility: visible; transform: none; }
  .site-nav > a:not(.button) {
    padding: .95rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.05rem;
  }
  .nav-cta { display: inline-flex; margin-top: 1.25rem; }
  .header-cta { display: none; }
  .nav-toggle { display: grid; }
  .nav-open { overflow: hidden; }

  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { padding-block: clamp(3.5rem, 12vw, 6rem); }
  .hero-visual { min-height: 400px; }

  .intro, .audience, .section-heading, .contact { grid-template-columns: 1fr; }
  .contact-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  :root { --header-h: 70px; }
  .brand { font-size: 1.25rem; }
  .brand-mark {
    width: 2.1rem; height: 1.0395rem;
    -webkit-mask-size: 2.3662rem 2.3662rem; mask-size: 2.3662rem 2.3662rem;
    -webkit-mask-position: -0.0794rem -0.6042rem; mask-position: -0.0794rem -0.6042rem;
  }
  .hero-visual { min-height: 320px; }
  .service-list article { grid-template-columns: 1fr; gap: .6rem; }
  .service-index { padding-top: 0; }
  .why-grid { grid-template-columns: 1fr; }
  .why-grid article { min-height: 0; }
  .contact-cards { grid-template-columns: 1fr; }
  .contact-cards article { grid-template-columns: 1fr; }
  .contact-cards .button { justify-self: stretch; }
  footer { align-items: flex-start; flex-direction: column; }
  .footer-meta { align-items: flex-start; flex-direction: column; gap: .75rem; }
}

/* -------------------------------------------------------------- motion --- */

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

/* ---------------------------------------------------------------- print --- */

@media print {
  .site-header, .nav-toggle, .hero-visual, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding: 1.5rem 0; }
  .reveal { opacity: 1; transform: none; }
}
