/* ============================================================
   RACO — static one-page site
   Design system: Pravah ("engineering dossier on warm parchment")
   Parchment canvas, ink typography, single family (Inter, the
   dossier's ABCfavorit substitute), two weights (400/700).
   No chromatic accents, no shadows: depth from tone + 1px borders.
   One aubergine inversion band (Why Us). Pill primary CTAs,
   4px radius everywhere else.
   ============================================================ */

:root {
  /* Pravah structure, Raco brand hues: neutrals tinted toward the
     logo green, deep brand green replaces aubergine as the inversion */
  --parchment: #f2f4f0;
  --white:     #ffffff;
  --ink:       #10190f;
  --charcoal:  #1f2a20;
  --inversion: #013220; /* brand deep green — single full-bleed band */
  --ash:       #a4aca4;
  --dim:       #5f6b60;
  --bone:      #d6dbd4;

  /* brand accents, used sparingly */
  --brand:      #05664F;
  --brand-mint: #8FD6BD;

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

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

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-weight: 400;
  color: var(--ink);
  background: var(--parchment);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: 400; line-height: 1.2; }

img, svg { max-width: 100%; }

.container {
  width: min(1200px, 100% - 3rem);
  margin-inline: auto;
}

.section { padding: clamp(4rem, 7vw, 6rem) 0; }

#about, #services, #projects, #why-us, #contact { scroll-margin-top: 72px; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.section-head { max-width: 640px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* uppercase tracked label — white badge, field-classification tag */
.eyebrow {
  display: inline-block;
  background: #dfeee6;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--inversion);
  margin-bottom: 16px;
}
.eyebrow.light { background: var(--white); color: var(--inversion); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--parchment);
  padding: 10px 16px;
  border-radius: 0 0 4px 0;
}
.skip-link:focus { left: 0; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-family: var(--font);
  font-weight: 400;
  font-size: 15px;
  padding: 8px 20px;
  border-radius: 100px;
  text-decoration: none;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: background-color 150ms var(--ease-out), transform 120ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; }

/* secondary: square outlined, for technical contexts */
.btn-ghost { border-radius: 4px; padding: 8px 16px; }

.btn-full { width: 100%; text-align: center; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 15px;
  color: var(--brand);
  text-decoration: none;
}
.text-link svg { transition: transform 200ms var(--ease-out); }

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--parchment);
  border-bottom: 1px solid var(--bone);
}

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

.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo-img { height: 40px; width: auto; display: block; mix-blend-mode: multiply; }

.site-nav { display: flex; align-items: center; gap: 1.6rem; }
.site-nav a {
  font-size: 15px;
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
  transition: color 150ms var(--ease-out);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 20px;
  border-radius: 100px;
  border: 1px solid var(--ink);
  transition: background-color 150ms var(--ease-out), transform 120ms var(--ease-out);
}
.nav-cta:active { transform: scale(0.97); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--ink);
  transition: transform 250ms var(--ease-out), opacity 200ms var(--ease-out);
}

/* ============ HERO — parchment, two-line mixed treatment ============ */
.hero { position: relative; border-bottom: 1px solid var(--bone); }

/* scroll-linked drift (values driven by JS, transform/opacity only) */
.hero-copy, .hero-visual { will-change: transform, opacity; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--dim);
  text-decoration: none;
  transition: opacity 200ms var(--ease-out), color 150ms var(--ease-out);
}
.scroll-cue svg { animation: cue-nudge 2.4s var(--ease-out) infinite; }
@keyframes cue-nudge {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(4px); }
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 3rem;
  padding: clamp(4rem, 8vw, 7rem) 0;
}

/* quiet lead-in line — hierarchy from size + tone, not weight */
.hero-eyebrow {
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 400;
  color: var(--dim);
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(34px, 4.8vw, 52px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--charcoal);
  margin-bottom: 24px;
}
.hero h1 em { font-style: normal; color: var(--brand); }

.hero-sub {
  font-size: 17px;
  color: var(--dim);
  max-width: 52ch;
  margin-bottom: 32px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.hero-visual { display: grid; place-items: center; }

/* Pravah hero graphic: dark image panel + glass monitoring cards */
.hero-media {
  position: relative;
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
}
.hero-media img {
  display: block;
  width: 100%;
  height: clamp(300px, 36vw, 430px);
  object-fit: cover;
}
.glass-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 250px;
  padding: 12px 16px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.glass-card strong { font-size: 14px; font-weight: 700; color: var(--ink); }
.glass-label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--brand);
}
.glass-sub { font-size: 12px; color: var(--dim); }
.glass-card-1 { top: 16px; left: 16px; }
.glass-card-2 { bottom: 16px; right: 16px; }

/* ============ HERO ENTRANCE / SCROLL REVEALS ============ */
.anim-hero {
  opacity: 0;
  transform: translateY(14px);
  filter: blur(5px);
  animation: hero-in 650ms var(--ease-out) forwards;
  animation-delay: calc(var(--d, 0) * 90ms);
}
@keyframes hero-in {
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* Progressive enhancement: reveals only engage once JS confirms the
   observer is live (html.js-reveal). Without JS, content is visible. */
html.js-reveal .reveal {
  opacity: 0;
  transform: translateY(16px);
  filter: blur(5px);
  transition: opacity 600ms var(--ease-out),
              transform 600ms var(--ease-out),
              filter 600ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
html.js-reveal .reveal.in-view {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* ============ ABOUT ============ */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}

.about-copy h2 {
  font-size: clamp(28px, 3.2vw, 40px);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.about-copy p { font-size: 15px; color: var(--charcoal); margin-bottom: 24px; max-width: 65ch; }

.photo-panel {
  position: relative;
  margin: 0;
  border-radius: 4px;
  overflow: hidden;
}
.photo-panel img {
  display: block;
  width: 100%;
  height: clamp(320px, 34vw, 440px);
  object-fit: cover;
  filter: saturate(0.85);
}
.inset-card {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px;
  border-radius: 4px;
  background: var(--white);
  border: 1px solid var(--bone);
}
.inset-card strong { font-size: 14px; font-weight: 700; color: var(--ink); }
.inset-label {
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--brand);
}
.inset-sub { font-size: 12px; color: var(--dim); }

/* ============ STATS — quiet fact strip ============ */
.stats-band {
  border-top: 1px solid var(--bone);
  border-bottom: 1px solid var(--bone);
  padding: 32px 0;
}
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.stat { padding-left: 16px; border-left: 1px solid var(--bone); }
.stat:first-child { padding-left: 0; border-left: none; }
.stat-number {
  display: block;
  font-size: 40px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.stat-number { color: var(--inversion); }
.stat-label {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  color: var(--dim);
}

/* ============ SERVICES — numbered index ============ */
#services { padding-bottom: clamp(5rem, 8vw, 7rem); }

.services-list {
  list-style: none;
  border-top: 1px solid var(--bone);
}
.service-row {
  display: grid;
  grid-template-columns: 4.5rem 1fr auto;
  align-items: start;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--bone);
}
.service-num {
  font-size: 14px;
  font-weight: 400;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  padding-top: 4px;
}
.service-body h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 4px;
  color: var(--ink);
}
.service-body p {
  font-size: 15px;
  color: var(--dim);
  max-width: 62ch;
}
.service-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 4px;
  background: var(--white);
  border: 1px solid var(--bone);
  color: var(--brand);
  transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out);
}
.service-icon svg { width: 24px; height: 24px; }

/* ============ CLIENT / PARTNER LOGO LOOPS ============ */
.clients-section { padding-bottom: 2rem; }
.partners-section { padding-top: 2rem; padding-bottom: clamp(3rem, 5vw, 4.5rem); }

.logo-loop {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.logo-track {
  display: flex;
  width: max-content;
  background: var(--parchment); /* transform makes this the blend backdrop for multiply'd logos */
  animation: logo-scroll 40s linear infinite;
}
.logo-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: clamp(2.5rem, 6vw, 5rem);
  padding-right: clamp(2.5rem, 6vw, 5rem);
}
@keyframes logo-scroll {
  to { transform: translateX(-50%); }
}

.logo-item {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.logo-item img {
  height: 52px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  mix-blend-mode: multiply; /* hides white JPG boxes on the parchment */
  filter: grayscale(1) opacity(0.75);
  transition: filter 250ms var(--ease-out);
}
.logo-item img.logo-tall { height: 86px; margin: -12px 0; }
.logo-item figcaption {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--dim);
}
.logo-wordmark {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--ink);
  opacity: 0.75;
  line-height: 52px;
  transition: opacity 250ms var(--ease-out);
}

/* ============ PROJECTS — ruled rows ============ */
.field-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}
.field-gallery figure { margin: 0; }
.field-gallery img {
  display: block;
  width: 100%;
  height: clamp(180px, 18vw, 240px);
  object-fit: cover;
  border-radius: 4px;
  filter: saturate(0.85);
}
.field-gallery figcaption {
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--dim);
}

.projects-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(2rem, 5vw, 4rem);
}
.project-row {
  padding: 24px 0;
  border-top: 1px solid var(--bone);
}
.project-tag {
  display: inline-block;
  background: #dfeee6;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 8px;
}
.project-row p { font-size: 15px; color: var(--charcoal); max-width: 52ch; }

/* ============ WHY US — the single aubergine inversion ============ */
.why-section {
  background: var(--inversion);
  color: var(--white);
  padding: clamp(4.5rem, 8vw, 7rem) 0;
}
.why-section h2 { color: var(--white); }
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 clamp(2.5rem, 6vw, 5rem);
}
.why-item {
  padding: 24px 0;
  border-bottom: 1px solid rgba(1, 50, 32, 0.35);
}
.why-item h3 {
  position: relative;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  padding-left: 24px;
  margin-bottom: 6px;
  color: var(--white);
}
/* diamond marker */
.why-item h3::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.42em;
  width: 9px;
  height: 9px;
  background: var(--brand-mint);
  transform: rotate(45deg);
}
.why-item p {
  font-size: 15px;
  color: #b7cdc2;
  padding-left: 24px;
  max-width: 46ch;
}

/* ============ CONTACT ============ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}
.contact-copy h2 {
  font-size: clamp(28px, 3.2vw, 40px);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.contact-copy p { font-size: 15px; color: var(--charcoal); margin-bottom: 28px; max-width: 60ch; }

.contact-address {
  display: flex;
  gap: 10px;
  font-style: normal;
  color: var(--charcoal);
  font-size: 15px;
  line-height: 1.5;
}
.contact-address svg { color: var(--ink); flex-shrink: 0; margin-top: 2px; }

.contact-form {
  background: var(--white);
  border: 1px solid var(--bone);
  border-radius: 4px;
  padding: 24px;
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: var(--ink);
}
.field input, .field textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 16px; /* <16px triggers iOS focus zoom */
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--bone);
  border-radius: 4px;
  padding: 10px 12px;
  resize: vertical;
  transition: border-color 150ms var(--ease-out);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand);
}
.form-status { margin-top: 12px; font-size: 14px; min-height: 1.4em; color: var(--charcoal); }
.form-status.ok { color: var(--brand); }
.form-status.err { color: var(--ink); font-weight: 700; }

/* ============ FOOTER — brand inversion ============ */
.site-footer {
  background: var(--inversion);
  color: #b7cdc2;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 48px 0 32px;
}
.footer-brand p { margin-top: 12px; font-size: 14px; color: #b7cdc2; max-width: 30ch; }
.footer-logo {
  display: inline-block;
  background: var(--white);
  border-radius: 4px;
  padding: 8px 12px;
}
.footer-logo img { height: 32px; width: auto; display: block; }

.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-nav a {
  color: #d9e6df;
  text-decoration: none;
  font-size: 14px;
  transition: color 150ms var(--ease-out);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 20px 0 24px;
  font-size: 12px;
  color: #9db8ac;
}

/* ============ HOVER (pointer devices only) ============ */
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: rgba(1, 50, 32, 0.06); }
  .nav-cta:hover { background: rgba(1, 50, 32, 0.06); }
  .text-link:hover svg { transform: translateX(3px); }
  .scroll-cue:hover { color: var(--brand); }
  .site-nav a:not(.nav-cta):hover { color: var(--brand); }
    .service-row:hover .service-icon { background: var(--inversion); color: var(--brand-mint); }
  .logo-item:hover img { filter: grayscale(0) opacity(1); }
  .logo-item:hover .logo-wordmark { opacity: 1; }
  .footer-nav a:hover { color: var(--white); }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: left; gap: 2.2rem; }
  .hero-visual { place-items: stretch; }
  .hero-media img { height: clamp(240px, 44vw, 340px); }
  .photo-panel img { height: clamp(260px, 50vw, 380px); }
  .field-gallery { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-media { order: 2; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
  .stat:nth-child(3) { padding-left: 0; border-left: none; }
  .projects-list { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .service-row { grid-template-columns: 2.6rem 1fr; }
  .service-icon { display: none; }

  .field-gallery { grid-template-columns: 1fr; }
  .field-gallery img { height: 200px; }
  .glass-card { max-width: 210px; padding: 10px 12px; }
  .glass-card strong { font-size: 13px; }
  .hero h1 { font-size: clamp(30px, 8.4vw, 38px); }
  .stats-strip { gap: 16px; }
  .stat-number { font-size: 32px; }

  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--bone);
    padding: 0.5rem 1.5rem 1rem;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out);
  }
  .site-nav.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .site-nav a { padding: 0.7rem 0; width: 100%; }
  .nav-cta { text-align: center; margin-top: 0.5rem; }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .anim-hero, .reveal { opacity: 1; transform: none; filter: none; }
  .logo-track { animation: none; }
  .scroll-cue svg { animation: none; }
  .hero-copy, .hero-visual { transform: none !important; opacity: 1 !important; }
}
