/* Renderstead marketing site: warm architectural paper, terracotta and blueprint ink */

:root {
  --bg: #f5f1ea;
  --bg-band: #ece6dc;
  --bg-dark: #0f1b2d;

  --text: #181a1d;
  --text-muted: #5c5952;
  --text-subtle: #7d7970;
  --text-on-dark: #f5f1ea;
  --text-on-dark-muted: #b7b1a6;

  --border: rgba(24, 26, 29, 0.14);
  --border-strong: rgba(24, 26, 29, 0.32);
  --border-dark: rgba(245, 241, 234, 0.16);

  --accent: #1d5c82;
  --accent-hover: #164a69;
  --ink-blue: #1d5c82;
  --ink-blue-light: #7fb0d0;

  --radius: 2px;
  --radius-btn: 3px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-body: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

.bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.skip-link:focus {
  left: 16px;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  padding: 16px 0;
  transition: background 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  padding: 11px 0;
  background: var(--bg);
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 54px;
  height: 54px;
}

.brand-mark--sm {
  width: 32px;
  height: 32px;
}

.brand-word {
  font-family: var(--font-body);
  font-size: 17px;
  letter-spacing: 0.24em;
  line-height: 1;
}

.brand-word b {
  font-weight: 600;
}

.brand-word span {
  font-weight: 400;
  color: #1d5c82;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink-blue);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13.5px;
}

.btn-lg {
  padding: 14px 26px;
  font-size: 16px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--text);
}

/* Hero */
.hero {
  position: relative;
  padding: 140px 0 96px;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 56px;
}

.hero h1 {
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.4vw, 3.7rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
}

.hero h1 em {
  font-style: italic;
}

.hero-lead {
  margin: 0 0 30px;
  max-width: 52ch;
  font-size: 17px;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.hero-specs {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-specs li {
  padding: 14px 16px 0 0;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.hero-specs li + li {
  padding-left: 16px;
  border-left: 1px solid var(--border);
}

/* Hero visual: photo plus caption bar */
.hero-visual {
  position: relative;
}

.showcase-frame {
  position: relative;
}

.hero-slides {
  display: grid;
}

.hero-slide {
  grid-area: 1 / 1;
  margin: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--bg-band);
}

.slide-tag {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding-right: 96px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text-muted);
}

.hero-slide:not(.is-active) .slide-tag {
  opacity: 0;
}

.tag-code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-blue);
}

.hero-controls {
  position: absolute;
  right: 0;
  bottom: 0;
  height: 44px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-dot {
  width: 22px;
  height: 3px;
  border-radius: 0;
  border: 0;
  padding: 0;
  background: var(--border-strong);
  transition: background 0.3s ease;
}

.hero-dot.is-active {
  background: var(--ink-blue);
}

/* Sections */
.section {
  padding: 104px 0;
  position: relative;
}

.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}

.section-process .section-head {
  max-width: none;
}

.section-head h2,
.contact-copy h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.2vw, 2.7rem);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: -0.01em;
}

.section-sub {
  margin: 0;
  font-size: 16.5px;
  color: var(--text-muted);
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 24px;
}

.gallery-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 0;
  border: 0;
  background: none;
}

.gallery-card--wide {
  grid-column: span 2;
}

.gallery-media {
  position: relative;
  flex: 1;
  min-height: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-band);
}

.gallery-card--wide .gallery-media {
  aspect-ratio: 21 / 10;
}

.gallery-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.gallery-card:hover .gallery-media img,
.gallery-card:focus-visible .gallery-media img {
  transform: scale(1.03);
}

.gallery-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0 0;
}

.gallery-meta h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
}

.gallery-note {
  font-size: 13px;
  color: var(--text-subtle);
}

/* Capabilities: two-column spec layout */
.section-capabilities {
  background: var(--bg-band);
}

.cap-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 64px;
  align-items: start;
}

.cap-layout .section-head {
  margin-bottom: 0;
}

.cap-list {
  border-top: 1px solid var(--border-strong);
}

.cap-row {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.cap-row h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
}

.cap-row p {
  margin: 0;
  font-size: 15px;
  color: var(--text-muted);
}

/* Process: hairline-topped strip */
.process-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}

.step {
  padding-top: 20px;
  border-top: 1px solid var(--border-strong);
}

.step-num {
  display: block;
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 400;
  line-height: 1;
  color: var(--ink-blue);
  margin-bottom: 18px;
}

.step h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
}

.step p {
  margin: 0;
  font-size: 15px;
  color: var(--text-muted);
}

/* Contact: dark band */
.section-contact {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  border-top: 1px solid var(--border-dark);
}

.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: 48px;
}

.contact-copy p {
  margin: 0;
  color: var(--text-on-dark-muted);
  font-size: 16px;
  max-width: 48ch;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-contact .btn-primary {
  background: #2a76a5;
}

.section-contact .btn-primary:hover {
  background: #3385b7;
}

.section-contact .btn-ghost {
  border-color: var(--border-dark);
  color: var(--text-on-dark);
}

.section-contact .btn-ghost:hover {
  border-color: var(--text-on-dark);
}

[data-copy-email].is-copied {
  border-color: var(--accent);
  color: var(--text-on-dark);
}

/* Footer */
.site-footer {
  padding: 32px 0 44px;
  background: var(--bg-dark);
  color: var(--text-on-dark);
  border-top: 1px solid var(--border-dark);
}

.site-footer .brand-word {
  font-size: 14px;
}

.site-footer .brand-word span {
  color: #a8d4f0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-links {
  font-size: 13.5px;
  color: var(--text-on-dark-muted);
}

.footer-links a {
  color: var(--ink-blue-light);
}

.footer-links a:hover {
  color: var(--text-on-dark);
}

.footer-copy {
  margin: 0;
  font-size: 13px;
  color: var(--text-on-dark-muted);
}

/* Lightbox */
html.lightbox-open {
  overflow: hidden;
}

.lightbox[hidden] {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.lightbox.is-open {
  opacity: 1;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 27, 34, 0.94);
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(1160px, 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.lightbox-figure {
  margin: 0;
  flex: 1;
  max-width: 1020px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lightbox-figure img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox-figure figcaption {
  text-align: center;
  font-size: 14.5px;
  color: var(--text-on-dark-muted);
}

.lightbox-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border-dark);
  background: transparent;
  color: var(--text-on-dark);
  display: grid;
  place-items: center;
  flex: none;
  transition: border-color 0.2s ease;
}

.lightbox-btn:hover {
  border-color: var(--text-on-dark);
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
}

/* Scroll reveal (progressive enhancement via .js-ready) */
.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.js-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 980px) {
  .hero {
    padding: 120px 0 72px;
  }

  .hero-inner,
  .cap-layout,
  .contact-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-card--wide {
    grid-column: span 2;
  }

  .process-steps {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 720px) {
  .site-nav {
    display: none;
  }

  .hero-specs {
    grid-template-columns: 1fr;
  }

  .hero-specs li,
  .hero-specs li + li {
    padding: 10px 0;
    border-left: 0;
    border-bottom: 1px solid var(--border);
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .gallery-card--wide {
    grid-column: auto;
  }

  .gallery-card--wide .gallery-media {
    aspect-ratio: 16 / 10;
  }

  .cap-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .section {
    padding: 72px 0;
  }

  .lightbox-dialog {
    flex-direction: column;
  }

  .lightbox-prev,
  .lightbox-next {
    position: fixed;
    bottom: 20px;
  }

  .lightbox-prev {
    left: 24px;
  }

  .lightbox-next {
    right: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-slide,
  .gallery-media img,
  .js-ready [data-reveal] {
    transition: none;
    transform: none;
  }

  .js-ready [data-reveal] {
    opacity: 1;
  }
}
