/* =========================================================
   CASEY WEB SOLUTIONS
   Main Stylesheet
   ========================================================= */

/* ---------- Brand Variables ---------- */

:root {
  --navy: #0d1b2a;
  --navy-deep: #071426;

  --blue: #1565d8;
  --blue-bright: #2b7fff;

  --text: #172033;
  --muted: #64748b;

  --light: #f7f9fc;
  --border: #e5e7eb;

  --white: #ffffff;
}

/* ---------- Base ---------- */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;

  background: var(--white);
  color: var(--text);

  line-height: 1.6;
}

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

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

/* =========================================================
   HEADER / NAVIGATION
   ========================================================= */

header {
  position: sticky;
  top: 0;
  z-index: 1000;

  background: rgba(255, 255, 255, 0.96);

  backdrop-filter: blur(10px);

  border-bottom: 1px solid var(--border);
}

nav {
  position: relative;

  width: 100%;
  max-width: 1200px;

  margin: 0 auto;
  padding: 14px 24px;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */

.brand {
  display: flex;
  align-items: center;
}

.site-logo {
  width: 240px;
  height: auto;
}

/* Desktop navigation */

.nav-links {
  display: flex;
  align-items: center;

  gap: 30px;
}

.nav-links a {
  position: relative;

  color: var(--navy);

  font-size: 0.95rem;
  font-weight: 600;

  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";

  position: absolute;

  left: 0;
  bottom: -7px;

  width: 0;
  height: 2px;

  background: var(--blue);

  transition: width 0.2s ease;
}

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

.nav-links a:hover::after {
  width: 100%;
}

/* Mobile hamburger */

.menu-toggle {
  display: none;

  width: 44px;
  height: 44px;

  padding: 9px;

  border: 0;
  border-radius: 8px;

  background: transparent;

  cursor: pointer;
}

.menu-toggle span {
  display: block;

  width: 100%;
  height: 2px;

  margin: 5px 0;

  border-radius: 5px;

  background: var(--navy);

  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

/* =========================================================
   HERO
   ========================================================= */

#hero {
  position: relative;

  overflow: hidden;

  min-height: 680px;

  padding: 90px 24px;

  display: flex;
  align-items: center;

  background:
    radial-gradient(
      circle at 78% 35%,
      rgba(43, 127, 255, 0.24),
      transparent 28%
    ),
    radial-gradient(
      circle at 70% 90%,
      rgba(21, 101, 216, 0.12),
      transparent 32%
    ),
    linear-gradient(135deg, #071426 0%, #0d1b2a 58%, #102b4e 100%);

  color: var(--white);
}

/* Technical background grid */

#hero::before {
  content: "";

  position: absolute;

  inset: 0;

  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);

  background-size: 60px 60px;

  mask-image: linear-gradient(to right, transparent, black 45%, black);

  pointer-events: none;
}

/* Blue glow behind mockup */

#hero::after {
  content: "";

  position: absolute;

  width: 550px;
  height: 550px;

  right: -110px;
  top: 50%;

  transform: translateY(-50%);

  border-radius: 50%;

  background: radial-gradient(
    circle,
    rgba(43, 127, 255, 0.18),
    transparent 68%
  );

  pointer-events: none;
}

/* Two-column layout */

.hero-inner {
  position: relative;
  z-index: 1;

  width: 100%;
  max-width: 1200px;

  margin: 0 auto;

  display: grid;
  grid-template-columns: 1.02fr 0.98fr;

  gap: 84px;

  align-items: center;
}

/* Hero copy */

.hero-copy {
  max-width: 670px;
}

.hero-eyebrow {
  margin-bottom: 18px;

  color: var(--blue-bright);

  font-size: 0.82rem;
  font-weight: 700;

  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#hero h1 {
  max-width: 620px;

  margin-bottom: 25px;

  font-size: clamp(2.8rem, 4.5vw, 4.2rem);

  line-height: 1.03;

  letter-spacing: -0.04em;
}

.headline-accent {
  color: var(--blue-bright);
}

.hero-description {
  max-width: 650px;

  margin-bottom: 34px;

  color: #cbd5e1;

  font-size: 1.12rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;

  gap: 16px;
}

/* ---------- Hero Browser Mockup ---------- */

.hero-visual {
  position: relative;

  min-height: 470px;

  display: flex;
  align-items: center;
  justify-content: center;

  perspective: 1200px;
}

.browser-window {
  position: relative;

  width: 108%;
  max-width: 560px;

  overflow: hidden;

  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;

  background: var(--white);

  box-shadow:
    0 35px 80px rgba(0, 0, 0, 0.38),
    0 0 45px rgba(43, 127, 255, 0.12);

  transform: translate(18px, 12px) rotateY(-4deg) rotateX(1deg);
}

/* Fake browser toolbar */

.browser-bar {
  height: 46px;

  padding: 0 14px;

  display: flex;
  align-items: center;

  gap: 12px;

  background: #edf1f6;

  border-bottom: 1px solid #dbe2ea;
}

.browser-dots {
  display: flex;

  gap: 6px;
}

.browser-dots span {
  width: 9px;
  height: 9px;

  border-radius: 50%;

  background: #aab3c0;
}

.browser-dots span:first-child {
  background: #ff6b6b;
}

.browser-dots span:nth-child(2) {
  background: #f5c451;
}

.browser-dots span:nth-child(3) {
  background: #51c878;
}

.browser-address {
  flex: 1;

  padding: 5px 12px;

  border-radius: 6px;

  background: var(--white);

  color: #718096;

  font-size: 0.72rem;
}

/* Fake website */

.browser-page {
  min-height: 360px;

  background: linear-gradient(135deg, #f8fbff, #edf5ff);

  color: var(--navy);
}

.demo-nav {
  height: 60px;

  padding: 0 22px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  background: var(--white);

  border-bottom: 1px solid var(--border);
}

.demo-brand {
  font-size: 0.76rem;
  font-weight: 800;

  letter-spacing: 0.08em;
}

.demo-links {
  display: flex;

  gap: 14px;

  color: var(--muted);

  font-size: 0.62rem;
}

.demo-content {
  padding: 55px 42px;
}

.demo-content > p {
  margin-bottom: 10px;

  color: var(--blue);

  font-size: 0.65rem;
  font-weight: 800;

  letter-spacing: 0.12em;
}

.demo-content h3 {
  max-width: 330px;

  margin-bottom: 25px;

  font-size: 2rem;

  line-height: 1.08;
}

.demo-line {
  width: 55%;
  height: 8px;

  margin-bottom: 10px;

  border-radius: 10px;

  background: #cbd5e1;
}

.demo-line-long {
  width: 78%;
}

.demo-button {
  width: fit-content;

  margin-top: 28px;

  padding: 9px 16px;

  border-radius: 6px;

  background: var(--blue);

  color: var(--white);

  font-size: 0.72rem;
  font-weight: 700;
}

/* Floating feature cards */

.floating-card {
  position: absolute;

  padding: 13px 16px;

  display: flex;
  align-items: center;

  gap: 11px;

  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 11px;

  background: rgba(7, 20, 38, 0.86);

  backdrop-filter: blur(10px);

  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.28);

  color: var(--white);
}

.floating-card strong {
  display: block;

  font-size: 0.78rem;
}

.floating-card small {
  display: block;

  margin-top: 1px;

  color: #94a3b8;

  font-size: 0.65rem;
}

.floating-icon {
  min-width: 34px;
  height: 34px;

  display: grid;
  place-items: center;

  border-radius: 8px;

  background: rgba(43, 127, 255, 0.16);

  color: var(--blue-bright);

  font-weight: 800;
}

.floating-card-one {
  left: -65px;
  bottom: -8px;
}

.floating-card-two {
  right: -18px;
  top: 24px;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn-primary,
.btn-secondary {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  min-height: 50px;

  padding: 13px 24px;

  border-radius: 9px;

  font-weight: 700;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.btn-primary {
  background: var(--blue);

  color: var(--white);

  box-shadow: 0 10px 26px rgba(21, 101, 216, 0.24);
}

.btn-primary:hover {
  transform: translateY(-2px);

  background: #0f56bb;

  box-shadow: 0 14px 34px rgba(21, 101, 216, 0.32);
}

.btn-secondary {
  border: 1px solid #64748b;

  background: rgba(255, 255, 255, 0.03);

  color: var(--white);
}

.btn-secondary:hover {
  transform: translateY(-2px);

  border-color: var(--white);

  background: rgba(255, 255, 255, 0.08);
}

/* =========================================================
   SHARED SECTIONS
   ========================================================= */

section:not(#hero) {
  padding: 100px 24px;
}

section:not(#hero) > * {
  width: 100%;
  max-width: 1150px;

  margin-left: auto;
  margin-right: auto;
}

/* Prevent sticky header covering anchored sections */

#services,
#portfolio,
#about,
#contact {
  scroll-margin-top: 90px;
}

.section-heading {
  max-width: 760px;

  margin-bottom: 48px;
}

.section-eyebrow {
  margin-bottom: 10px;

  color: var(--blue);

  font-size: 0.8rem;
  font-weight: 700;

  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-heading h2,
#about h2,
#contact h2 {
  margin-bottom: 18px;

  color: var(--navy);

  font-size: clamp(2.1rem, 4vw, 3.4rem);

  line-height: 1.1;

  letter-spacing: -0.025em;
}

.section-heading > p:last-child {
  color: var(--muted);

  font-size: 1.08rem;
}

/* =========================================================
   SERVICES
   ========================================================= */

#services {
  position: relative;

  overflow: hidden;

  background: linear-gradient(180deg, #f8fafc 0%, #f4f7fb 100%);
}

#services::before {
  content: "";

  position: absolute;

  width: 420px;
  height: 420px;

  left: -220px;
  top: 100px;

  border-radius: 50%;

  background: radial-gradient(
    circle,
    rgba(21, 101, 216, 0.08),
    transparent 68%
  );
}

.services-heading {
  position: relative;
  z-index: 1;

  max-width: 760px;
}

.service-grid {
  position: relative;
  z-index: 1;

  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 24px;
}

.service-card {
  position: relative;

  overflow: hidden;

  min-height: 390px;

  padding: 32px;

  display: flex;
  flex-direction: column;

  border: 1px solid var(--border);
  border-radius: 16px;

  background: rgba(255, 255, 255, 0.92);

  box-shadow: 0 8px 25px rgba(13, 27, 42, 0.035);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.service-card::after {
  content: "";

  position: absolute;

  left: 0;
  bottom: 0;

  width: 100%;
  height: 4px;

  background: linear-gradient(90deg, var(--blue), var(--blue-bright));

  transform: scaleX(0);
  transform-origin: left;

  transition: transform 0.25s ease;
}

.service-card:hover {
  transform: translateY(-7px);

  border-color: #bfdbfe;

  box-shadow: 0 22px 45px rgba(13, 27, 42, 0.09);
}

.service-card:hover::after {
  transform: scaleX(1);
}

.service-card-top {
  margin-bottom: 28px;

  display: flex;

  align-items: center;
  justify-content: space-between;
}

.service-icon {
  width: 52px;
  height: 52px;

  display: grid;
  place-items: center;

  border-radius: 12px;

  background: linear-gradient(
    135deg,
    rgba(21, 101, 216, 0.12),
    rgba(43, 127, 255, 0.05)
  );

  color: var(--blue);
}

.service-icon svg {
  width: 25px;
  height: 25px;

  fill: none;

  stroke: currentColor;
  stroke-width: 1.8;

  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-number {
  color: #94a3b8;

  font-size: 0.78rem;
  font-weight: 800;

  letter-spacing: 0.12em;
}

.service-card h3 {
  margin-bottom: 14px;

  color: var(--navy);

  font-size: 1.35rem;

  line-height: 1.25;
}

.service-card > p {
  margin-bottom: 25px;

  color: var(--muted);
}

.service-features {
  margin-top: auto;

  display: grid;

  gap: 10px;

  list-style: none;
}

.service-features li {
  position: relative;

  padding-left: 22px;

  color: #475569;

  font-size: 0.9rem;
}

.service-features li::before {
  content: "✓";

  position: absolute;

  left: 0;

  color: var(--blue);

  font-weight: 800;
}

/* =========================================================
   PORTFOLIO
   ========================================================= */

#portfolio {
  background: var(--white);
}

.portfolio-grid {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 24px;
}

.project-card {
  overflow: hidden;

  border: 1px solid var(--border);
  border-radius: 15px;

  background: var(--white);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-5px);

  box-shadow: 0 18px 34px rgba(13, 27, 42, 0.09);
}

.project-placeholder {
  min-height: 220px;

  display: grid;
  place-items: center;

  background: linear-gradient(135deg, #eef4ff 0%, #f7f9fc 100%);

  color: #7a8495;

  font-weight: 700;
}

.project-content {
  padding: 26px;
}

.project-type {
  margin-bottom: 8px;

  color: var(--blue);

  font-size: 0.76rem;
  font-weight: 700;

  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-content h3 {
  margin-bottom: 12px;

  color: var(--navy);

  font-size: 1.25rem;
}

.project-content p:last-child {
  color: var(--muted);
}

/* =========================================================
   ABOUT
   ========================================================= */

#about {
  position: relative;

  overflow: hidden;

  background:
    radial-gradient(
      circle at 15% 80%,
      rgba(43, 127, 255, 0.12),
      transparent 28%
    ),
    var(--navy);

  color: var(--white);
}

#about::after {
  content: "";

  position: absolute;

  width: 420px;
  height: 420px;

  right: -170px;
  top: -170px;

  border: 1px solid rgba(43, 127, 255, 0.12);

  border-radius: 50%;
}

.about-content {
  position: relative;
  z-index: 1;

  display: grid;

  grid-template-columns: 0.8fr 1.2fr;

  gap: 90px;

  align-items: start;
}

#about .section-eyebrow {
  color: var(--blue-bright);
}

#about h2 {
  max-width: 480px;

  color: var(--white);

  font-size: clamp(2.3rem, 3.6vw, 3.3rem);

  line-height: 1.06;

  letter-spacing: -0.035em;
}

.about-mark {
  width: 105px;

  margin-top: 36px;

  opacity: 0.28;
}

.about-mark img {
  width: 100%;
}

.about-text {
  display: grid;

  gap: 22px;

  color: #cbd5e1;

  font-size: 1.05rem;
}

.about-intro {
  color: var(--white);

  font-size: 1.32rem;
  font-weight: 600;

  line-height: 1.5;
}

.about-points {
  margin-top: 22px;

  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 14px;
}

.about-points div {
  padding: 18px;

  border: 1px solid rgba(255, 255, 255, 0.1);

  border-radius: 10px;

  background: rgba(255, 255, 255, 0.035);
}

.about-points strong {
  display: block;

  margin-bottom: 5px;

  color: var(--blue-bright);
}

.about-points span {
  color: #94a3b8;

  font-size: 0.82rem;

  line-height: 1.4;
}

/* =========================================================
   CONTACT
   ========================================================= */

#contact {
  position: relative;

  overflow: hidden;

  background:
    radial-gradient(
      circle at 50% 120%,
      rgba(21, 101, 216, 0.12),
      transparent 40%
    ),
    var(--light);
}

.contact-content {
  max-width: 850px;

  text-align: center;
}

#contact .section-eyebrow {
  margin-bottom: 14px;
}

#contact h2 {
  max-width: 800px;

  margin: 0 auto 24px;

  color: var(--navy);

  font-size: clamp(2.4rem, 4.5vw, 4rem);

  line-height: 1.05;

  letter-spacing: -0.035em;
}

.contact-description {
  max-width: 650px;

  margin: 0 auto 34px;

  color: var(--muted);

  font-size: 1.08rem;
}

.contact-actions {
  display: flex;

  justify-content: center;
  align-items: center;

  gap: 18px;

  flex-wrap: wrap;
}

.contact-secondary {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  min-height: 50px;

  padding: 12px 20px;

  border: 1px solid #cbd5e1;
  border-radius: 9px;

  background: var(--white);

  color: var(--navy);

  font-weight: 700;

  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.contact-secondary:hover {
  transform: translateY(-2px);

  color: var(--blue);

  border-color: var(--blue);
}

.contact-note {
  margin-top: 24px;

  color: #94a3b8;

  font-size: 0.82rem;
}

/* =========================================================
   FOOTER
   ========================================================= */

footer {
  padding: 30px 24px;

  background: var(--navy-deep);

  color: #94a3b8;

  text-align: center;

  font-size: 0.9rem;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {
  .site-logo {
    width: 210px;
  }

  /* Hero */

  .hero-inner {
    grid-template-columns: 1fr;

    gap: 60px;
  }

  .hero-copy {
    max-width: 760px;
  }

  .hero-visual {
    width: 100%;
    max-width: 620px;

    margin: 0 auto;
  }

  .browser-window {
    transform: none;
  }

  /* Sections */

  .service-grid,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .about-content {
    grid-template-columns: 1fr;

    gap: 32px;
  }

  .about-points {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {
  /* ---------- Navigation ---------- */

  nav {
    padding: 12px 18px;
  }

  .site-logo {
    width: 185px;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;

    top: 100%;
    left: 0;
    right: 0;

    display: none;

    flex-direction: column;
    align-items: stretch;

    gap: 0;

    padding: 10px 20px 18px;

    background: var(--white);

    border-top: 1px solid var(--border);

    border-bottom: 1px solid var(--border);

    box-shadow: 0 14px 25px rgba(13, 27, 42, 0.08);
  }

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

  .nav-links a {
    padding: 14px 4px;

    font-size: 1rem;

    border-bottom: 1px solid #eef2f7;
  }

  .nav-links a:last-child {
    border-bottom: 0;
  }

  .nav-links a::after {
    display: none;
  }

  /* Hamburger -> X */

  .menu-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .menu-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

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

  #hero {
    min-height: auto;

    padding: 64px 20px 72px;
  }

  .hero-inner {
    grid-template-columns: 1fr;

    gap: 48px;
  }

  #hero h1 {
    max-width: none;

    font-size: clamp(2.55rem, 11vw, 3.5rem);

    line-height: 1.02;
  }

  .hero-description {
    font-size: 1rem;

    line-height: 1.65;
  }

  .hero-actions {
    flex-direction: column;

    width: 100%;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }

  /* Hero visual */

  .hero-visual {
    width: 100%;

    min-height: 360px;
  }

  .browser-window {
    width: 100%;
    max-width: none;

    transform: none;
  }

  .floating-card-one {
    left: 5px;
    bottom: -5px;
  }

  .floating-card-two {
    right: 5px;
    top: 5px;
  }

  .demo-content {
    padding: 42px 26px;
  }

  .demo-content h3 {
    font-size: 1.65rem;
  }

  .demo-links {
    display: none;
  }

  /* ---------- General sections ---------- */

  section:not(#hero) {
    padding: 72px 20px;
  }

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

  .service-card {
    min-height: 0;
  }

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

  .contact-actions {
    flex-direction: column;

    width: 100%;
  }

  .contact-actions .btn-primary,
  .contact-secondary {
    width: 100%;
  }
}
