/* Logros Project Management: the memorandum build.
   Architecture: fixed navy index rail + scrolling document column, in the manner
   of a bound private memorandum. Deliberately unlike the vertical-band skeleton
   of sibling sites. Palette sampled from the approved lockup: navy #14273a,
   gold #a07828..#d1a558, warm white #fcf9f6.
   Motion: load sequence, scroll-linked word highlight, route draw, outline fill,
   counters, scrollspy rail, magnetic + sheen CTA. All content is visible and
   correct with no JS and no animation support. */

:root {
  --paper:      #fcf9f6;
  --paper-2:    #f4eee3;
  --ink:        #14273a;
  --ink-2:      #33455a;
  --ink-faint:  rgba(20,39,58,0.22);
  --muted:      #5a6878;
  --navy:       #14273a;
  --navy-deep:  #0d1a28;
  --navy-rail:  #0b1622;
  --gold:       #b08838;
  --gold-text:  #7e6126;
  --gold-bright:#d9b264;
  --foil: linear-gradient(100deg,#7e6126 0%,#c49a4e 26%,#ecd9a8 44%,#a07828 58%,#c49a4e 76%,#7e6126 100%);
  --line:       rgba(20,39,58,0.14);
  --line-gold:  rgba(176,136,56,0.38);

  --rail-w: 300px;
  --col-w: 860px;
  --gutter: clamp(22px, 4.5vw, 56px);
  --sec-y: clamp(64px, 8vw, 112px);

  --t-label: 11px;
  --t-body: clamp(15.5px, 0.35vw + 14.6px, 17px);
  --t-lead: clamp(17.5px, 0.6vw + 16px, 20.5px);
  --t-h2: clamp(30px, 2.4vw + 20px, 46px);
  --t-cover: clamp(46px, 5.4vw + 20px, 92px);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Jost, "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
  font-size: var(--t-body);
  line-height: 1.66;
  overflow-x: clip;
  padding-left: var(--rail-w);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: "Ibarra Real Nova", Georgia, "Times New Roman", serif; font-weight: 400; margin: 0; text-wrap: balance; letter-spacing: 0.004em; }
p { margin: 0 0 1.05em; max-width: 60ch; }
p:last-child { margin-bottom: 0; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
::selection { background: var(--navy); color: var(--paper); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--navy); color: var(--paper); padding: 12px 20px; z-index: 300; }
.skip:focus { left: 12px; top: 12px; }

/* =============== reading progress (scroll-progress) =============== */
.progress {
  position: fixed; top: 0; left: var(--rail-w); right: 0; height: 2px; z-index: 200;
  background: var(--foil);
  transform: scaleX(0); transform-origin: left;
  pointer-events: none;
}
@supports (animation-timeline: scroll()) {
  .progress { animation: progress-grow linear both; animation-timeline: scroll(root block); }
  @keyframes progress-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* =============== the rail =============== */
.rail {
  position: fixed; inset: 0 auto 0 0; width: var(--rail-w); z-index: 100;
  background: var(--navy-rail);
  color: rgba(252,249,246,0.62);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 40px 34px 34px;
  border-right: 1px solid rgba(217,178,100,0.16);
  animation: rail-in 760ms var(--ease-out) both;
}
@keyframes rail-in { from { transform: translateX(-40px); opacity: 0; } to { transform: none; opacity: 1; } }

.rail-mark { text-decoration: none; display: block; }
.rail-mark .word {
  font-family: "Ibarra Real Nova", Georgia, serif; font-weight: 400;
  font-size: 25px; letter-spacing: 0.26em; color: #f5f0e6;
}
.rail-mark .tail {
  display: block; margin-top: 7px;
  font-size: 11px; letter-spacing: 0.34em; color: var(--gold-bright); font-weight: 500;
}
.rail-mark .tail span { transition: font-weight 180ms var(--ease), color 180ms var(--ease); font-weight: 500; }
.rail-mark::after {
  content: ""; display: block; height: 1px; margin-top: 20px;
  background: var(--foil);
  transform: scaleX(0); transform-origin: left;
  animation: rule-x 900ms 500ms var(--ease-out) both;
}
@keyframes rule-x { to { transform: scaleX(1); } }

.rail-nav { margin-top: 38px; }
.rail-index { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rail-index a {
  display: flex; align-items: baseline; gap: 14px;
  padding: 10px 0; text-decoration: none;
  font-size: 12.5px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 400;
  color: rgba(252,249,246,0.55);
  transition: color 320ms var(--ease);
  position: relative;
}
.rail-index a::after {
  content: ""; position: absolute; left: -34px; top: 50%; height: 1px; width: 22px;
  background: var(--gold-bright);
  transform: scaleX(0); transform-origin: left;
  transition: transform 380ms var(--ease);
}
.rail-index a:hover { color: #f5f0e6; }
.rail-index a[aria-current="true"] { color: #f5f0e6; }
.rail-index a[aria-current="true"]::after { transform: scaleX(1); }


/* =============== document column =============== */
.doc { max-width: calc(var(--col-w) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

.eyebrow { font-size: var(--t-label); letter-spacing: 0.3em; text-transform: uppercase; font-weight: 500; color: var(--gold-text); margin: 0; }

/* =============== cover =============== */
.cover { min-height: clamp(540px, 86vh, 880px); display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; position: relative; padding-block: 72px 56px; overflow: clip; }
.cover-topo { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cover > :not(.cover-topo) { position: relative; z-index: 1; }

.cover-monogram { width: clamp(120px, 14vw, 176px); margin-bottom: 30px; animation: rise 700ms 80ms var(--ease-out) both; }
.cover-name {
  font-family: Prata, "Ibarra Real Nova", Georgia, serif;
  font-size: clamp(21px, 2.65vw, 39px);
  letter-spacing: 0.1em; text-transform: uppercase;
  font-weight: 400; color: var(--navy);
  white-space: nowrap; margin: 0 0 20px;
  animation: rise 700ms 220ms var(--ease-out) both;
}
.cover-name .nword { display: inline-block; white-space: nowrap; }
.cover-name .nword > span { display: inline-block; }
@media (max-width: 960px) { .cover-name { white-space: normal; max-width: 17.5ch; margin-inline: auto; font-size: clamp(22px, 4.2vw, 34px); } }
@media (max-width: 480px) { .cover-name { max-width: none; font-size: clamp(20px, 7.4vw, 28px); } }
.cover-rule { width: 74px; height: 1px; background: var(--foil); border: 0; margin: 0 0 24px; transform-origin: center; animation: rule-x 800ms 360ms var(--ease-out) both; }

.cover-statement {
  font-family: Jost, "Helvetica Neue", Arial, sans-serif;
  font-weight: 300; font-size: clamp(17.5px, 1.4vw, 24px);
  letter-spacing: 0.03em; line-height: 1.4;
  color: var(--ink-2); margin: 0;
}
.cover-statement .wm { display: inline-block; overflow: clip; padding-bottom: 0.16em; margin-bottom: -0.16em; }
.cover-statement .wm > span { display: inline-block; transform: translateY(115%); animation: word-up 640ms var(--ease-out) forwards; }
.cover-statement .wm:nth-child(1) > span { animation-delay: 480ms; }
.cover-statement .wm:nth-child(2) > span { animation-delay: 590ms; }
.cover-statement .wm:nth-child(3) > span { animation-delay: 700ms; }
.cover-statement .wm:nth-child(4) > span { animation-delay: 810ms; }
@keyframes word-up { to { transform: none; } }
.cover-statement em { font-style: normal; font-weight: 500; color: var(--gold-text); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.cover-lede { font-size: var(--t-lead); color: var(--muted); max-width: 52ch; margin: 24px 0 0; line-height: 1.62; animation: rise 800ms 900ms var(--ease-out) both; }

/* =============== section chrome =============== */
.sec { padding-block: var(--sec-y) 0; }
.sec-head { margin-bottom: clamp(30px, 4vw, 46px); }
.sec-mark { display: flex; align-items: flex-end; height: 42px; margin-bottom: 18px; }

.mark-quartet svg { width: 36px; height: auto; }
.mark-topo svg { width: 60px; height: auto; }
.sec-mark svg { display: block; overflow: visible; }

/* The firm: the monogram seal settles into place */
.mark-seal img { width: 35px; height: 35px; }

/* Services: four stones set themselves, then breathe in turn */
.qs { fill: var(--gold); transform-box: fill-box; transform-origin: center; }
.qs-navy { fill: var(--navy); }
.qw { animation: q-breathe 5.5s var(--ease) infinite; }
.q-b { animation-delay: 1.4s; }
.q-c { animation-delay: 2.8s; }
.q-d { animation-delay: 4.2s; }
@keyframes q-breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.42; } }

/* Approach: contour lines from the cover, gathered into a small knot */
.tp { fill: none; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.tp-1 { stroke: var(--gold); stroke-width: 1.6; }
.tp-2 { stroke: var(--navy); stroke-width: 1.2; opacity: 0.55; }
.tp-3 { stroke: var(--gold); stroke-width: 1; opacity: 0.7; }


/* entrances, all view-timeline scrubbed; bases above stay fully visible */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .mark-seal img { animation: seal-in 1ms linear both; animation-timeline: view(); animation-range: entry 6% entry 34%; }
    @keyframes seal-in { 0% { opacity: 0; transform: scale(0.55) rotate(-8deg); } 72% { opacity: 1; transform: scale(1.12) rotate(2deg); } 100% { opacity: 1; transform: none; } }

    .qs { animation: q-set 1ms linear both; animation-timeline: view(); }
    .q-a .qs { animation-range: entry 6% entry 24%; }
    .q-b .qs { animation-range: entry 13% entry 31%; }
    .q-c .qs { animation-range: entry 20% entry 38%; }
    .q-d .qs { animation-range: entry 27% entry 45%; }
    @keyframes q-set { 0% { transform: scale(0) rotate(60deg); opacity: 0; } 70% { transform: scale(1.24) rotate(5deg); opacity: 1; } 100% { transform: none; opacity: 1; } }

    .tp { animation: tp-draw 1ms linear both; animation-timeline: view(); }
    .tp-1 { animation-range: entry 4% entry 38%; }
    .tp-2 { animation-range: entry 12% entry 46%; }
    .tp-3 { animation-range: entry 20% entry 54%; }
    @keyframes tp-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

  }
}
/* generic in-view rise */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .fx { animation: fx-rise 1ms linear both; animation-timeline: view(); animation-range: entry 0% entry 42%; }
    @keyframes fx-rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
  }
}

/* =============== 01 firm =============== */
.manifesto {
  font-family: "Ibarra Real Nova", Georgia, serif;
  font-size: clamp(20px, 1.3vw + 14px, 29px); font-weight: 400;
  line-height: 1.52; max-width: 46ch; margin: 0;
  view-timeline-name: --mani; view-timeline-axis: block;
}
.manifesto .w { color: var(--ink); }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .manifesto .w { animation: w-ink 1ms linear both; animation-timeline: --mani; }
    @keyframes w-ink { from { color: var(--ink-faint); } to { color: var(--ink); } }
  }
}

.firm-lic { margin-top: 34px; font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* =============== 02 services =============== */
.svc { display: block; padding-block: clamp(30px, 4vw, 46px); padding-left: clamp(18px, 2.6vw, 30px); border-top: 1px solid var(--line); position: relative; }
.svc:first-of-type { border-top: 0; }
.svc::before { content: ""; position: absolute; left: 0; top: -1px; bottom: -1px; width: 2px; background: var(--gold); transform: scaleY(0); transform-origin: top; transition: transform 460ms var(--ease); }
.svc:hover::before { transform: scaleY(1); }
.svc h3 { font-size: clamp(21px, 1.1vw + 17px, 28px); line-height: 1.2; display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px; transition: color 320ms var(--ease); }
.svc:hover h3 { color: var(--gold-text); }
.svc p { color: var(--ink-2); font-size: 15.5px; margin-top: 10px; max-width: 58ch; }

/* =============== 03 approach: route draw =============== */
.route { position: relative; padding-left: clamp(44px, 6vw, 72px); }
.route-track { position: absolute; left: 12px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.route-line { position: absolute; left: 12px; top: 6px; bottom: 6px; width: 2px; background: var(--foil); transform: scaleY(0); transform-origin: top; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .route-line { animation: route-grow 1ms linear both; animation-timeline: view(); animation-range: entry 10% exit 92%; }
    @keyframes route-grow { to { transform: scaleY(1); } }
  }
}
.stage { position: relative; padding-block: clamp(22px, 3vw, 34px); }
.stage::before {
  content: ""; position: absolute; left: calc(-1 * clamp(44px, 6vw, 72px) + 6px); top: 38px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--gold);
}
@supports (animation-timeline: view()) {
  .stage::before { animation: node-fill 1ms linear both; animation-timeline: view(); animation-range: entry 20% entry 60%; }
  @keyframes node-fill { to { background: var(--gold); } }
}
.stage h3 { font-size: clamp(20px, 1vw + 16px, 25px); display: flex; align-items: baseline; gap: 14px; }
.stage p { color: var(--ink-2); font-size: 15.5px; margin-top: 8px; max-width: 56ch; }

/* =============== 04 contact =============== */
.sec-contact { padding-bottom: 0; }
.contact-panel {
  background: var(--navy-deep); color: #f2ede4; position: relative;
  margin-top: 0;
  padding: clamp(48px, 7vw, 96px) var(--gutter);
  margin-inline: calc(-1 * var(--gutter));
}
.contact-panel::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--foil); }
.contact-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,0.8fr); gap: clamp(34px, 6vw, 88px); }
.contact-panel .eyebrow { color: var(--gold-bright); }
.contact-panel h2 { font-size: var(--t-h2); line-height: 1.12; color: #fdfbf7; margin: 14px 0 18px; }
.contact-lead { color: rgba(252,249,246,0.78); font-size: var(--t-lead); line-height: 1.6; max-width: 44ch; }

.btn-gold {
  display: inline-flex; align-items: center; position: relative; overflow: clip;
  margin-top: 30px; padding: 16px 32px; border-radius: 3px;
  background: var(--gold); color: var(--navy-deep);
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500;
  text-decoration: none;
  transition: background-color 320ms var(--ease), transform 220ms var(--ease);
  will-change: transform;
}
.btn-gold:hover { background: var(--gold-bright); }
.btn-gold .swap { display: block; overflow: hidden; height: 1.35em; }
.btn-gold .swap i {
  display: block; font-style: normal; line-height: 1.35em;
  transition: transform 420ms var(--ease);
}
.btn-gold:hover .swap i { transform: translateY(-1.35em); }
.btn-gold .sheen {
  position: absolute; inset: -40% auto; width: 34%; left: -60%;
  transform: skewX(-22deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  transition: left 640ms var(--ease);
  pointer-events: none;
}
.btn-gold:hover .sheen { left: 130%; }

.contact-lines { display: flex; flex-direction: column; gap: 22px; }
.contact-lines .k { font-size: var(--t-label); letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold-bright); font-weight: 500; display: block; margin-bottom: 5px; }
.contact-lines .v, .contact-lines address { font-style: normal; font-size: 16.5px; color: #f2ede4; line-height: 1.55; }
.contact-lines a.v { text-decoration: none; border-bottom: 1px solid rgba(217,178,100,0.5); padding-bottom: 2px; transition: border-color 300ms var(--ease); }
.contact-lines a.v:hover { border-bottom-color: var(--gold-bright); }
@media (max-width: 780px) { .contact-grid { grid-template-columns: 1fr; } }

/* =============== footer =============== */
.site-footer { border-top: 1px solid var(--line); color: var(--muted); margin-inline: calc(-1 * var(--gutter)); padding: 30px var(--gutter) 44px; font-size: 13px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 16px 48px; justify-content: space-between; }
.site-footer p { margin: 0 0 4px; max-width: none; }
.site-footer .legal { color: var(--ink-2); }
.site-footer .arabic { direction: rtl; unicode-bidi: isolate; }

/* =============== responsive: rail collapses =============== */
@media (max-width: 900px) {
  body { padding-left: 0; padding-top: 58px; }
  .progress { left: 0; top: 58px; }
  .rail {
    inset: 0 0 auto 0; width: auto; height: 58px;
    flex-direction: row; align-items: center; justify-content: space-between;
    padding: 0 18px; border-right: 0;
    border-bottom: 1px solid rgba(217,178,100,0.18);
    animation: none;
  }
  .rail > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-width: 0; width: 100%; }
  .rail-nav { margin-top: 0; }
  .rail-mark { display: block; }
  .rail-mark .word { font-size: 17px; }
  .rail-mark .tail { display: block; margin-top: 3px; font-size: 7.5px; letter-spacing: 0.3em; }
  .rail-mark::after { display: none; }
  .rail-index { flex-direction: row; gap: 0; }
  .rail-index a { padding: 8px 0 8px 18px; }
  .rail-index a::after { display: none; }
    .rail-index li:not(:last-child) { display: none; }  /* keep only Contact */
    .cover { min-height: clamp(480px, 80vh, 720px); }
}

@media (max-width: 480px) {
  .cover-statement { font-size: 17px; }

  .cover-monogram { width: 108px; }
}

/* =============== reduced motion =============== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .sec-head .mask span { transform: none; }
  .cover-statement .wm > span { transform: none; }
  .route-line { transform: none; }
  .manifesto .w { color: var(--ink); }
  .progress { display: none; }

}
