/* Thoughtpost — base styles
   Palette pulled from the original site's section accent colors. */

:root {
  --color-primary: #20739c;
  --color-primary-dark: #16526f;
  --color-accent: #3ab0e2;
  --color-green: #34d293;
  --color-yellow: #f7d861;
  --color-coral: #e96656;

  --color-ink: #1f2630;
  --color-body: #4a5460;
  --color-muted: #7a8390;
  --color-surface: #ffffff;
  --color-surface-alt: #f5f7f9;
  --color-border: #e4e8ec;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --max-width: 1120px;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, 0.10);
  --shadow-lg: 0 20px 50px rgba(16, 24, 40, 0.16);
}

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

html { scroll-behavior: smooth; }

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

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

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-dark); }

h1, h2, h3, h4 { color: var(--color-ink); line-height: 1.2; margin: 0 0 0.5em; }

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

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

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.75em;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--color-coral);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: #d9543f; color: #fff; }

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }

/* ---------- Header / Nav ---------- */

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

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
}
.brand img { height: 28px; width: auto; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list a {
  color: var(--color-ink);
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-list a:hover { color: var(--color-primary); }

.nav-list .btn-primary { padding: 0.6em 1.4em; color: #fff; }
.nav-list .btn-primary:hover { color: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-ink);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-list {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 20px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.18s ease, opacity 0.18s ease;
  }
  .nav-list.is-open {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-list li { border-top: 1px solid var(--color-border); }
  .nav-list li:first-child { border-top: none; }
  .nav-list a { display: block; padding: 14px 0; }
  .nav-list .btn-primary { margin: 14px 0; text-align: center; justify-content: center; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 140px 0 110px;
  background:
    linear-gradient(135deg, rgba(22, 36, 48, 0.86), rgba(32, 115, 156, 0.80)),
    url("../images/hero-bg.jpg") center/cover no-repeat;
  color: #fff;
  text-align: center;
}

.hero-eyebrow {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-yellow);
  margin-bottom: 18px;
}

.hero h1 {
  color: #fff;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.hero p {
  max-width: 560px;
  margin: 0 auto 36px;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.88);
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Section scaffolding ---------- */

section { padding: 96px 0; }
section + section { border-top: 1px solid var(--color-border); }

.section-header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 56px;
}
.section-eyebrow {
  display: inline-block;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 14px;
}
.section-header h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.section-header p { color: var(--color-muted); font-size: 1.05rem; }

/* ---------- Services ---------- */

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

@media (max-width: 920px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .services-grid { grid-template-columns: 1fr; }
}

.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px 26px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.service-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 20px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-alt);
}
.service-icon img { width: 100%; height: 100%; object-fit: cover; }

.service-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.service-card p { font-size: 0.95rem; color: var(--color-muted); margin: 0; }
.service-card a.service-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.85rem;
  font-weight: 600;
}

.accent-bar { height: 4px; width: 36px; border-radius: 4px; margin: 0 auto 18px; }
.accent-bar.coral { background: var(--color-coral); }
.accent-bar.green { background: var(--color-green); }
.accent-bar.blue { background: var(--color-accent); }
.accent-bar.yellow { background: var(--color-yellow); }

/* ---------- Team ---------- */

.team-grid {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 40px;
  align-items: center;
  background: var(--color-surface-alt);
  border-radius: var(--radius);
  padding: 40px;
}

@media (max-width: 720px) {
  .team-grid { grid-template-columns: 1fr; text-align: center; }
}

.team-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
  border: 4px solid var(--color-surface);
}
.team-photo img { width: 100%; height: 100%; object-fit: cover; }

.team-name { font-size: 1.4rem; margin-bottom: 2px; }
.team-role { color: var(--color-primary); font-weight: 600; margin-bottom: 16px; }
.team-bio { color: var(--color-body); margin-bottom: 18px; }

.social-row {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
}
@media (max-width: 720px) {
  .social-row { justify-content: center; }
}

.social-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-ink);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.social-icon:hover {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-2px);
}
.social-icon svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- Contact ---------- */

.contact-section {
  background: linear-gradient(160deg, var(--color-ink), #2a3545);
  color: #fff;
}
.contact-section .section-header p { color: rgba(255, 255, 255, 0.72); }
.contact-section .section-header h2 { color: #fff; }

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

.contact-info-list { list-style: none; margin: 0; padding: 0; }
.contact-info-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.85);
}
.contact-info-list svg { flex-shrink: 0; width: 22px; height: 22px; fill: var(--color-accent); margin-top: 2px; }
.contact-info-list a { color: #fff; font-weight: 600; }
.contact-info-list a:hover { color: var(--color-accent); }

.contact-form {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 32px;
  display: grid;
  gap: 16px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.contact-form label { font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; display: block; color: rgba(255,255,255,0.85); }

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(255, 255, 255, 0.4); }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  background: rgba(255, 255, 255, 0.12);
}

.form-note {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  margin-top: -4px;
}

/* ---------- Footer ---------- */

.site-footer {
  background: #14181f;
  color: rgba(255, 255, 255, 0.65);
  padding: 48px 0 28px;
  font-size: 0.9rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 24px;
}

.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; }
.footer-brand img { height: 22px; filter: brightness(0) invert(1); }

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

.footer-links { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: rgba(255, 255, 255, 0.65); }
.footer-links a:hover { color: #fff; }

.site-footer .social-icon {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.75);
}
.site-footer .social-icon:hover { background: var(--color-primary); color: #fff; }

/* ---------- Legal pages ---------- */

.legal-page {
  padding: 64px 0 96px;
  max-width: 760px;
  margin: 0 auto;
}
.legal-page h1 { font-size: 2.1rem; margin-bottom: 8px; }
.legal-updated { color: var(--color-muted); margin-bottom: 40px; font-size: 0.9rem; }
.legal-page h4 {
  margin-top: 36px;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-primary);
}
.legal-page p { margin: 0 0 16px; }
.legal-page a { word-break: break-word; }

/* ---------- 404 ---------- */

.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
}
.error-page h1 { font-size: 5rem; color: var(--color-primary); margin-bottom: 0; }
.error-page p { color: var(--color-muted); margin-bottom: 24px; }
