/* Cresta Group — shared styles */

:root {
  --ink: #161838;
  --ink-soft: #2a2d55;
  --violet: #7b2ca6;
  --violet-dark: #5e1f82;
  --plum: #b34cbf;
  --paper: #f4f5f9;
  --white: #ffffff;
  --slate: #4b4f6b;
  --line: #d9dce7;
  --on-ink: #e9e8f6;
  --on-ink-muted: #a9a9cc;

  --font: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --measure: 62ch;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

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

a { color: var(--violet); text-underline-offset: 3px; }
a:hover { color: var(--violet-dark); }

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

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink); color: var(--white); padding: 8px 14px; z-index: 10;
}
.skip:focus { left: 8px; }

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

/* ---------- Type scale ---------- */
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.5rem, 6.2vw, 4.75rem); line-height: 1.02; font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); line-height: 1.1; }
h3 { font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.01em; }
p { margin: 0; max-width: var(--measure); }
.lede { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.55; color: var(--slate); }

/* ---------- Header ---------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 76px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--ink); text-decoration: none;
}
.brand img { width: auto; height: 42px; }
.brand-name { font-weight: 800; font-size: 1.1875rem; letter-spacing: -0.02em; line-height: 1; }
.brand-name span { font-weight: 500; color: var(--slate); }

.nav { display: flex; gap: 4px; }
.nav a {
  color: var(--slate); text-decoration: none; font-weight: 500;
  padding: 8px 12px; border-radius: 6px;
}
.nav a:hover { color: var(--ink); background: var(--paper); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--violet); border-radius: 0; }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: 8px;
  font: inherit; font-weight: 600; text-decoration: none;
  border: 1.5px solid transparent;
}
.btn-primary { background: var(--violet); color: var(--white); }
.btn-primary:hover { background: var(--violet-dark); color: var(--white); }
.btn-quiet { border-color: var(--ink); color: var(--ink); }
.btn-quiet:hover { background: var(--ink); color: var(--white); }

/* ---------- Hero ---------- */
.hero { background: var(--white); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero .wrap {
  display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center;
  gap: clamp(24px, 5vw, 72px);
  padding-top: clamp(56px, 9vw, 120px);
  padding-bottom: clamp(56px, 9vw, 120px);
}
.hero h1 { max-width: 13ch; }
.hero .lede { margin-top: 28px; }

.crest { width: 100%; max-width: 440px; justify-self: end; }
.crest path { fill: none; stroke-linecap: square; stroke-linejoin: miter; }

/* One orchestrated moment: the crest draws itself in, band by band. */
@media (prefers-reduced-motion: no-preference) {
  .crest path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: draw 1.1s cubic-bezier(.65,0,.35,1) forwards;
  }
  .crest path:nth-child(2) { animation-delay: .12s; }
  .crest path:nth-child(3) { animation-delay: .24s; }
  .crest path:nth-child(4) { animation-delay: .36s; }
  .crest path:nth-child(5) { animation-delay: .48s; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Page intro (inner pages) ---------- */
.page-intro { background: var(--white); border-bottom: 1px solid var(--line); }
.page-intro .wrap { padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(40px, 6vw, 72px); }
.page-intro h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); max-width: 16ch; }
.page-intro .lede { margin-top: 20px; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-head { display: grid; gap: 16px; margin-bottom: clamp(32px, 4vw, 48px); }
.section-head p { color: var(--slate); }

/* Columns separated by a top rule, not boxed cards */
.columns {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 3vw, 40px);
  margin: 0; padding: 0; list-style: none;
}
.columns > li { border-top: 2px solid var(--ink); padding-top: 20px; }
.columns h3 { margin-bottom: 10px; }
.columns p { color: var(--slate); }

/* ---------- Company feature ---------- */
.company {
  display: grid; grid-template-columns: 200px 1fr; gap: clamp(24px, 4vw, 56px);
  align-items: start;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  padding: clamp(24px, 4vw, 48px);
}
.company-logo {
  display: grid; place-items: center; aspect-ratio: 1;
  background: var(--paper); border-radius: 10px; padding: 28px;
}
.company-logo img { width: 100%; height: auto; }
.company h2, .company h3 { margin-bottom: 6px; }
.company .tagline { color: var(--slate); font-size: 1.125rem; }
.company .body { margin-top: 20px; display: grid; gap: 14px; }
.company .actions { margin-top: 28px; }

.facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 32px; margin: 28px 0 0; padding: 0; list-style: none;
}
.facts li { padding-left: 18px; position: relative; color: var(--slate); }
.facts li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 8px; height: 8px; border-top: 2px solid var(--violet); border-right: 2px solid var(--violet);
  transform: rotate(45deg);
}
.facts strong { color: var(--ink); font-weight: 600; }

.detail-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px); margin-top: clamp(40px, 5vw, 64px);
}
.detail-grid h3 { margin-bottom: 10px; }
.detail-grid p + p { margin-top: 12px; }
.detail-grid p { color: var(--slate); }

/* ---------- Ink band (veteran-operated) ---------- */
.band { background: var(--ink); color: var(--on-ink); }
.band .wrap {
  display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 5vw, 72px);
  align-items: center; padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(48px, 7vw, 88px);
}
.band h2 { color: var(--white); max-width: 16ch; }
.band p { color: var(--on-ink-muted); }
.band p + p { margin-top: 14px; }
.chevrons { width: clamp(72px, 9vw, 112px); }
.chevrons path { fill: none; stroke-width: 9; }

/* ---------- Two-up text ---------- */
.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(24px, 6vw, 96px); align-items: start; }
.split .stack { display: grid; gap: 16px; }
.split .stack p { color: var(--slate); }

/* ---------- Contact ---------- */
.contact { border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 72px); align-items: end; }
.contact dl { margin: 0; display: grid; gap: 18px; }
.contact dt { font-size: .9375rem; color: var(--slate); }
.contact dd { margin: 2px 0 0; font-size: 1.25rem; font-weight: 600; }
.contact dd a { color: var(--ink); text-decoration-color: var(--violet); text-decoration-thickness: 2px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--white); border-top: 1px solid var(--line); font-size: .9375rem; color: var(--slate); }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px 32px; padding-top: 32px; padding-bottom: 32px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: var(--slate); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- 404 ---------- */
.notfound { min-height: 60vh; display: grid; align-content: center; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .crest { order: -1; justify-self: start; max-width: 200px; }
  .columns { grid-template-columns: 1fr; }
  .company { grid-template-columns: 1fr; }
  .company-logo { width: 120px; padding: 18px; }
  .detail-grid, .split, .contact-grid { grid-template-columns: 1fr; }
  .band .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .site-header .wrap { flex-wrap: wrap; padding-top: 12px; padding-bottom: 8px; min-height: 0; }
  .nav { width: 100%; margin-left: -12px; }
  .brand-name span { display: none; }
  .facts { grid-template-columns: 1fr; }
  .btn { width: 100%; }
}
