/* ---------- Variables & Reset ---------- */
:root {
  --color-navy: #16213e;
  --color-navy-dark: #0e1526;
  --color-red: #b3261e;
  --color-red-dark: #8f1e18;
  --color-bg: #ffffff;
  --color-bg-alt: #f3f5f9;
  --color-text: #2c2f38;
  --color-text-light: #6b7280;
  --color-border: #e3e6ec;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', Arial, sans-serif;

  --header-height: 84px;
  --container-width: 1180px;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(16, 24, 48, 0.08);
  --transition: 0.25s ease;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

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

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--color-navy);
  margin: 0 0 0.5em;
  line-height: 1.2;
}

h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: var(--color-text-light); }

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

.eyebrow {
  color: var(--color-red);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 0.75em;
}

.section { padding: 96px 0; }
.section-alt { background: var(--color-bg-alt); }

.section-heading { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-heading .section-lead { margin: 0 auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform var(--transition), background var(--transition), color var(--transition);
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--color-navy);
  color: #fff;
}
.btn-primary:hover { background: var(--color-navy-dark); transform: translateY(-2px); }

.btn-outline {
  border-color: var(--color-navy);
  color: var(--color-navy);
  background: transparent;
}
.btn-outline:hover { background: var(--color-navy); color: #fff; transform: translateY(-2px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--color-border);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-red) 50%, var(--color-navy) 50%);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
}

.logo-text {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-navy);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  line-height: 1.3;
}
.logo-text small { color: var(--color-red); font-weight: 600; letter-spacing: 0.08em; }

.nav ul { display: flex; gap: 32px; }

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-text);
  padding: 8px 0;
  position: relative;
  transition: color var(--transition);
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--color-red);
  transition: width var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--color-red); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.header-cta { flex-shrink: 0; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-navy);
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
  padding: 80px 0;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 56px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  margin-bottom: 0.3em;
}
.hero h1 span { color: var(--color-red); }

.hero-lead { font-size: 1.05rem; max-width: 480px; }

.hero-actions { display: flex; gap: 16px; margin-top: 28px; flex-wrap: wrap; }

.hero-media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- About ---------- */
.about-inner {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 64px;
  align-items: start;
}

.about-text h3 {
  margin-top: 1.2em;
  font-size: 1.15rem;
}

.about-media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
}
.about-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  filter: grayscale(35%) contrast(1.05);
}
.about-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, rgba(22, 33, 62, 0.55) 0%, rgba(22, 33, 62, 0.15) 45%, rgba(22, 33, 62, 0.45) 100%);
  mix-blend-mode: multiply;
  pointer-events: none;
}

.about-facts {
  display: flex;
  gap: 40px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.about-facts li { display: flex; flex-direction: column; }
.about-facts strong {
  font-family: var(--font-heading);
  color: var(--color-red);
  font-size: 1.8rem;
}
.about-facts span { color: var(--color-text-light); font-size: 0.9rem; }

/* ---------- Services ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.service-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.service-card:hover,
.service-card:focus-within {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: var(--color-red);
}
.service-card:focus-visible {
  outline: 2px solid var(--color-red);
  outline-offset: 3px;
}

.service-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  color: var(--color-red);
}
.service-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card h3 { margin-bottom: 0.4em; }
.service-card p {
  font-size: 0.92rem;
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.service-card:hover p,
.service-card:focus-within p {
  -webkit-line-clamp: unset;
  overflow: visible;
}

.service-list {
  text-align: left;
  max-height: 0;
  margin-top: 0;
  padding-top: 0;
  border-top: 0 solid var(--color-border);
  opacity: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease, padding-top 0.3s ease, border-top-width 0.3s ease;
}
.service-card:hover .service-list,
.service-card:focus-within .service-list {
  max-height: 500px;
  margin-top: 16px;
  padding-top: 16px;
  border-top-width: 1px;
  opacity: 1;
}
.service-list li {
  position: relative;
  padding-left: 16px;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--color-text-light);
}
.service-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-red);
}

/* ---------- Publications ---------- */
.pub-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.pub-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.pub-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--color-navy);
}

.pub-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  color: var(--color-navy);
}
.pub-icon svg {
  width: 100%; height: 100%;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.pub-info { flex: 1; min-width: 0; }
.pub-info h3 { font-size: 1.05rem; margin-bottom: 0.2em; }
.pub-info p { font-size: 0.88rem; margin: 0; }

.pub-link {
  color: var(--color-red);
  font-weight: 600;
  font-size: 0.88rem;
  white-space: nowrap;
}

/* ---------- Contact ---------- */
.contact-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
}

.contact-list { margin-top: 28px; display: flex; flex-direction: column; gap: 18px; }
.contact-list li { display: flex; flex-direction: column; gap: 2px; }
.contact-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-navy);
}
.contact-list a:hover { color: var(--color-red); }

.contact-form {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-size: 0.9rem; font-weight: 600; color: var(--color-navy); }
.form-row input,
.form-row textarea {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color var(--transition);
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--color-red);
}
.form-row.invalid input,
.form-row.invalid textarea { border-color: var(--color-red); }

.form-error {
  color: var(--color-red);
  font-size: 0.8rem;
  min-height: 1em;
}

.contact-form .btn { align-self: flex-start; }

.form-status {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-navy);
  min-height: 1em;
  margin: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-navy-dark);
  color: #cfd3dd;
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #fff;
}
.footer-copy { margin: 0; font-size: 0.85rem; color: #9ba1b0; }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-red);
  color: #fff;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
  z-index: 90;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--color-red-dark); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner,
  .about-inner,
  .contact-inner {
    grid-template-columns: 1fr;
  }
  .about-media, .hero-media { max-width: 420px; margin: 0 auto; }
  .about-text { order: 2; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .pub-list { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --header-height: 72px; }

  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }
  .nav.open { max-height: 400px; }
  .nav ul { flex-direction: column; gap: 0; padding: 8px 24px 16px; }
  .nav-link { display: block; padding: 12px 0; }

  .header-cta { display: none; }
  .nav-toggle { display: flex; }

  .logo-text { font-size: 0.8rem; }

  .section { padding: 64px 0; }

  .contact-form { padding: 28px; }

  /* Hover-to-expand relies on a mouse; touch screens have no :hover,
     so always show the full description and detail list. */
  .service-card p {
    -webkit-line-clamp: unset;
    overflow: visible;
  }
  .service-list {
    max-height: none;
    margin-top: 16px;
    padding-top: 16px;
    border-top-width: 1px;
    opacity: 1;
  }
  .service-card:active {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--color-red);
  }

  .pub-card { flex-wrap: wrap; }

  .about-media { display: none; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { text-align: center; }
  .about-facts { flex-direction: column; gap: 16px; }
  .service-grid { grid-template-columns: 1fr; }

  .section { padding: 48px 0; }

  .pub-card { flex-direction: column; align-items: flex-start; gap: 12px; }
  .pub-link { align-self: flex-end; }

  .back-to-top { right: 16px; bottom: 16px; width: 44px; height: 44px; font-size: 1.05rem; }
}
