/* =========================================================
   The Alignment Company — Global Stylesheet
   Brand: warm ivory · charcoal ink · soft taupe accent
   Type:  Cormorant Garamond (display) + Inter (body)
   ========================================================= */

/* ---------- Design Tokens ---------- */
:root {
  /* Color */
  --canvas:      #F5F0E8;  /* page background (warm ivory) */
  --warm-white:  #FBF8F2;  /* raised surfaces, cards, fields */
  --ink:         #2B2A26;  /* primary text, headings, primary button */
  --ink-hover:   #3A3833;  /* button hover */
  --slate:       #5C584F;  /* secondary text */
  --taupe:       #9A8E7D;  /* accent: labels, links, icons */
  --taupe-mist:  #BCB2A3;  /* decorative lines */
  --line:        #D9D2C6;  /* borders, dividers, hairlines */

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

  /* Layout */
  --max: 1140px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(3.5rem, 8vw, 7.5rem);
  --radius: 5px;
  --shadow: 0 1px 2px rgba(43, 42, 38, .04), 0 8px 30px rgba(43, 42, 38, .05);
  --transition: 220ms ease;
}

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

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;      /* 17px */
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--ink); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--taupe); }

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

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

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: .005em;
}

h1 { font-size: clamp(2.25rem, 5.2vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.375rem); }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.5rem); font-weight: 600; }

p { margin: 0 0 1.15rem; max-width: 65ch; }

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.6;
  color: var(--slate);
}

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

.serif-accent { font-family: var(--serif); }

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

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--warm { background: var(--warm-white); }

.section-head { max-width: 60ch; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center p { margin-inline: auto; }

.divider {
  width: 56px; height: 2px;
  background: var(--taupe-mist);
  border: 0; margin: 0 0 1.5rem;
}
.center .divider { margin-inline: auto; }

.hairline { border: 0; border-top: 1px solid var(--line); margin: 0; }

.text-center { text-align: center; }

/* ---------- Brand statement (Vision / Mission style) ---------- */
.statement {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  line-height: 1.45;
  color: var(--ink);
  margin: .25rem 0 0;
  font-weight: 500;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--sans);
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: .01em;
  padding: .85rem 1.6rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}
.btn:hover { transform: translateY(-1px); }

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

.btn--secondary { background: transparent; color: var(--ink); border-color: var(--taupe); }
.btn--secondary:hover { background: rgba(154, 142, 125, .12); color: var(--ink); }

.btn--block { width: 100%; justify-content: center; }

.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; }
.center .btn-row { justify-content: center; }

.link-arrow {
  font-weight: 600;
  color: var(--taupe);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.link-arrow .arrow { transition: transform var(--transition); }
.link-arrow:hover .arrow { transform: translateX(4px); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 240, 232, .88);
  backdrop-filter: saturate(120%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 76px;
}

/* Logo lockup */
.brand { display: flex; align-items: center; gap: .7rem; }
.brand:hover { color: var(--ink); }
.brand__mark { flex: 0 0 auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
}
.brand__sub {
  font-family: var(--sans);
  font-size: .58rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--taupe);
  margin-top: 3px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2.25rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  font-size: .9375rem;
  font-weight: 500;
  color: var(--slate);
  position: relative;
  padding-block: .25rem;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a.is-active { color: var(--ink); }
.nav__links a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1.5px;
  background: var(--taupe);
}

.nav__cta { display: flex; align-items: center; gap: 1rem; }

.nav__toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: .5rem;
  margin: -.5rem;
}
.nav__toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform var(--transition), opacity var(--transition);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(4rem, 10vw, 8.5rem); text-align: center; }
.hero__inner { max-width: 760px; margin-inline: auto; }
.hero h1 { margin-bottom: .35em; }
.hero .lead { margin-inline: auto; margin-bottom: 2.25rem; }

/* Thin workflow-line motif */
.flow-motif {
  margin: clamp(3rem, 6vw, 4.5rem) auto 0;
  max-width: 620px;
  opacity: .9;
}

/* ---------- Generic page header (inner pages) ---------- */
.page-header { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2rem, 4vw, 3rem); }
.page-header__inner { max-width: 720px; }

/* ---------- Card grid ---------- */
.grid { display: grid; gap: clamp(1.25rem, 2.5vw, 1.75rem); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--warm-white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 2.5vw, 2rem);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--taupe-mist); }
.card__icon { color: var(--taupe); margin-bottom: 1.1rem; }
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--slate); margin-bottom: 0; font-size: .98rem; }

/* ---------- Benefits ---------- */
.benefit { padding-right: 1rem; }
.benefit h3 { font-size: 1.3rem; margin-bottom: .35rem; }
.benefit p { color: var(--slate); margin-bottom: 0; font-size: .98rem; }
.benefit__bar { width: 32px; height: 2px; background: var(--taupe-mist); margin-bottom: 1rem; }

/* ---------- Process steps ---------- */
.steps { counter-reset: step; }
.step { position: relative; }
.step__num {
  font-family: var(--serif);
  font-size: 2.5rem;
  color: var(--taupe-mist);
  line-height: 1;
  margin-bottom: .5rem;
}
.step h3 { margin-bottom: .35rem; }
.step p { color: var(--slate); margin-bottom: 0; font-size: .98rem; }

/* ---------- Service detail blocks (Services page) ---------- */
.service {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(2.75rem, 5vw, 4rem);
}
.service + .service { border-top: 1px solid var(--line); }
.service__media { display: flex; justify-content: center; color: var(--taupe); }
.service:nth-child(even) .service__body { order: 2; }
.service:nth-child(even) .service__media { order: 1; }

.service__num {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--taupe);
  letter-spacing: .1em;
}
.service h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: .25rem 0 1.25rem; }

.pso { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.pso__label {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--taupe);
  display: block;
  margin-bottom: .25rem;
}
.pso p { margin: 0; color: var(--slate); font-size: .99rem; }

/* ---------- CTA banner ---------- */
.cta-banner { background: var(--ink); color: var(--canvas); text-align: center; }
.cta-banner h2 { color: var(--canvas); }
.cta-banner p { color: rgba(245, 240, 232, .8); margin-inline: auto; margin-bottom: 2rem; }
.cta-banner .btn--primary { background: var(--canvas); color: var(--ink); }
.cta-banner .btn--primary:hover { background: #fff; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.form-field { margin-bottom: 1.25rem; }
.form-field label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--slate);
  margin-bottom: .45rem;
}
.form-field input,
.form-field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  background: var(--warm-white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .8rem .9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--taupe);
  box-shadow: 0 0 0 3px rgba(154, 142, 125, .15);
}
.form-field textarea { min-height: 140px; resize: vertical; }

.form-note { font-size: .85rem; color: var(--slate); margin-top: .25rem; }
.form-success {
  display: none;
  background: rgba(154, 142, 125, .12);
  border: 1px solid var(--taupe-mist);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  color: var(--ink);
  margin-bottom: 1.25rem;
}
.form-success.show { display: block; }

.contact-aside {
  background: var(--warm-white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2rem);
}
.contact-aside h3 { font-size: 1.3rem; }
.contact-list { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: 1.25rem; }
.contact-list li { display: flex; gap: .85rem; align-items: flex-start; }
.contact-list .ic { color: var(--taupe); flex: 0 0 auto; margin-top: 3px; }
.contact-list .lbl { display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--taupe); margin-bottom: 1px; }
.contact-list a, .contact-list span { color: var(--ink); font-size: .97rem; word-break: break-word; }

/* ---------- Footer ---------- */
.site-footer { background: var(--warm-white); border-top: 1px solid var(--line); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding-block: clamp(2.75rem, 5vw, 4rem);
}
.footer-brand .brand__name { color: var(--ink); }
.footer-brand p { color: var(--slate); font-size: .95rem; margin: 1rem 0 0; max-width: 32ch; }
.footer-col h4 {
  font-family: var(--sans);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--taupe);
  margin: 0 0 1rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.footer-col a { color: var(--slate); font-size: .95rem; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-block: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem;
  font-size: .85rem;
  color: var(--slate);
}

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

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .nav__links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--canvas);
    border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1.25rem;
    box-shadow: var(--shadow);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links li { width: 100%; }
  .nav__links a { display: block; width: 100%; padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .nav__links a.is-active::after { display: none; }
  .nav__toggle { display: block; }
  .nav__cta .btn { display: none; }          /* CTA lives inside the menu on mobile */
  .nav__links .nav__cta-mobile { display: block; padding-top: 1rem; }
  .nav__links .nav__cta-mobile .btn { display: inline-flex; }

  .service { grid-template-columns: 1fr; gap: 1.5rem; }
  .service:nth-child(even) .service__body,
  .service:nth-child(even) .service__media { order: 0; }
  .service__media { order: -1 !important; }

  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
}

/* Desktop: hide the in-menu mobile CTA */
@media (min-width: 761px) {
  .nav__links .nav__cta-mobile { display: none; }
}

/* ---------- Motion / print preferences ---------- */
@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; }
}
