/* RecursivX Software Solutions Ltd — site styles */

@font-face {
  font-family: "Inter";
  src: url("fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/Fraunces-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f7f5f0;
  --paper-deep: #efece4;
  --ink: #16191d;
  --ink-soft: #4a5058;
  --ink-faint: #8a9097;
  --rule: #d9d4c9;
  --accent: #1e4f5a;
  --accent-ink: #0f3139;
  --white: #ffffff;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --measure: 62ch;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; color: var(--ink); margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); line-height: 1.08; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.15; }
h3 { font-size: 1.3rem; line-height: 1.3; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.measure { max-width: var(--measure); }
.soft { color: var(--ink-soft); }
.small { font-size: 0.93rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.wordmark { font-family: var(--serif); font-size: 1.45rem; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.wordmark:hover { text-decoration: none; }
.wordmark svg { width: 26px; height: 26px; flex: none; }
.wordmark small { display: none; }
.site-nav { display: flex; gap: 28px; }
.site-nav a { color: var(--ink-soft); font-size: 0.95rem; font-weight: 500; padding: 6px 0; border-bottom: 1.5px solid transparent; }
.site-nav a:hover { color: var(--ink); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

/* Hero */
.hero { padding: 72px 0 64px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 56px; align-items: center; }
.hero h1 { max-width: 14ch; }
.hero .button-row { margin-top: 36px; }

/* Recursion animation: nested squares zooming outward from the core */
.recursion { aspect-ratio: 1; width: 100%; max-width: 460px; margin-left: auto; perspective: 700px; }
.recursion svg { width: 100%; height: 100%; overflow: visible; transform: rotateX(38deg) rotateZ(-14deg); }
.ring {
  fill: none; stroke: var(--ink); stroke-width: 1.25;
  transform-box: fill-box; transform-origin: center;
  animation: ring-zoom 16s linear infinite;
  opacity: 0;
}
.ring:nth-child(2) { animation-delay: -2s; }
.ring:nth-child(3) { animation-delay: -4s; }
.ring:nth-child(4) { animation-delay: -6s; }
.ring:nth-child(5) { animation-delay: -8s; }
.ring:nth-child(6) { animation-delay: -10s; }
.ring:nth-child(7) { animation-delay: -12s; }
.ring:nth-child(8) { animation-delay: -14s; }
@keyframes ring-zoom {
  /* piecewise-linear approximation of exponential growth, so the zoom reads as continuous */
  0%   { transform: scale(0.04); opacity: 0; }
  12%  { transform: scale(0.08); opacity: 0.55; }
  25%  { transform: scale(0.16); opacity: 0.85; }
  50%  { transform: scale(0.42); opacity: 0.85; }
  75%  { transform: scale(0.86); opacity: 0.55; }
  100% { transform: scale(1.12); opacity: 0; }
}
.ring:nth-child(odd) { stroke: var(--accent); }
.core { fill: var(--ink); transform-box: fill-box; transform-origin: center; animation: core-pulse 4s ease-in-out infinite; }
@keyframes core-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.6); opacity: 0.6; }
}
@media (prefers-reduced-motion: reduce) {
  .ring, .core { animation-play-state: paused; }
  .ring { opacity: 0.6; }
  .ring:nth-child(n+2) { display: none; }
}

/* Sections */
.section { padding: 72px 0; border-top: 1px solid var(--rule); }
.section-head { display: grid; grid-template-columns: 3fr 9fr; gap: 32px; margin-bottom: 44px; }
.label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); padding-top: 10px; }
.section-head p { color: var(--ink-soft); font-size: 1.08rem; margin-top: 14px; max-width: var(--measure); }
.alt { background: var(--paper-deep); }

/* Service listing */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--rule); }
.service { padding: 32px 36px 36px 0; border-bottom: 1px solid var(--rule); }
.service:nth-child(even) { padding-left: 36px; border-left: 1px solid var(--rule); }
.service .num { font-family: var(--serif); color: var(--accent); font-size: 1rem; display: block; margin-bottom: 18px; }
.service h3 { margin-bottom: 10px; }
.service p { color: var(--ink-soft); font-size: 0.97rem; }
.service a { display: inline-block; margin-top: 14px; font-weight: 500; font-size: 0.95rem; }

/* Two-column prose */
.cols { display: grid; grid-template-columns: 3fr 9fr; gap: 32px; }
.cols + .cols { margin-top: 48px; padding-top: 48px; border-top: 1px solid var(--rule); }
.cols h3 { margin-bottom: 14px; }
.cols .body { max-width: var(--measure); }
.cols ul { padding-left: 20px; margin: 0 0 1.1em; }
.cols li { margin-bottom: 6px; }

/* Process */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.step .num { font-family: var(--serif); color: var(--accent); font-size: 1.6rem; display: block; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: 0.95rem; }

/* Detail blocks on services page */
.detail { display: grid; grid-template-columns: 3fr 9fr; gap: 32px; padding: 56px 0; border-top: 1px solid var(--rule); }
.detail:first-of-type { border-top: 0; padding-top: 0; }
.detail .num { font-family: var(--serif); color: var(--accent); font-size: 1.1rem; display: block; margin-bottom: 10px; }
.detail h2 { font-size: 1.75rem; }
.detail .body { max-width: 68ch; }
.detail .body > p:first-child { font-size: 1.08rem; }
.detail dl { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 40px; margin: 28px 0 0; }
.detail dt { font-weight: 600; font-size: 0.9rem; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--rule); }
.detail dd { margin: 0; }
.detail dd ul { margin: 0; padding-left: 18px; color: var(--ink-soft); font-size: 0.95rem; }
.detail dd li { margin-bottom: 5px; }

/* Statement / callout */
.statement { padding: 80px 0; background: var(--accent-ink); color: #e9efe9; }
.statement h2 { color: var(--white); max-width: 24ch; margin-bottom: 16px; }
.statement .grid { max-width: 720px; }
.statement p { color: rgba(255,255,255,0.72); }
.statement a.button { background: var(--white); color: var(--accent-ink); }
.statement a.button:hover { background: #e9efe9; }
.statement .meta { font-size: 0.95rem; color: rgba(255,255,255,0.72); border-top: 1px solid rgba(255,255,255,0.18); padding-top: 18px; margin-top: 8px; }
.statement .meta strong { color: var(--white); font-weight: 500; }

.button {
  display: inline-block; padding: 13px 22px; border-radius: 4px;
  background: var(--ink); color: var(--white); font-weight: 500; font-size: 0.95rem;
}
.button:hover { text-decoration: none; background: #2a2f36; }
.button.secondary { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.button.secondary:hover { background: var(--ink); color: var(--white); }
.button-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

/* Page title block (inner pages) */
.page-head { padding: 72px 0 56px; border-bottom: 1px solid var(--rule); }
.page-head h1 { max-width: 16ch; margin-top: 12px; }
.page-head .lede { font-size: 1.15rem; color: var(--ink-soft); max-width: var(--measure); margin-top: 20px; }

/* Definition tables (legal, company) */
.kv { width: 100%; border-collapse: collapse; margin: 0; }
.kv th, .kv td { text-align: left; vertical-align: top; padding: 13px 0; border-bottom: 1px solid var(--rule); font-size: 0.97rem; }
.kv th { width: 32%; font-weight: 500; color: var(--ink-faint); padding-right: 24px; }
.kv tr:first-child th, .kv tr:first-child td { border-top: 1px solid var(--rule); }

/* Prose pages */
.prose { max-width: var(--measure); }
.prose h2 { font-size: 1.45rem; margin: 44px 0 14px; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 56px; }
.contact-card { background: var(--white); border: 1px solid var(--rule); padding: 28px; }
.contact-card h3 { font-size: 1.1rem; margin-bottom: 14px; }
.contact-card .big { font-family: var(--serif); font-size: 1.4rem; display: block; margin-bottom: 20px; word-break: break-all; }
.contact-card address { font-style: normal; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.55; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); background: var(--paper-deep); padding: 56px 0 36px; font-size: 0.92rem; color: var(--ink-soft); }
.footer-grid { display: grid; grid-template-columns: 5fr 2fr 2fr 3fr; gap: 40px; }
.site-footer h4 { font-family: var(--sans); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 14px; }
.site-footer .wordmark { font-size: 1.25rem; margin-bottom: 14px; }
.site-footer address { font-style: normal; line-height: 1.6; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--ink); }
.footer-bottom { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.85rem; color: var(--ink-faint); }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid, .statement .grid, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .services { grid-template-columns: 1fr; }
  .service, .service:nth-child(even) { padding-left: 0; padding-right: 0; border-left: 0; }
  .steps { grid-template-columns: 1fr 1fr; }
  .section-head, .cols, .detail { grid-template-columns: 1fr; gap: 12px; }
  .cols .body { margin-top: 8px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .site-header .wrap { height: auto; flex-wrap: wrap; padding-top: 16px; padding-bottom: 12px; gap: 8px 16px; }
  .wordmark { font-size: 1.3rem; }
  .site-nav { gap: 20px; width: 100%; }
  .site-nav a { font-size: 0.9rem; padding: 4px 0; }
  .hero { padding: 48px 0 40px; }
  .recursion { max-width: 300px; margin: 0 auto; }
  .section { padding: 52px 0; }
  .page-head { padding: 52px 0 40px; }
  .steps { grid-template-columns: 1fr; }
  .detail dl { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .kv th { width: 40%; }
  .statement { padding: 56px 0; }
}
@media print {
  .site-header, .site-footer { background: none; }
  .statement { background: none; color: var(--ink); border-top: 1px solid var(--rule); }
  .statement h2, .statement p { color: var(--ink); }
}

/* Utility classes (the CSP forbids inline style attributes) */
.section.flush { border-top: 0; }
.note { margin-top: 18px; }
.statement .button.secondary.on-dark { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.button.secondary.on-dark:hover { background: #fff; color: var(--accent-ink); }
.page-head.notfound { border-bottom: 0; padding-bottom: 120px; }
.footer-bottom.bare { margin-top: 0; border-top: 0; padding-top: 0; }
