/* ==========================================================
   J-Square Consulting — shared stylesheet
   Palette & line language from logo Concept 03 "Minimal Contour"
   ========================================================== */

:root {
  --navy: #0E1F3D;
  --navy-deep: #0A1730;
  --navy-2: #162B52;
  --blue: #2A55A3;
  --blue-2: #3A68B8;
  --gold: #C8A55A;
  --gold-light: #E3C987;
  --gold-dark: #A8853A;
  --slate: #8EA3B8;
  --mist: #EEF2F7;
  --paper: #F8FAFC;
  --white: #FFFFFF;
  --ink: #0E1F3D;
  --muted: #4A5B74;
  --line: #D6DEE8;

  --radius: 18px;
  --radius-sm: 10px;
  --max: 1160px;
  --header-h: 76px;
  --ease: cubic-bezier(.65, 0, .35, 1);

  --font-head: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Page-to-page line transition ----------
   1) Cross-document View Transitions (Chrome/Edge, Safari 18.2+):
      the new page is revealed with a left-to-right wipe.
   2) Everywhere: a blue + gold line sweeps across the top on load. */
@view-transition { navigation: auto; }

::view-transition-old(root) { animation: vt-out .45s var(--ease) both; }
::view-transition-new(root) { animation: vt-in .7s var(--ease) both; }

@keyframes vt-out { to { opacity: 0; transform: translateX(-24px); } }
@keyframes vt-in {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

.site-header { view-transition-name: site-header; }
.site-footer { view-transition-name: site-footer; }

body::before,
body::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 200;
  pointer-events: none;
  transform: scaleX(0);
}
body::before { top: 0; background: var(--blue); animation: line-sweep 1.2s var(--ease) both; }
body::after  { top: 6px; background: linear-gradient(90deg, var(--gold-light), var(--gold-dark)); animation: line-sweep 1.2s .14s var(--ease) both; }

@keyframes line-sweep {
  0%     { transform: scaleX(0); transform-origin: left; }
  50%    { transform: scaleX(1); transform-origin: left; }
  50.1%  { transform: scaleX(1); transform-origin: right; }
  100%   { transform: scaleX(0); transform-origin: right; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.15;
  letter-spacing: -.015em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }
ul { padding: 0; margin: 0; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 300;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

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

/* ---------- Eyebrow with double line ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 40px;
  height: 8px;
  background:
    linear-gradient(var(--blue), var(--blue)) left top / 100% 2px no-repeat,
    linear-gradient(var(--gold), var(--gold)) right bottom / 70% 2px no-repeat;
  transform-origin: left;
  animation: grow-x .9s .3s var(--ease) both;
}
.on-dark .eyebrow, .page-hero .eyebrow { color: var(--gold-light); }
.on-dark .eyebrow::before, .page-hero .eyebrow::before {
  background:
    linear-gradient(var(--blue-2), var(--blue-2)) left top / 100% 2px no-repeat,
    linear-gradient(var(--gold-light), var(--gold-light)) right bottom / 70% 2px no-repeat;
}
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding: .9em 1.6em;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  line-height: 1;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background-color .3s, color .3s;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, var(--gold-dark));
  color: var(--navy);
  box-shadow: 0 8px 24px -10px rgba(168, 133, 58, .7);
}
.btn-gold:hover { box-shadow: 0 14px 30px -10px rgba(168, 133, 58, .8); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--navy-2); }
.btn-outline { border-color: var(--blue); color: var(--blue); background: transparent; }
.btn-outline:hover { background: var(--blue); color: #fff; }
.on-dark .btn-outline { border-color: rgba(255,255,255,.5); color: #fff; }
.on-dark .btn-outline:hover { background: #fff; color: var(--navy); }
.btn-sm { padding: .7em 1.2em; font-size: .88rem; }
.arrow { transition: transform .3s var(--ease); }
a:hover .arrow { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 250, 252, .92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background:
    linear-gradient(var(--blue), var(--blue)) left top / 100% 1px no-repeat,
    linear-gradient(90deg, transparent, var(--gold) 25%, var(--gold) 75%, transparent) left bottom / 100% 1px no-repeat;
  opacity: .5;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 44px; height: 44px; }
.brand-text { display: flex; flex-direction: column; }
.brand-name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.65rem;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--navy);
}
.brand-tag {
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 5px;
}

.site-nav { display: flex; align-items: center; gap: 32px; }
.site-nav ul { display: flex; gap: 28px; list-style: none; }
.site-nav ul a {
  position: relative;
  display: inline-block;
  padding: 6px 0;
  text-decoration: none;
  color: var(--navy);
  font-weight: 500;
  font-size: .97rem;
  background:
    linear-gradient(var(--gold), var(--gold)) left bottom / 0 2px no-repeat;
  transition: background-size .45s var(--ease), color .3s;
}
.site-nav ul a:hover,
.site-nav ul a[aria-current="page"] { background-size: 100% 2px; }
.site-nav ul a[aria-current="page"] { color: var(--blue); font-weight: 600; }

/* Mobile menu — CSS-only toggle */
.nav-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.nav-toggle-label { display: none; }

@media (max-width: 860px) {
  .nav-toggle-label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 46px;
    height: 46px;
    padding: 0 10px;
    border-radius: 12px;
    border: 1px solid var(--line);
    cursor: pointer;
  }
  .nav-toggle-label span {
    display: block;
    height: 2px;
    border-radius: 2px;
    transition: transform .35s var(--ease), opacity .25s;
  }
  .nav-toggle-label span:nth-child(1) { background: var(--blue); }
  .nav-toggle-label span:nth-child(2) { background: var(--gold); width: 70%; margin-left: auto; }
  .nav-toggle-label span:nth-child(3) { background: var(--navy); }
  .nav-toggle:checked + .nav-toggle-label span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle:checked + .nav-toggle-label span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked + .nav-toggle-label span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .nav-toggle:focus-visible + .nav-toggle-label { outline: 3px solid var(--gold); outline-offset: 2px; }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 8px 20px 28px;
    background: var(--paper);
    border-bottom: 2px solid var(--gold);
    box-shadow: 0 20px 30px -20px rgba(14, 31, 61, .35);
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path .5s var(--ease), visibility 0s .5s;
  }
  .nav-toggle:checked ~ .site-nav {
    clip-path: inset(0 0 0 0);
    visibility: visible;
    transition: clip-path .5s var(--ease), visibility 0s 0s;
  }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .site-nav .btn { align-self: flex-start; }
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--mist); }
.section-dark { background: var(--navy); color: #C9D4E3; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { max-width: 700px; margin-bottom: 52px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.section-dark .section-head p { color: #A9B7CB; }
.section-foot { margin-top: 40px; }

.text-link {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  background: linear-gradient(var(--gold), var(--gold)) left bottom / 0 2px no-repeat;
  padding-bottom: 3px;
  transition: background-size .45s var(--ease);
}
.text-link:hover { background-size: 100% 2px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 88px 0 100px;
  overflow: hidden;
  background:
    radial-gradient(60% 70% at 85% 30%, rgba(42, 85, 163, .10), transparent 70%),
    radial-gradient(40% 50% at 70% 90%, rgba(200, 165, 90, .12), transparent 70%),
    var(--paper);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 56px;
  align-items: center;
}
.hero h1 .hl {
  background: linear-gradient(90deg, var(--gold-light), var(--gold)) left 92% / 0 .14em no-repeat;
  animation: underline 1s .9s var(--ease) forwards;
}
@keyframes underline { to { background-size: 100% .14em; } }
.hero-lead { font-size: 1.2rem; color: var(--muted); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-art { justify-self: center; width: 100%; max-width: 480px; }

/* Rise-in for hero content */
.rise { animation: rise .9s var(--ease) both; }
.rise-2 { animation-delay: .12s; }
.rise-3 { animation-delay: .24s; }
.rise-4 { animation-delay: .36s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- Capability strip ---------- */
.strip { background: var(--navy); color: #C9D4E3; padding: 22px 0; }
.strip ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 0;
  list-style: none;
}
.strip li {
  font-family: var(--font-head);
  font-size: .88rem;
  font-weight: 500;
  letter-spacing: .04em;
  padding: 0 22px;
  position: relative;
}
.strip li + li::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 1px; height: 16px;
  transform: translateY(-50%);
  background: linear-gradient(var(--blue-2), var(--gold));
}

/* ---------- Cards (blue frame draws, gold frame interlocks) ---------- */
.grid-2, .grid-3, .grid-4 { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative;
  display: block;
  padding: 32px 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s;
}
.card::before,
.card::after {
  content: "";
  position: absolute;
  border-radius: inherit;
  pointer-events: none;
}
.card::before {
  inset: -1px;
  border: 2px solid var(--blue);
  clip-path: inset(0 100% 100% 0);
  transition: clip-path .7s var(--ease);
}
.card::after {
  inset: 10px -10px -10px 10px;
  border: 2px solid var(--gold);
  opacity: 0;
  transform: translate(-10px, -10px);
  transition: opacity .45s var(--ease), transform .55s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -28px rgba(14, 31, 61, .45); border-color: transparent; }
.card:hover::before { clip-path: inset(0 0 0 0); }
.card:hover::after { opacity: 1; transform: none; }
.card p { color: var(--muted); margin-bottom: 0; }
.card h3 { margin-bottom: .4em; }

.card-num {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .1em;
  color: var(--gold-dark);
  margin-bottom: 18px;
}
.card-num::after {
  content: "";
  flex: 0 0 28px;
  height: 2px;
  background: var(--blue);
  transition: flex-basis .5s var(--ease);
}
.card:hover .card-num::after { flex-basis: 64px; }

.tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  color: var(--gold-dark);
  margin-bottom: 16px;
}

/* Dark cards */
.section-dark .card { background: var(--navy-2); border-color: rgba(255,255,255,.08); }
.section-dark .card p { color: #A9B7CB; }
.section-dark .card::before { border-color: var(--blue-2); }
.section-dark .card::after { border-color: var(--gold-light); }

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  list-style: none;
  counter-reset: step;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  top: 27px; left: 28px; right: 28px;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--gold));
  opacity: .5;
}
.steps li { position: relative; counter-increment: step; }
.steps li::before {
  content: "0" counter(step);
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  margin-bottom: 20px;
  border-radius: 16px;
  background: var(--paper);
  border: 2px solid var(--blue);
  box-shadow: 6px -6px 0 -2px var(--paper), 6px -6px 0 0 var(--gold);
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--navy);
  position: relative;
}
.section-alt .steps li::before { background: var(--mist); box-shadow: 6px -6px 0 -2px var(--mist), 6px -6px 0 0 var(--gold); }
.steps p { color: var(--muted); margin: 0; }

/* ---------- CTA band ---------- */
.cta {
  position: relative;
  overflow: hidden;
  padding: 64px 56px;
  border-radius: 28px;
  background:
    url("../images/pattern-lines.svg") right -40px center / auto 150% no-repeat,
    linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #C9D4E3;
}
.cta h2 { color: #fff; max-width: 560px; }
.cta p { max-width: 520px; font-size: 1.1rem; }
.cta .hero-actions { margin-top: 24px; }

/* ---------- Inner page hero ---------- */
.page-hero {
  position: relative;
  padding: 96px 0 84px;
  background:
    url("../images/pattern-lines.svg") right -60px center / auto 130% no-repeat,
    linear-gradient(135deg, var(--navy-deep), var(--navy-2));
  color: #C9D4E3;
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 6px;
  background:
    linear-gradient(var(--blue-2), var(--blue-2)) left top / 100% 2px no-repeat,
    linear-gradient(90deg, var(--gold-light), var(--gold-dark)) left bottom / 100% 2px no-repeat;
  transform-origin: left;
  animation: grow-x 1.1s .2s var(--ease) both;
}
.page-hero h1 { color: #fff; max-width: 760px; }
.page-hero p { font-size: 1.18rem; max-width: 640px; margin: 0; }

/* ---------- Split layout ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split p { color: var(--muted); }
.framed { position: relative; }
.framed img { border-radius: 28px; position: relative; z-index: 1; }
.framed::after {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 2px solid var(--gold);
  border-radius: 28px;
}

/* ---------- Services page ---------- */
.jump { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin-top: 32px; }
.jump a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  text-decoration: none;
  font-size: .88rem;
  transition: border-color .3s, background-color .3s, color .3s;
}
.jump a:hover { border-color: var(--gold-light); background: var(--gold-light); color: var(--navy); }

.service {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 56px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.service:first-child { border-top: 0; padding-top: 0; }
.service-intro p { color: var(--muted); }
.service .card-num { margin-bottom: 14px; }
.checklist { list-style: none; display: grid; gap: 14px; align-content: start; }
.checklist li {
  position: relative;
  padding: 16px 18px 16px 52px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 18px; top: 50%;
  width: 20px; height: 8px;
  transform: translateY(-50%);
  background:
    linear-gradient(var(--blue), var(--blue)) left top / 100% 2px no-repeat,
    linear-gradient(var(--gold), var(--gold)) right bottom / 65% 2px no-repeat;
}

/* ---------- Contact page ---------- */
.contact-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: start; }
.contact-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.contact-card .label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 10px;
}
.contact-card .value {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy);
  word-break: break-word;
}
.contact-card a.value { text-decoration: none; }
.contact-card a.value:hover { color: var(--blue); }
.contact-card p { margin-top: 8px; font-size: .95rem; }
.next-steps { padding: 36px 32px; border-radius: var(--radius); background: var(--mist); }
.next-steps ol { margin: 0; padding-left: 1.2em; color: var(--muted); display: grid; gap: 12px; }
.next-steps li::marker { color: var(--gold-dark); font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #A9B7CB; font-size: .96rem; }
.footer-lines {
  height: 6px;
  background:
    linear-gradient(var(--blue), var(--blue)) left top / 100% 2px no-repeat,
    linear-gradient(90deg, var(--gold-light), var(--gold-dark)) left bottom / 100% 2px no-repeat;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-top: 64px;
  padding-bottom: 48px;
}
.site-footer .brand-name { color: #fff; }
.site-footer .brand-tag { color: var(--slate); }
.footer-about { margin-top: 18px; max-width: 320px; }
.footer-title {
  font-size: .8rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 16px;
}
.site-footer ul { list-style: none; display: grid; gap: 10px; }
.site-footer a { color: #C9D4E3; text-decoration: none; transition: color .3s; }
.site-footer a:hover { color: var(--gold-light); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding-top: 24px;
  padding-bottom: 28px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .86rem;
}
.footer-bottom p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4, .steps { grid-template-columns: repeat(2, 1fr); }
  .steps::before { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .hero-grid, .split, .service, .contact-grid { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 72px; }
  .hero-art { max-width: 360px; order: -1; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 72px 0; }
  .service { gap: 24px; }
  .cta { padding: 48px 28px; }
  .framed { margin-right: 18px; }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4, .steps, .contact-cards, .footer-grid { grid-template-columns: 1fr; }
  .page-hero { padding: 64px 0 56px; }
  .strip li { padding: 0 14px; }
  .brand-name { font-size: 1.4rem; }
  .brand img { width: 38px; height: 38px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  body::before, body::after { display: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
