/* =============================================
   EarlyBird base layer
   Reset, fonts, type system, buttons, nav, layout
   utilities and section shells. Loads after tokens.css,
   before marble-elements.css and sections.css.
   ============================================= */

/* ---- Fonts (per data/assets-report.md) ---- */
@font-face {
  font-family: 'Degular Display';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/degular-display-600.woff') format('woff');
}

@font-face {
  font-family: 'Degular Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/degular-display-400.woff') format('woff');
}

/* One variable file covers the whole 400 to 600 range.
   font-stretch matters: Archivo carries a width axis and
   omitting it can render condensed in some browsers. */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 600;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/archivo-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* anchor targets clear the fixed nav */
  scroll-padding-top: 92px;
}

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--paper);
  background: var(--ink);
  /* contains off-screen clouds and tilted cards */
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  display: inline-block;
  vertical-align: middle;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

p a:not(.btn),
address a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

p a:not(.btn):hover,
address a:hover {
  color: var(--accent-deep);
}

ul,
ol {
  list-style-position: inside;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

input,
select,
textarea {
  font: inherit;
}

address {
  font-style: normal;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

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

/* ---- Type system ---- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--paper);
}

h1 {
  font-size: clamp(54px, 8.5vw, 118px);
  line-height: 1.02;
}

h2 {
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.05;
  margin-bottom: 22px;
}

h3 {
  font-size: 24px;
  line-height: 1.25;
  margin-bottom: 10px;
}

/* Marble-style accent punctuation on headings */
.accent {
  color: var(--accent);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}

.eyebrow--on-paper {
  color: var(--faint);
}

/* ---- Layout utilities ---- */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

.section {
  padding: 110px 0;
}

.section--ink2 {
  background: var(--ink-2);
}

.section__intro {
  max-width: 660px;
  color: var(--muted);
  margin-bottom: 56px;
}

.skip-link {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2000;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: var(--r-pill);
  transform: translateY(-300%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  padding: 17px 32px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  white-space: nowrap;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.btn .arr {
  display: inline-block;
  transition: transform 0.25s ease;
}

.btn:hover .arr {
  transform: translateX(4px);
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn--primary:hover {
  background: var(--accent-deep);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 25%, transparent);
}

.btn--ghost {
  background: transparent;
  color: var(--paper);
  border-color: color-mix(in srgb, var(--paper) 28%, transparent);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn--sm {
  padding: 12px 24px;
}

/* ---- Fixed nav ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: transform 0.35s ease, border-color 0.3s ease;
}

.nav--tucked {
  transform: translateY(-100%);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 30px;
  height: 76px;
}

.nav__logo {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.nav__logo img {
  width: 146px;
  height: 44px;
  object-fit: contain;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
}

.nav__links a {
  position: relative;
  font-size: 14px;
  font-weight: 600;
  color: var(--paper);
  padding: 6px 0;
}

/* width 0 to 100% underline grow */
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.nav__links a:hover::after {
  transform: scaleX(1);
}

.nav__cta {
  flex-shrink: 0;
}

/* ---- Hamburger (under 860px) ---- */
.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border-radius: 10px;
}

.nav__burger span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--paper);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

body.menu-open .nav__burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.menu-open .nav__burger span:nth-child(2) {
  opacity: 0;
}

body.menu-open .nav__burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- Mobile menu overlay ---- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--ink);
  padding: 130px 34px 40px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

body.menu-open .mobile-menu {
  visibility: visible;
  opacity: 1;
}

body.menu-open {
  overflow: hidden;
}

.mobile-menu__links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 26px;
}

.mobile-menu__links > a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 34px;
  letter-spacing: 1px;
  color: var(--paper);
}

.mobile-menu__links > a:hover {
  color: var(--accent);
}

.mobile-menu__links > a.btn {
  font-family: var(--font-body);
  font-size: 15px;
  letter-spacing: 0;
  margin-top: 14px;
  color: var(--accent-ink);
}

/* ---- Sticky CTA bar (desktop pointer only, driven by site.js) ---- */
.cta-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  height: 58px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform 0.35s ease, visibility 0.35s ease;
}

.cta-bar--show {
  transform: translateY(0);
  visibility: visible;
}

.cta-bar__mark {
  color: var(--accent);
  display: inline-flex;
}

.cta-bar__text {
  font-size: 14px;
  font-weight: 600;
  color: var(--paper);
}

/* the bar is a desktop pattern; keep it out of the way on touch layouts */
@media (max-width: 860px) {
  .cta-bar {
    display: none;
  }
}

/* ---- Responsive nav ---- */
@media (max-width: 1120px) {
  /* the pill CTA already says get in touch */
  .nav__links .nav__link-contact {
    display: none;
  }

  .nav__inner {
    gap: 22px;
  }

  .nav__links {
    gap: 22px;
  }
}

@media (max-width: 860px) {
  .nav__links,
  .nav__cta {
    display: none;
  }

  .nav__burger {
    display: flex;
  }

  .nav__inner {
    height: 64px;
  }

  .nav__logo img {
    width: 113px;
    height: 34px;
  }

  html {
    scroll-padding-top: 78px;
  }
}

/* ---- Section rhythm on small screens ---- */
@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

  .section {
    padding: 72px 0;
  }

  .container {
    padding: 0 20px;
  }

  h3 {
    font-size: 21px;
  }

  .section__intro {
    margin-bottom: 40px;
  }
}

/* ---- Reduced motion: base layer ---- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .btn .arr,
  .nav__links a::after,
  .skip-link {
    transition: none;
  }
}
