/* ===== Variables ===== */
:root {
  --navy: #173462;
  --blue: #009EDB;
  --blue-dark: #0086bb;
  --black: #000000;
  --grey: #A2A2A2;
  --light-grey: #ECECEC;
  --pale-blue: #CCECF8;
  --white: #FFFFFF;

  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", Arial, Helvetica, sans-serif;

  --header-height: 72px;
  --max-width: 1200px;
  --gutter: 24px;

  --section-padding: 72px;
  --transition-fast: 0.2s ease;
  --transition-medium: 0.6s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--blue);
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, p {
  margin: 0;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 500;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Visible focus states for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--blue);
  color: var(--white);
  padding: 12px 20px;
  z-index: 1000;
}

.skip-link:focus {
  left: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Motion ===== */
body {
  opacity: 0;
}

body.loaded {
  opacity: 1;
  transition: opacity 0.6s ease;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  body,
  .reveal,
  .hero h1 .line,
  .hero-sub {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 13px 28px;
  border-radius: 2px;
  border: none;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
  transition: background var(--transition-fast);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--blue-dark);
  color: var(--white);
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--white);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.site-header.scrolled {
  border-bottom-color: var(--light-grey);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.header-bar {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-link img {
  height: 19px;
  width: auto;
}

.logo-link-mark img {
  height: 43px;
}

.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-links {
  display: flex;
  gap: 40px;
}

.nav-links a {
  color: var(--grey);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 2px;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active {
  color: var(--navy);
  border-color: var(--blue);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle .bar {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--black);
  margin: 6px 0;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: var(--white);
  background-color: var(--navy);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-tint {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(160deg, rgba(12, 29, 60, 0.28) 0%, rgba(23, 52, 98, 0.15) 55%, rgba(10, 23, 48, 0.34) 100%);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, rgba(10, 20, 45, 0.14) 0%, rgba(10, 20, 45, 0.3) 55%, rgba(6, 13, 30, 0.55) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  padding: calc(var(--header-height) + 24px) 0 150px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 32px;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .hero h1 {
    white-space: normal;
  }
}

.hero h1 .line {
  display: block;
  opacity: 0;
  animation: lineReveal 1s ease forwards;
}

.hero h1 .line:nth-child(1) { animation-delay: 0.15s; }
.hero h1 .line:nth-child(2) { animation-delay: 0.3s; }
.hero h1 .line:nth-child(3) { animation-delay: 0.45s; }

@keyframes lineReveal {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
  max-width: 540px;
  opacity: 0;
  animation: lineReveal 1s ease forwards;
  animation-delay: 0.65s;
}

.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  transition: opacity 0.3s ease;
}

.scroll-cue::before {
  content: "";
  width: 1px;
  height: 44px;
  background: rgba(255, 255, 255, 0.35);
  overflow: hidden;
  position: relative;
}

.scroll-cue span {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 14px;
  background: var(--white);
  animation: scrollCue 2s ease infinite;
}

@keyframes scrollCue {
  0% { top: -14px; opacity: 0; }
  30% { opacity: 1; }
  70% { opacity: 1; }
  100% { top: 44px; opacity: 0; }
}

@media (max-width: 640px) {
  .scroll-cue {
    display: none;
  }
}

/* ===== Proof strip ===== */
.proof-strip {
  background: var(--white);
  padding: var(--section-padding) 0;
  border-top: 1px solid var(--light-grey);
  border-bottom: 1px solid var(--light-grey);
}

.proof-grid {
  display: flex;
  align-items: center;
  justify-content: center;
}

.proof-item {
  flex: 1 1 0;
  text-align: center;
  padding: 0 16px;
}

.proof-divider {
  flex: 0 0 auto;
  width: 1px;
  height: 48px;
  margin: 0 32px;
  background: var(--light-grey);
}

.proof-value {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 10px;
}

.proof-label {
  font-size: 0.8rem;
  color: var(--grey);
  line-height: 1.5;
  white-space: nowrap;
}

/* ===== Section generic ===== */
.section {
  padding: var(--section-padding) 0;
}

.section-alt {
  background: var(--light-grey);
}

.section-heading {
  font-size: clamp(2rem, 3.2vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}

.section-intro {
  font-size: 1.1rem;
  color: var(--black);
  max-width: 560px;
  line-height: 1.7;
}

/* ===== About ===== */
.section-statement {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.4vw, 1.85rem);
  font-weight: 400;
  color: var(--navy);
  line-height: 1.55;
  max-width: 800px;
}

/* ===== Criteria ===== */
.criteria-columns {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  margin-top: 32px;
}

.criteria-columns::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(0, 0, 0, 0.1);
}

.criteria-col h3 {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 18px;
}

.criteria-col p {
  color: var(--black);
  line-height: 1.8;
  margin-bottom: 24px;
  max-width: 480px;
}

.criteria-col ul {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.criteria-col li {
  position: relative;
  padding-left: 28px;
  color: var(--black);
  line-height: 1.6;
}

.criteria-col li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 16px;
  height: 1px;
  background: var(--blue);
}

/* ===== Portfolio ===== */
.portfolio-statement {
  margin-bottom: 28px;
}

.portfolio-list {
  margin-top: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.portfolio-row {
  display: grid;
  grid-template-columns: 56px 1fr 1fr;
  align-items: baseline;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.portfolio-index {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--blue);
}

.portfolio-row h3 {
  font-size: 1.2rem;
  font-weight: 500;
}

.portfolio-row p {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--grey);
  line-height: 1.6;
}

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 80px;
}

.contact-intro-col .section-intro {
  margin-top: 4px;
}

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

.form-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grey);
}

.form-field .hint {
  font-size: 0.78rem;
  color: var(--grey);
  font-weight: normal;
  text-transform: none;
  letter-spacing: normal;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="file"],
.form-field textarea {
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 8px 0 12px;
  border: none;
  border-bottom: 1px solid var(--grey);
  border-radius: 0;
  background: transparent;
  color: var(--black);
}

.form-field textarea {
  resize: vertical;
  min-height: 110px;
  border: 1px solid var(--grey);
  border-radius: 0;
  padding: 12px;
}

.form-field input:focus-visible,
.form-field textarea:focus-visible {
  outline: none;
  border-color: var(--blue);
}

.form-actions {
  grid-column: 1 / -1;
  margin-top: 8px;
}

.form-submit {
  width: auto;
}

.form-success {
  max-width: 600px;
  padding: 0;
  font-size: 1.05rem;
  color: var(--navy);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--navy);
  padding: 48px 0;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.footer-logo img {
  height: 20px;
  width: auto;
  filter: brightness(0) invert(1);
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.footer-social svg {
  width: 18px;
  height: 18px;
  fill: var(--white);
}

.footer-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin: 0 0 24px;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--grey);
  text-align: center;
}

/* ===== Mobile nav panel ===== */
@media (max-width: 860px) {
  .nav-toggle {
    display: inline-block;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    z-index: 400;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 20px var(--gutter);
    width: 100%;
    border-bottom: 1px solid var(--light-grey);
    font-size: 0.85rem;
  }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  :root {
    --section-padding: 60px;
  }

  .criteria-columns {
    gap: 56px;
  }

  .contact-grid {
    gap: 56px;
  }
}

@media (max-width: 860px) {
  .criteria-columns {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .criteria-columns::before {
    display: none;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .proof-grid {
    flex-wrap: wrap;
    row-gap: 32px;
  }

  .proof-item {
    flex: 1 1 45%;
  }

  .proof-label {
    white-space: normal;
  }

  .proof-divider {
    display: none;
  }

  .portfolio-row {
    grid-template-columns: 40px 1fr;
  }

  .portfolio-row p {
    grid-column: 2 / -1;
  }
}

@media (max-width: 640px) {
  :root {
    --section-padding: 48px;
    --header-height: 64px;
    --gutter: 16px;
  }

  .logo-link img,
  .footer-logo img {
    height: 16px;
  }

  .logo-link-mark img {
    height: 29px;
  }

  .header-bar {
    gap: 12px;
  }

  .header-actions {
    gap: 10px;
  }

  .btn-primary {
    padding: 8px 14px;
    font-size: 0.68rem;
    letter-spacing: 0.02em;
  }

  .hero-content {
    padding: calc(var(--header-height) + 24px) 0 104px;
  }

  .hero h1 {
    font-size: clamp(1.9rem, 9vw, 2.6rem);
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .footer-top {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }

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

  .portfolio-row p {
    grid-column: auto;
  }
}
