/* DSarchitek Inc. house styles. Colours, faces and shapes follow the brand and voice guide, Rev 0.1. */

@font-face { font-family: "Source Serif 4"; src: url("/fonts/source-serif-4-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("/fonts/source-serif-4-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("/fonts/source-serif-4-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --charcoal: #1A1A1A;
  --ground: #FAFAF8;
  --paper: #F1EFEA;
  --slate: #40587A;
  --stone: #8C8578;
  --stone-deep: #6B665C;
  --serif: "Source Serif 4", Charter, Georgia, serif;
  --sans: "Source Sans 3", Arial, sans-serif;
  --mono: "IBM Plex Mono", "Courier New", monospace;
  --measure: 70ch;
  --wide: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--charcoal);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--slate); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--slate); outline-offset: 3px; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--charcoal); color: var(--ground); padding: 0.5rem 1rem; font-family: var(--sans); z-index: 10; }
.skip-link:focus { left: var(--gutter); }

/* The outlined bar from the logo: two rules closed at the ends. The house divider. */
.bar { height: 12px; border: 3px solid var(--stone); margin: 0; }
.bar--charcoal { border-color: var(--charcoal); }

/* Header */
.site-header { max-width: var(--wide); margin: 0 auto; padding: 1.75rem var(--gutter) 1.25rem; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.25rem 2rem; }
.brand { text-decoration: none; display: block; }
.brand img { width: 220px; min-width: 160px; }
.descriptor { margin: 0.6rem 0 0; font-family: var(--sans); font-size: 0.9375rem; line-height: 1.4; color: var(--stone-deep); max-width: 34ch; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.site-nav a { font-family: var(--sans); font-size: 1rem; color: var(--charcoal); text-decoration: none; padding: 0.25rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--stone); }
.site-nav a[aria-current="page"] { color: var(--slate); border-bottom-color: var(--slate); }
.header-bar { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }

/* Main column */
main { max-width: var(--wide); margin: 0 auto; padding: clamp(2rem, 6vw, 4.5rem) var(--gutter) 4rem; }
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1.1em; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0; color: var(--charcoal); }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); letter-spacing: -0.01em; max-width: 22ch; }
h2 { font-size: clamp(1.5rem, 3vw, 1.95rem); margin-top: 2.6rem; }
h3 { font-size: 1.25rem; margin-top: 2rem; }
p { margin: 0; }
.prose h2 + p, .prose h3 + p, .prose h3 + .meta { margin-top: 0.6rem; }

.lead { font-size: clamp(1.2rem, 2.2vw, 1.4rem); line-height: 1.55; max-width: 60ch; margin-top: 1.5rem; }
.eyebrow { font-family: var(--sans); font-size: 0.9375rem; font-weight: 600; color: var(--slate); letter-spacing: 0.02em; margin: 0 0 0.75rem; }
.meta { font-family: var(--sans); font-size: 0.9375rem; line-height: 1.5; color: var(--stone-deep); }
.mono { font-family: var(--mono); font-size: 0.9rem; }

.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li + li { margin-top: 0.35rem; }

/* Sections */
.section { margin-top: clamp(3rem, 7vw, 5rem); }
.section > .bar { margin-bottom: 2rem; }

/* Home hero: office photograph at 35% opacity, fading right to left into the ground so the headline stays legible. */
html, body { overflow-x: clip; }
.hero { position: relative; overflow: hidden; margin: calc(-1 * clamp(2rem, 6vw, 4.5rem)) calc(50% - 50vw) 0; padding: clamp(4rem, 10vw, 8rem) 0 clamp(4rem, 9vw, 7rem); }
.hero-bg { position: absolute; inset: 0; background: url("/images/hero-office.jpg") center 40% / cover no-repeat; opacity: 0.35; }
.hero-fade { position: absolute; inset: 0; pointer-events: none; background:
  linear-gradient(to left, rgba(250, 250, 248, 0) 0%, rgba(250, 250, 248, 0.15) 40%, rgba(250, 250, 248, 0.8) 85%),
  linear-gradient(to bottom, rgba(250, 250, 248, 0) 55%, #FAFAF8 100%); }
.hero-inner { position: relative; max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }

/* Inner-page hero: the page's image at 35% opacity behind the title, fading right to left. */
.page-hero { position: relative; overflow: hidden; margin: calc(-1 * clamp(2rem, 6vw, 4.5rem)) calc(50% - 50vw) 0; padding: clamp(3rem, 8vw, 6rem) 0 clamp(3rem, 7vw, 5rem); }
.page-hero-bg { position: absolute; inset: 0; background-image: var(--hero); background-position: center 45%; background-size: cover; background-repeat: no-repeat; opacity: 0.35; }
.page-hero .hero-fade { background:
  linear-gradient(to right, rgba(250, 250, 248, 0.92) 25%, rgba(250, 250, 248, 0.5) 65%, rgba(250, 250, 248, 0.1) 100%),
  linear-gradient(to bottom, rgba(250, 250, 248, 0) 60%, #FAFAF8 100%); }

/* Full-width figure with soft side and bottom fades, as on the previous site. */
.wide-figure { position: relative; overflow: hidden; margin: clamp(3rem, 7vw, 5rem) calc(50% - 50vw) 0; }
.wide-figure img { width: 100%; max-height: 60vh; object-fit: cover; object-position: center 28%; }
.wide-figure::before, .wide-figure::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.wide-figure::before { background: linear-gradient(to right, rgba(250, 250, 248, 0.5) 0%, rgba(250, 250, 248, 0) 30%, rgba(250, 250, 248, 0) 70%, rgba(250, 250, 248, 0.5) 100%); }
.wide-figure::after { background: linear-gradient(to top, #FAFAF8 0%, rgba(250, 250, 248, 0) 35%); }

/* Entry links on the home page */
.entries { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.25rem; margin-top: 2rem; }
.entry { background: var(--paper); border-top: 3px solid var(--charcoal); padding: 1.25rem 1.25rem 1.5rem; border-radius: 0; }
.entry h3 { margin: 0; font-size: 1.2rem; }
.entry p { margin-top: 0.5rem; font-size: 1.0625rem; }
.entry a { font-family: var(--sans); font-size: 1rem; display: inline-block; margin-top: 0.75rem; }

/* Differentiator band */
.band { background: var(--paper); padding: clamp(1.5rem, 4vw, 2.5rem); margin-top: clamp(3rem, 7vw, 5rem); }
.band h2 { margin-top: 0; }
.band h2 + .prose, .section > h2 + .entries { margin-top: 1.25rem; }

/* Four registers diagram: HTML labels on stroked boxes, no fills except the 10% slate tint. */
.registers { display: grid; grid-template-columns: 1fr 1.2fr 1fr; grid-template-rows: auto auto auto; gap: 0.75rem; max-width: 40rem; margin: 1.75rem 0; font-family: var(--sans); font-size: 1rem; text-align: center; }
.registers div { border: 1.5px solid var(--stone); padding: 0.9rem 0.6rem; display: flex; align-items: center; justify-content: center; min-height: 3.5rem; }
.registers .r-tech { grid-column: 2; grid-row: 1; }
.registers .r-const { grid-column: 1; grid-row: 2; }
.registers .r-core { grid-column: 2; grid-row: 2; border-color: var(--slate); background: rgba(64, 88, 122, 0.10); font-weight: 600; color: var(--charcoal); }
.registers .r-pol { grid-column: 3; grid-row: 2; }
.registers .r-serv { grid-column: 2; grid-row: 3; }
.registers-caption { font-family: var(--sans); font-size: 0.9375rem; color: var(--stone-deep); }

/* Definition list for the four registers */
.defs { margin: 1.25rem 0 0; }
.defs dt { font-family: var(--sans); font-weight: 600; margin-top: 1rem; }
.defs dd { margin: 0.2rem 0 0; }

/* Record entries */
.record-entry { padding-top: 1.5rem; margin-top: 1.5rem; border-top: 1px solid var(--stone); max-width: var(--measure); }
.record-entry h3 { margin-top: 0; }
.record-entry .meta { margin-top: 0.35rem; }
.record-entry p:not(.meta) { margin-top: 0.75rem; }

/* Credentials block */
.credentials { font-family: var(--sans); font-size: 1rem; list-style: none; padding: 1rem 1.25rem; margin: 1.5rem 0 0; background: var(--paper); border-left: 3px solid var(--slate); max-width: var(--measure); }
.credentials li + li { margin-top: 0.3rem; }

/* Call to action line */
.cta { font-family: var(--sans); font-size: 1.0625rem; display: inline-block; padding: 0.7rem 1.2rem; background: var(--slate); color: var(--ground); text-decoration: none; border-radius: 0; }
.cta:hover { background: var(--charcoal); }

/* Form */
.form { max-width: 40rem; margin-top: 1.5rem; }
.field + .field { margin-top: 1.25rem; }
.field label { display: block; font-family: var(--sans); font-weight: 600; font-size: 1rem; }
.field .hint { display: block; font-family: var(--sans); font-size: 0.9375rem; color: var(--stone-deep); margin-top: 0.15rem; }
.field input, .field textarea { width: 100%; margin-top: 0.4rem; padding: 0.65rem 0.75rem; font-family: var(--serif); font-size: 1.0625rem; color: var(--charcoal); background: #fff; border: 1.5px solid var(--stone); border-radius: 0; }
.field textarea { min-height: 10rem; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--slate); outline-offset: 0; border-color: var(--slate); }
.form button { margin-top: 1.5rem; font-family: var(--sans); font-size: 1.0625rem; padding: 0.75rem 1.4rem; background: var(--slate); color: var(--ground); border: 0; border-radius: 0; cursor: pointer; }
.form button:hover { background: var(--charcoal); }
.form .notice { margin-top: 0.75rem; }
.hp { position: absolute; left: -9999px; }

/* Contact block */
.contact { font-family: var(--sans); font-size: 1.0625rem; margin-top: 1.25rem; }
.contact p + p { margin-top: 0.25rem; }

/* Footer */
.site-footer { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter) 2.5rem; font-family: var(--sans); font-size: 0.9375rem; color: var(--stone-deep); }
.site-footer .bar { margin-bottom: 1.5rem; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.footer-grid p { margin: 0.15rem 0; }
.site-footer a { color: var(--stone-deep); }
.site-footer a:hover { color: var(--slate); }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }

@media (max-width: 40rem) {
  body { font-size: 1.0625rem; }
  .site-header { align-items: flex-start; }
  .brand img { width: 180px; }
  .registers { grid-template-columns: 1fr 1fr; }
  .registers .r-tech { grid-column: 1 / 3; grid-row: 1; }
  .registers .r-const { grid-column: 1; grid-row: 2; }
  .registers .r-pol { grid-column: 2; grid-row: 2; }
  .registers .r-core { grid-column: 1 / 3; grid-row: 3; }
  .registers .r-serv { grid-column: 1 / 3; grid-row: 4; }
}

/* Motion. Hero images fade in to 35%; hero text rises in, one line after another;
   later sections fade up as they scroll into view (classes added by /js/site.js).
   Everything is visible without JavaScript, and motion is off for reduced-motion users. */
@keyframes hero-image-in { from { opacity: 0; transform: scale(1.03); } to { opacity: 0.35; transform: none; } }
@keyframes text-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.hero-bg, .page-hero-bg { animation: hero-image-in 1.6s cubic-bezier(0.2, 0.6, 0.2, 1) both; }
.hero-inner > * { animation: text-rise 0.9s cubic-bezier(0.2, 0.6, 0.2, 1) both; }
.hero-inner > *:nth-child(1) { animation-delay: 0.15s; }
.hero-inner > *:nth-child(2) { animation-delay: 0.35s; }
.hero-inner > *:nth-child(3) { animation-delay: 0.6s; }

.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.6, 0.2, 1); }
.reveal.is-visible { opacity: 1; transform: none; }
.fade-img { opacity: 0; transition: opacity 1.2s ease; }
.fade-img.is-loaded { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .hero-bg, .page-hero-bg, .hero-inner > * { animation: none; }
  .hero-bg, .page-hero-bg { opacity: 0.35; }
  .reveal, .fade-img { opacity: 1; transform: none; transition: none; }
}
