:root {
  --ivory: #f7f4ec;
  --ivory-light: #fffdf8;
  --ink: #0b2438;
  --forest: #073b66;
  --forest-deep: #052944;
  --gold: #d19a26;
  --sage: #d5e0e8;
  --muted: #60717d;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
::selection { color: white; background: var(--forest); }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-geist-sans), "Helvetica Neue", sans-serif;
}
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; border-radius: 3px; }
svg { width: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.6; }

.site-header {
  height: 104px;
  padding: 0 clamp(24px, 5vw, 76px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 10;
  background: rgba(247, 244, 236, .92);
  backdrop-filter: blur(12px);
}
.wordmark {
  color: var(--forest);
  font-family: "Iowan Old Style", "Baskerville", "Times New Roman", serif;
  font-size: clamp(32px, 3vw, 48px);
  letter-spacing: -.05em;
}
nav { display: flex; align-items: center; gap: clamp(30px, 5vw, 72px); font-size: 15px; font-weight: 570; }
nav a { position: relative; padding: 12px 0; }
nav a::after { content: ""; position: absolute; bottom: 7px; left: 0; width: 0; height: 1px; background: var(--gold); transition: width .25s ease; }
nav a:hover::after, nav a:focus-visible::after { width: 100%; }
.header-rule { position: absolute; left: clamp(24px,5vw,76px); right: clamp(24px,5vw,76px); bottom: 0; height: 1px; background: rgba(209,154,38,.55); }
.header-rule span { position: absolute; right: -1px; top: -4px; width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); }

.hero {
  min-height: calc(100svh - 104px);
  max-height: 920px;
  display: grid;
  grid-template-columns: 48% 52%;
  overflow: hidden;
  border-bottom: 1px solid rgba(7,59,102,.4);
}
.hero-copy { padding: clamp(76px, 8vh, 116px) 24px 80px clamp(24px, 5vw, 76px); position: relative; z-index: 2; }
.eyebrow, .kicker { color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 28px; }
.eyebrow span { display: block; width: 28px; height: 1px; background: var(--gold); }
h1, h2 {
  font-family: "Iowan Old Style", "Baskerville", "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -.045em;
  margin: 0;
}
h1 { max-width: 770px; font-size: clamp(58px, 6.2vw, 98px); line-height: .98; }
.hero-lede { max-width: 620px; margin: 34px 0 0; color: #334b5d; font-size: clamp(17px, 1.35vw, 21px); line-height: 1.65; }
.hero-actions { display: flex; gap: 50px; align-items: center; margin-top: 36px; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 36px; min-width: 240px; padding: 19px 26px; border-radius: 10px; font-weight: 650; transition: transform .2s, background .2s; }
.button-primary { background: var(--forest); color: white; box-shadow: 0 14px 28px rgba(5,41,68,.13); }
.button-primary svg, .text-link svg { color: var(--gold); transition: transform .2s; }
.button-primary:hover { background: var(--forest-deep); transform: translateY(-2px); }
.button:hover svg, .text-link:hover svg { transform: translateX(5px); }
.text-link { display: inline-flex; gap: 22px; align-items: center; border-bottom: 1px solid var(--gold); padding: 15px 0 9px; color: var(--forest); font-weight: 650; }

.hero-art {
  position: relative;
  min-height: 620px;
  background:
    radial-gradient(circle at 52% 47%, rgba(209,154,38,.1), transparent 40%),
    url("/qalamvision-hero.png") center / 112% auto no-repeat;
}
.hero-art::before, .hero-art::after { content: ""; position: absolute; inset: 8% -20% -20% 3%; border: 1px dashed rgba(7,59,102,.21); border-radius: 50%; }
.hero-art::after { inset: 17% -2% 8% 18%; border-color: rgba(209,154,38,.35); }
.orbit { position: absolute; border: 1px solid rgba(7,59,102,.35); border-radius: 50%; }
.orbit-one { width: 490px; height: 490px; top: 17%; left: 9%; opacity: .18; }
.orbit-two { width: 330px; height: 330px; top: calc(17% + 80px); left: calc(9% + 80px); border-color: rgba(209,154,38,.65); opacity: .18; }
.scan-line { position: absolute; height: 1px; width: 90%; left: 0; top: 50%; background: linear-gradient(90deg, transparent, var(--forest), var(--gold), transparent); box-shadow: 0 0 16px rgba(209,154,38,.32); animation: scan 5s ease-in-out infinite; }
.aperture { position: absolute; top: calc(17% + 160px); left: calc(9% + 160px); width: 170px; height: 170px; border: 1px solid var(--forest); border-radius: 50%; display: grid; place-items: center; background: rgba(247,244,236,.6); opacity: .28; animation: breathe 5s ease-in-out infinite; }
.aperture .focus-mark { width: 92px; color: var(--forest); }

.capability-band { min-height: 118px; display: grid; grid-template-columns: repeat(3,1fr); border-bottom: 1px solid rgba(7,59,102,.25); background: var(--ivory-light); }
.capability-band div { display: flex; align-items: center; gap: 26px; padding: 28px clamp(24px, 5vw, 76px); border-right: 1px dotted rgba(7,59,102,.28); }
.capability-band div:last-child { border: 0; }
.capability-band span { color: var(--gold); font-family: serif; font-size: 14px; }
.capability-band strong { color: var(--forest); font-size: 16px; }

.section { padding: clamp(90px, 10vw, 150px) clamp(24px, 5vw, 76px); }
.section-intro { display: grid; grid-template-columns: 28% 72%; align-items: start; }
.section-intro h2, .approach h2, .about h2, .contact h2 { font-size: clamp(43px, 5vw, 76px); line-height: 1.05; }
.section-intro h2 { max-width: 970px; }
.kicker { margin: 10px 0 24px; }
.work-grid { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 18px; margin-top: 74px; }
.work-card { min-height: 510px; padding: 34px; background: rgba(255,255,255,.46); border: 1px solid rgba(7,59,102,.18); display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.work-card:hover { transform: translateY(-6px); box-shadow: 0 18px 50px rgba(23,32,28,.08); }
.card-featured { background: var(--forest); color: white; }
.card-number { align-self: flex-end; color: var(--gold); font-family: serif; }
.card-icon, .chip-icon, .network-icon { width: 98px; height: 98px; display: grid; place-items: center; margin: 42px 0 38px; border: 1px solid rgba(209,154,38,.5); border-radius: 50%; }
.card-icon svg { width: 50px; }
.chip-icon { border-radius: 20px; position: relative; }
.chip-icon::before { content: ""; width: 36px; height: 36px; border: 1px solid var(--forest); }
.chip-icon i { position: absolute; width: 8px; height: 1px; background: var(--gold); }
.chip-icon i:nth-child(1) { transform: translateX(-24px); }
.chip-icon i:nth-child(2) { transform: translateX(24px); }
.chip-icon i:nth-child(3) { transform: rotate(90deg) translateX(24px); }
.network-icon { position: relative; }
.network-icon i { position: absolute; width: 9px; height: 9px; background: var(--forest); border-radius: 50%; }
.network-icon i:nth-child(1) { top: 22px; }
.network-icon i:nth-child(2) { left: 20px; bottom: 25px; }
.network-icon i:nth-child(3) { right: 20px; bottom: 25px; }
.network-icon i:nth-child(4) { width: 44px; height: 1px; border-radius: 0; transform: rotate(30deg); }
.work-card h3 { font-family: "Iowan Old Style", serif; font-size: 31px; font-weight: 400; margin: 0 0 18px; }
.work-card p { color: var(--muted); font-size: 15px; line-height: 1.75; margin: 0; }
.card-featured p { color: var(--sage); }
.tag-row { margin-top: auto; padding-top: 34px; display: flex; gap: 8px; flex-wrap: wrap; }
.tag-row span { border: 1px solid rgba(7,59,102,.22); border-radius: 99px; padding: 7px 11px; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.card-featured .tag-row span { border-color: rgba(255,255,255,.22); }

.approach { display: grid; grid-template-columns: 1fr 1fr; gap: 9vw; background: var(--ivory-light); }
.approach-visual { min-height: 690px; position: relative; overflow: hidden; border: 1px solid rgba(7,59,102,.17); background: linear-gradient(rgba(213,224,232,.35) 1px, transparent 1px), linear-gradient(90deg, rgba(213,224,232,.35) 1px, transparent 1px); background-size: 44px 44px; }
.axis { position: absolute; background: var(--gold); opacity: .6; }
.axis-x { width: 100%; height: 1px; top: 50%; }
.axis-y { width: 1px; height: 100%; left: 50%; }
.approach-ring { position: absolute; border: 1px solid var(--forest); border-radius: 50%; top: 50%; left: 50%; transform: translate(-50%,-50%); }
.ring-a { width: 170px; height: 170px; }
.ring-b { width: 340px; height: 340px; opacity: .55; }
.ring-c { width: 520px; height: 520px; opacity: .25; border-style: dashed; }
.approach-dot { position: absolute; width: 18px; height: 18px; background: var(--gold); border: 5px solid var(--ivory-light); border-radius: 50%; top: calc(50% - 9px); left: calc(50% - 9px); box-shadow: 0 0 0 1px var(--gold); }
.approach-visual p { position: absolute; bottom: 34px; left: 0; right: 0; text-align: center; color: var(--forest); text-transform: uppercase; letter-spacing: .2em; font-size: 10px; }
.large-copy { font-size: clamp(18px, 1.5vw, 23px); line-height: 1.7; color: #334b5d; }
.approach-copy > .large-copy { margin: 34px 0 45px; }
.approach ol { list-style: none; padding: 0; margin: 0; }
.approach li { display: grid; grid-template-columns: 55px 1fr; gap: 18px; padding: 24px 0; border-top: 1px solid rgba(7,59,102,.18); }
.approach li > span { color: var(--gold); font-family: serif; }
.approach li strong { color: var(--forest); }
.approach li p { color: var(--muted); margin: 8px 0 0; line-height: 1.6; font-size: 14px; }

.about { background: var(--forest); color: white; }
.about .kicker { color: var(--gold); }
.about-grid { display: grid; grid-template-columns: 1fr .72fr; gap: 11vw; margin-top: 45px; }
.about h2 em { color: var(--gold); font-weight: 400; }
.about-grid > div > p { color: var(--sage); line-height: 1.8; }
.about-grid > div > p:last-child { color: #b5c5d1; font-size: 15px; }
.contact { background: var(--gold); display: grid; grid-template-columns: 1fr auto; gap: 60px; align-items: end; }
.contact h2 { max-width: 900px; color: var(--forest-deep); }
.kicker.light { color: rgba(5,41,68,.7); }
.contact-cta { width: 178px; height: 178px; border-radius: 50%; display: grid; place-items: center; position: relative; background: var(--forest); color: white; transition: transform .25s, background .25s; }
.contact-cta:hover { transform: scale(1.04); background: var(--forest-deep); }
.contact-cta span { max-width: 90px; text-align: center; line-height: 1.4; }
.contact-cta svg { position: absolute; right: 28px; bottom: 40px; color: var(--gold); }
footer { min-height: 160px; padding: 40px clamp(24px,5vw,76px); display: flex; align-items: end; justify-content: space-between; gap: 24px; background: var(--forest-deep); color: #b5c5d1; font-size: 12px; }
.footer-mark { color: white; font-size: 36px; }

@keyframes scan { 0%,100% { transform: translateY(-80px); opacity: .5; } 50% { transform: translateY(80px); opacity: 1; } }
@keyframes breathe { 50% { transform: scale(1.045); } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (max-width: 900px) {
  .site-header { height: 86px; }
  nav { gap: 18px; font-size: 13px; }
  .hero { min-height: auto; grid-template-columns: 1fr; }
  .hero-copy { padding-top: 72px; }
  .hero-art { min-height: 430px; order: 2; }
  .capability-band { grid-template-columns: 1fr; }
  .capability-band div { border-right: 0; border-bottom: 1px dotted rgba(7,59,102,.28); }
  .section-intro, .approach, .about-grid { grid-template-columns: 1fr; }
  .section-intro { gap: 22px; }
  .work-grid { grid-template-columns: 1fr; }
  .work-card { min-height: 450px; }
  .approach-visual { min-height: 520px; }
  .contact { grid-template-columns: 1fr; align-items: start; }
}
@media (max-width: 600px) {
  .site-header { align-items: flex-start; padding-top: 20px; height: 112px; }
  .wordmark { font-size: 33px; }
  nav { position: absolute; left: 24px; right: 24px; top: 66px; justify-content: space-between; gap: 8px; font-size: 12px; }
  .hero-copy { padding-top: 58px; padding-bottom: 48px; }
  h1 { font-size: 52px; }
  .hero-lede { font-size: 16px; }
  .hero-actions { align-items: stretch; flex-direction: column; gap: 12px; }
  .button { width: 100%; }
  .text-link { width: fit-content; }
  .hero-art { min-height: 350px; transform: translateX(-20px); }
  .orbit-one { width: 320px; height: 320px; }
  .orbit-two { width: 220px; height: 220px; top: calc(17% + 50px); left: calc(9% + 50px); }
  .aperture { width: 120px; height: 120px; top: calc(17% + 100px); left: calc(9% + 100px); }
  .aperture .focus-mark { width: 64px; }
  .section { padding-top: 82px; padding-bottom: 82px; }
  .work-grid { margin-top: 45px; }
  .approach-visual { min-height: 390px; }
  .ring-c { width: 360px; height: 360px; }
  .contact-cta { width: 150px; height: 150px; }
  footer { align-items: flex-start; flex-direction: column; }
}
