/* ============================================================
   AltaNotary — Premium Mobile Notary
   Global Stylesheet / Design System
   ------------------------------------------------------------
   Art direction: editorial luxury. High-contrast serif display,
   refined grotesque body, generous negative space, gold hairlines.
   ============================================================ */

/* -------------------- 1. Design Tokens -------------------- */
:root {
  /* Brand */
  --navy: #002868;
  --gold: #c9a45d;
  --offwhite: #f7f7f5;
  --charcoal: #2b2b2b;

  /* Derived palette */
  --navy-900: #001a45;
  --navy-700: #002868;
  --navy-600: #123a82;
  --navy-tint: #e9edf4;
  --gold-300: #e3cd9b;
  --gold-600: #b08a3e;
  --gold-soft: rgba(201, 164, 93, 0.14);
  --paper: #fbfbf9;
  --line: rgba(43, 43, 43, 0.12);
  --line-gold: rgba(201, 164, 93, 0.4);
  --ink: #1c2433;
  --muted: #5c6470;

  /* Type */
  --display: "Fraunces", "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Fluid type scale (clamp) */
  --fs-eyebrow: 0.78rem;
  --fs-body: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --fs-lead: clamp(1.15rem, 1.05rem + 0.5vw, 1.5rem);
  --fs-h4: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  --fs-h3: clamp(1.5rem, 1.2rem + 1.2vw, 2.2rem);
  --fs-h2: clamp(2rem, 1.4rem + 2.6vw, 3.4rem);
  --fs-h1: clamp(2.6rem, 1.6rem + 4.6vw, 5.4rem);
  --fs-mega: clamp(3.4rem, 1.2rem + 9vw, 9rem);

  /* Spacing / layout */
  --maxw: 1240px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --section-y: clamp(2.1rem, 3.6vw, 4rem);
  --radius: 4px;
  --radius-lg: 10px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.6s;

  --shadow-soft: 0 24px 60px -28px rgba(0, 26, 69, 0.45);
  --shadow-card: 0 18px 50px -30px rgba(0, 26, 69, 0.35);

  /* Breakpoints: 620 mobile form, 768 tablet, 940 nav, 1024 wide layout */
  --bp-mobile: 620px;
  --bp-tablet: 768px;
  --bp-nav: 940px;
  --bp-wide: 1024px;
}

/* -------------------- 2. Reset -------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--charcoal);
  background: var(--offwhite);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

@media (max-width: 767px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .container {
    width: 100%;
  }
}
img,
svg,
picture {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  cursor: pointer;
}
ul {
  list-style: none;
  padding: 0;
}
h1,
h2,
h3,
h4 {
  font-family: var(--display);
  font-weight: 380;
  line-height: 1.04;
  letter-spacing: -0.015em;
  color: var(--navy);
}
::selection {
  background: var(--navy);
  color: var(--offwhite);
}

/* -------------------- 3. Layout primitives -------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide {
  max-width: 1440px;
}
.section {
  padding-block: var(--section-y);
  position: relative;
}
.section--tight {
  padding-block: clamp(2rem, 3.4vw, 3.25rem);
}
.grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 3rem);
}
.split {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3.75rem);
  align-items: start;
}
@media (min-width: 880px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
  .split--6040 {
    grid-template-columns: 1.4fr 1fr;
  }
  .split--4060 {
    grid-template-columns: 1fr;
    gap: clamp(1.25rem, 2.6vw, 2.4rem);
  }
  .split--4060 > .reveal:first-child {
    max-width: 760px;
  }
  .split--4060 > .reveal:first-child .display-h2 {
    max-width: 24ch !important;
  }
  .split--4060 .lead {
    max-width: 62ch;
  }
  .split--4060 .mt-2 {
    margin-top: 1.25rem;
  }
  .split--4060 .mt-3 {
    margin-top: 1.5rem;
  }
}

/* -------------------- 4. Typography helpers -------------------- */
.eyebrow {
  font-family: var(--sans);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-600);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.eyebrow::before {
  content: "";
  width: 30px;
  height: 1px;
  background: var(--gold);
}
.eyebrow--center::before {
  display: none;
}
.display-h1 {
  font-size: var(--fs-h1);
}
.display-h2 {
  font-size: var(--fs-h2);
}
.lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--muted);
  font-weight: 360;
}
.serif-accent {
  font-family: var(--display);
  font-style: italic;
  color: var(--gold-600);
}
.text-center {
  text-align: center;
}
.measure {
  max-width: 56ch;
}
.measure-sm {
  max-width: 42ch;
}

/* -------------------- 5. Buttons -------------------- */
.btn {
  --btn-bg: var(--navy);
  --btn-fg: var(--offwhite);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1.05rem 1.9rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--btn-bg);
  border-radius: 999px;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease),
    color 0.4s var(--ease);
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: translateY(101%);
  transition: transform 0.5s var(--ease);
  z-index: -1;
}
.btn:hover {
  color: var(--navy);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}
.btn:hover::after {
  transform: translateY(0);
}
.btn .arrow {
  transition: transform 0.4s var(--ease);
}
.btn:hover .arrow {
  transform: translateX(4px);
}
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--navy);
  border-color: var(--line-gold);
}
.btn--ghost:hover {
  color: var(--navy);
}
.btn--gold {
  --btn-bg: var(--gold);
  --btn-fg: var(--navy);
}
.btn--gold::after {
  background: var(--navy);
}
.btn--gold:hover {
  color: var(--offwhite);
}
.btn--light {
  --btn-bg: var(--offwhite);
  --btn-fg: var(--navy);
}
.btn--light::after {
  background: var(--gold);
}
.btn--block {
  width: 100%;
  justify-content: center;
}
.btn--lg {
  padding: 1.2rem 2.4rem;
}

.link-underline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: var(--navy);
  padding-bottom: 2px;
  background-image: linear-gradient(var(--gold), var(--gold));
  background-size: 0% 1.5px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.4s var(--ease), gap 0.3s var(--ease);
}
.link-underline:hover {
  background-size: 100% 1.5px;
  gap: 0.85rem;
}

/* -------------------- 6. Header / Nav -------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: transform 0.5s var(--ease), background 0.4s var(--ease),
    box-shadow 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}
.site-header.is-hidden {
  transform: translateY(-105%);
}
.site-header.is-scrolled {
  background: rgba(247, 247, 245, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: clamp(68px, 8vw, 92px);
}
.brand {
  display: inline-flex;
  align-items: center;
  width: clamp(138px, 14vw, 184px);
  height: 54px;
  color: var(--navy);
}
.brand__logo {
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}
.site-footer .brand__logo {
  filter: brightness(0) invert(1);
}
.nav__menu {
  display: none;
  align-items: center;
  gap: clamp(1.5rem, 2.6vw, 2.8rem);
}
.nav__link {
  position: relative;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--charcoal);
  padding: 0.4rem 0;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.nav__link:hover::after,
.nav__link[aria-current="page"]::after {
  transform: scaleX(1);
}
.nav__link[aria-current="page"] {
  color: var(--navy);
}
.nav__cta {
  display: none;
}
@media (min-width: 940px) {
  .nav__menu,
  .nav__cta {
    display: flex;
  }
}

/* Mobile menu */
.nav__toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 46px;
  height: 46px;
  padding: 0 11px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
}
@media (min-width: 940px) {
  .nav__toggle {
    display: none;
  }
}
.nav__toggle span {
  height: 1.5px;
  background: var(--navy);
  transition: transform 0.4s var(--ease), opacity 0.3s var(--ease);
}
body.menu-open .nav__toggle span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
body.menu-open .nav__toggle span:nth-child(2) {
  opacity: 0;
}
body.menu-open .nav__toggle span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--navy);
  color: var(--offwhite);
  padding: clamp(6rem, 14vh, 9rem) var(--gutter) 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.7s var(--ease);
  pointer-events: none;
}
body.menu-open .mobile-menu {
  clip-path: inset(0 0 0 0);
  pointer-events: auto;
}
.mobile-menu__links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.mobile-menu__links a {
  font-family: var(--display);
  font-size: clamp(2rem, 9vw, 3.2rem);
  color: var(--offwhite);
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(247, 247, 245, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
body.menu-open .mobile-menu__links a {
  opacity: 1;
  transform: none;
  transition-delay: calc(0.08s * var(--i, 0) + 0.15s);
}
.mobile-menu__links a span {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--gold-300);
}
.mobile-menu__foot {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: var(--gold-300);
  font-size: 0.9rem;
}

/* -------------------- 7. Footer -------------------- */
.site-footer {
  background: var(--navy-900);
  color: rgba(247, 247, 245, 0.7);
  padding-block: clamp(3rem, 5vw, 4.75rem) 2rem;
  position: relative;
  overflow: hidden;
}
.site-footer h2 {
  color: var(--offwhite);
}
.footer-cta {
  display: grid;
  gap: 2rem;
  align-items: end;
  padding-bottom: clamp(2rem, 4vw, 3.5rem);
  border-bottom: 1px solid rgba(247, 247, 245, 0.14);
}
@media (min-width: 820px) {
  .footer-cta {
    grid-template-columns: 1.6fr 1fr;
  }
  .footer-cta__action {
    justify-self: end;
    text-align: right;
  }
}
.footer-grid {
  display: grid;
  gap: 2.5rem;
  padding-top: clamp(2.5rem, 5vw, 4rem);
}
@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}
.footer-col h4 {
  color: var(--gold-300);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.footer-col a:hover {
  color: var(--gold-300);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  margin-top: clamp(3rem, 5vw, 4rem);
  padding-top: 1.6rem;
  border-top: 1px solid rgba(247, 247, 245, 0.1);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}
.footer-watermark {
  position: absolute;
  bottom: -3vw;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--display);
  font-size: clamp(6rem, 24vw, 22rem);
  line-height: 1;
  color: rgba(201, 164, 93, 0.05);
  pointer-events: none;
  white-space: nowrap;
  font-style: italic;
}

/* -------------------- 8. Reveal / motion utilities -------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--delay, 0s);
  will-change: opacity, transform;
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
.reveal-clip {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.1s var(--ease);
  transition-delay: var(--delay, 0s);
}
.reveal-clip.is-in {
  clip-path: inset(0 0 0 0);
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal,
  .reveal-clip {
    opacity: 1;
    transform: none;
    clip-path: none;
  }
}

/* Section heading block */
.section-head {
  display: grid;
  gap: 1.2rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-head--center {
  justify-items: center;
  text-align: center;
}
.section-head--row {
  gap: 1.5rem;
}
@media (min-width: 860px) {
  .section-head--row {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

/* Hairline divider with gold node */
.rule {
  height: 1px;
  background: var(--line);
  position: relative;
}
.rule::before {
  content: "";
  position: absolute;
  left: 0;
  top: -2.5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}
