/* ==========================================================================
   Digital Chimney — design tokens
   ========================================================================== */

:root {
  /* Palette (from the style sheet) */
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --dark-navy: #0F172A;
  --slate: #64748B;
  --light-gray: #F1F5F9;
  --white: #FFFFFF;

  /* Derived */
  --border: #E2E8F0;
  --hero-tint-a: rgba(15, 23, 42, 0.78);
  --hero-tint-b: rgba(15, 23, 42, 0.12);

  /* Type */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --container: 1280px;
  --gutter: 32px;
  --radius: 8px;
  --radius-lg: 12px;
  --header-h: 84px;
}

/* ==========================================================================
   Base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

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

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

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

h1,
h2,
h3 {
  margin: 0;
  color: var(--dark-navy);
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 56px;
  line-height: 1.1;
}

h2 {
  font-size: 40px;
  line-height: 1.2;
}

h3 {
  font-size: 28px;
  line-height: 1.3;
}

p {
  margin: 0;
}

.small {
  font-size: 14px;
  line-height: 1.6;
}

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

.eyebrow {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease,
    color 0.18s ease, transform 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.18s ease;
}

.btn:hover svg {
  transform: translateX(3px);
}

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

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-outline {
  border-color: var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline:hover {
  background: rgba(37, 99, 235, 0.08);
}

/* On the hero and CTA band the outline button sits on dark imagery */
.on-dark .btn-outline {
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--white);
}

.on-dark .btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--white);
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--primary);
}

.link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.18s ease;
}

.link:hover svg {
  transform: translateX(3px);
}

/* ==========================================================================
   Header / navbar
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.brand img {
  height: 62px;
  width: auto;
}

.brand-name {
  font-size: 26px;
  line-height: 1;
  color: var(--dark-navy);
  letter-spacing: -0.02em;
  font-weight: 800;
}

.brand-name .thin {
  font-weight: 600;
}

.brand-tag {
  padding-left: 24px;
  margin-left: 4px;
  border-left: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate);
}

.nav {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-left: auto;
}

.nav a {
  position: relative;
  padding: 6px 0;
  font-size: 16px;
  color: var(--dark-navy);
  transition: color 0.18s ease;
}

.nav a:hover {
  color: var(--primary);
}

.nav a.is-active {
  color: var(--primary);
}

.nav a.is-active::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -4px;
  height: 2px;
  background: var(--primary);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--dark-navy);
  cursor: pointer;
}

.nav-toggle svg {
  width: 26px;
  height: 26px;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 620px;
  padding-block: 96px;
  overflow: hidden;
  background-color: var(--dark-navy);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("assets/hero.svg");
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
}

/* Left-to-right scrim so the headline stays legible over the photograph */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  /* the illustration is already dark, so the scrim only has to protect the
     headline — anything heavier crushes the sunset out of it */
  background: linear-gradient(
    100deg,
    var(--hero-tint-a) 0%,
    rgba(15, 23, 42, 0.62) 30%,
    rgba(15, 23, 42, 0.34) 48%,
    var(--hero-tint-b) 64%,
    rgba(15, 23, 42, 0) 80%
  );
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-inner {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.88);
}

.hero .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.hero h1 {
  color: var(--white);
  margin-bottom: 24px;
}

.hero h1 .accent {
  color: #60A5FA;
}

.hero p {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 40px;
}

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

/* ==========================================================================
   Features
   ========================================================================== */

.features {
  padding-block: 88px;
  background: var(--light-gray);
}

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

.feature-icon {
  width: 40px;
  height: 40px;
  color: var(--primary);
  margin-bottom: 24px;
}

.feature h3 {
  font-size: 22px;
  margin-bottom: 12px;
}

.feature p {
  font-size: 15px;
}

.feature a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.feature a:hover {
  color: var(--primary);
}

/* ==========================================================================
   Pillars — "Your Vision. Our Expertise."
   ========================================================================== */

.pillars {
  padding-block: 88px;
  background: var(--light-gray);
  border-top: 1px solid var(--border);
  text-align: center;
}

.pillars .eyebrow {
  letter-spacing: 0.2em;
}

.pillars h2 {
  margin-bottom: 56px;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  text-align: left;
}

.pillar {
  padding: 32px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.pillar h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.pillar p {
  font-size: 15px;
}

/* ==========================================================================
   Featured work
   ========================================================================== */

.work {
  padding-block: 88px;
  background: var(--white);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
}

.section-head .eyebrow {
  color: var(--slate);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.project-thumb {
  display: block;
  aspect-ratio: 2 / 1;
  width: 100%;
  /* the width/height attributes on the <img> would otherwise win over aspect-ratio */
  height: auto;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 24px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.project a:first-child {
  display: block;
}

.project:hover .project-thumb {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

.project h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.project p {
  font-size: 15px;
  margin-bottom: 18px;
}

.project .link {
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   CTA band
   ========================================================================== */

.cta {
  position: relative;
  padding-block: 88px;
  overflow: hidden;
  background-color: #16294a;
  color: rgba(255, 255, 255, 0.82);
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("assets/hero.svg");
  background-size: cover;
  background-position: center 62%;
  opacity: 0.35;
}

.cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(22, 41, 74, 0.96) 0%,
    rgba(22, 41, 74, 0.82) 55%,
    rgba(22, 41, 74, 0.66) 100%
  );
}

.cta .container {
  position: relative;
  z-index: 1;
}

.cta .eyebrow {
  color: rgba(255, 255, 255, 0.7);
}

.cta h2 {
  color: var(--white);
  margin-bottom: 16px;
}

.cta p {
  margin-bottom: 32px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  padding-block: 40px;
  background: var(--dark-navy);
  color: rgba(255, 255, 255, 0.7);
}

.site-footer .container {
  display: flex;
  align-items: center;
  gap: 40px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-brand img {
  height: 58px;
  width: auto;
}

.footer-brand .brand-name {
  color: var(--white);
  font-size: 20px;
}

.footer-brand .small {
  color: rgba(255, 255, 255, 0.6);
}

.footer-nav {
  display: flex;
  gap: 36px;
  margin-inline: auto;
  font-size: 15px;
}

.footer-nav a:hover {
  color: var(--white);
}

.social {
  display: flex;
  gap: 20px;
  color: rgba(255, 255, 255, 0.82);
}

.social a {
  display: block;
  transition: color 0.18s ease;
}

.social a:hover {
  color: var(--white);
}

.social svg {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1080px) {
  h1 {
    font-size: 44px;
  }

  h2 {
    font-size: 34px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 32px;
  }

  .work-grid,
  .pillar-grid {
    grid-template-columns: 1fr;
  }

  .brand-tag {
    display: none;
  }
}

@media (max-width: 860px) {
  :root {
    --gutter: 20px;
    --header-h: 72px;
  }

  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    inset-inline: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
  }

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

  .nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
  }

  .nav a.is-active::after {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    min-height: 0;
    padding-block: 72px;
  }

  .hero::before {
    background-position: 72% center;
  }

  .hero::after {
    background: linear-gradient(
      165deg,
      rgba(15, 23, 42, 0.94) 0%,
      rgba(15, 23, 42, 0.78) 55%,
      rgba(15, 23, 42, 0.55) 100%
    );
  }

  h1 {
    font-size: 38px;
  }

  .hero p {
    font-size: 17px;
  }

  .features,
  .pillars,
  .work,
  .cta {
    padding-block: 60px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .site-footer .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
  }

  .footer-nav {
    flex-wrap: wrap;
    gap: 16px 28px;
    margin-inline: 0;
  }
}

@media (max-width: 560px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}
