* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }

/* Tokens */
:root{
  --bg: #ffffff;
  --alt: #f1f5f9;         /* slightly darker than before for better contrast */
  --text: #0f172a;
  --muted: #475569;
  --border: #e5e7eb;

  --brand: #0b2545;
  --accent: #1d4ed8;

  --radius: 14px;
  --radius-sm: 10px;

  --shadow-sm: 0 10px 24px rgba(15, 23, 42, 0.06);
  --shadow: 0 18px 44px rgba(15, 23, 42, 0.10);

  --container: min(1120px, 92%);
  --section-y: 68px;

  --ease: 160ms ease;
}

/* Base */
body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container{
  width: var(--container);
  margin: 0 auto;
}

section[id]{ scroll-margin-top: 92px; }

/* Focus */
a:focus-visible,
.btn:focus-visible{
  outline: 3px solid rgba(29, 78, 216, 0.35);
  outline-offset: 2px;
  border-radius: 12px;
}

/* Header */
.site-header{
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.logo{
  font-weight: 850;
  letter-spacing: 0.2px;
  color: var(--brand);
  white-space: nowrap;
}

.nav{
  display: flex;
  gap: 10px;
  align-items: center;
}

.nav a{
  color: var(--muted);
  font-weight: 650;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 10px;
  transition: background var(--ease), color var(--ease);
}

.nav a:hover{
  color: var(--text);
  background: rgba(15, 23, 42, 0.04);
}

/* Buttons */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  font-weight: 750;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform var(--ease),
    filter var(--ease),
    background var(--ease),
    border-color var(--ease),
    box-shadow var(--ease);
}

.btn:hover{ transform: translateY(-1px); }
.btn:active{ transform: translateY(0px); }

.btn-primary{
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover{ filter: brightness(0.96); }

.btn-ghost{
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover{
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
  border-color: rgba(29, 78, 216, 0.22);
}

/* Typography */
.kicker{
  margin: 0 0 10px;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  font-size: 12px;
}

h1{
  margin: 0 0 12px;
  color: var(--brand);
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.3px;
}

h2{
  margin: 0 0 14px;
  color: var(--brand);
  font-size: 28px;
  letter-spacing: -0.2px;
}

h3{
  margin: 0 0 8px;
  color: var(--brand);
}

.lead{
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 18px;
  max-width: 70ch;
}

.authority-line{
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: 10px;
}

/* Hero (adds subtle top-to-bottom structure) */
.hero{
  padding: 80px 0 56px;
  background: linear-gradient(180deg, rgba(241,245,249,0.65), rgba(255,255,255,0));
  border-bottom: 1px solid var(--border);
}

.hero-actions{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

/* Sections */
.section{
  padding: var(--section-y) 0;
}

.section-alt{
  background: var(--alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* Grids */
.cards{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

/* Better layout for 3 work items */
.work-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.split{
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  align-items: start;
}

/* Cards */
.card,
.work-card,
.contact-box{
  position: relative;
  background: #fff;
  border: 1px solid rgba(229,231,235,0.9);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

/* Subtle top accent line (adds “structured” feel) */
.card::before,
.work-card::before,
.contact-box::before{
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(29,78,216,0.55), rgba(11,37,69,0.35));
  opacity: 0.85;
}

.card,
.work-card{
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.card:hover,
.work-card:hover{
  transform: translateY(-2px);
  border-color: rgba(29, 78, 216, 0.22);
  box-shadow: var(--shadow);
}

.work-card .btn{
  margin-top: 10px;
}

/* Lists */
.list{
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.list li{ margin-bottom: 8px; }

/* Contact (fix big empty space by centering + max width) */
.contact-box{
  margin-top: 16px;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.contact-box p{
  margin: 0 0 8px;
  color: var(--muted);
}

/* Footer */
.site-footer{
  border-top: 1px solid var(--border);
  padding: 18px 0;
  color: var(--muted);
  font-size: 14px;
}

/* Responsive */
@media (max-width: 1020px){
  .work-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px){
  .nav{ display: none; }

  .cards{ grid-template-columns: 1fr; }
  .work-grid{ grid-template-columns: 1fr; }
  .split{ grid-template-columns: 1fr; }

  .hero{ padding: 60px 0 44px; }

  .header-inner{ padding: 12px 0; }

  .header-inner .btn-primary{
    padding: 10px 14px;
    border-radius: 12px;
  }
}
