:root {
  --bg: #f4f6f8;
  --surface: #e9eff4;
  --card: #edf3f7;
  --text: #20263a;
  --muted: #4b5575;
  --primary: #5a4dff;
  --accent: #ff2f7e;
  --stroke: #ccd8e4;
  --teal: #0b7779;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

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

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

.container {
  width: min(1120px, calc(100% - 2.5rem));
  margin: 0 auto;
}

.narrow {
  width: min(760px, calc(100% - 2rem));
}

.section-pad {
  padding: 6rem 0;
}

h1,
h2,
h3 {
  margin: 0 0 0.9rem;
  line-height: 1.15;
}

h1,
h2 {
  font-family: "Fraunces", serif;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.3rem, 6vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

p {
  margin: 0 0 1rem;
}

.eyebrow {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 1.1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.82rem 1.35rem;
  border-radius: 0.45rem;
  font-weight: 700;
  transition: 180ms ease;
  border: 1px solid transparent;
}

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

.btn-solid {
  background: var(--primary);
  color: #fff;
}

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

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 9;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid #e6eaef;
  backdrop-filter: blur(10px);
}

.nav-wrap {
  min-height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
}

.brand-mark {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.5rem;
  background: linear-gradient(140deg, #0b7779, #5a4dff);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.brand-text {
  font-size: 0.95rem;
}

.main-nav {
  display: flex;
  gap: 2rem;
  font-weight: 600;
  color: #353d57;
}

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

.hero {
  background:
    radial-gradient(circle at 0% 10%, #cce6f6 0%, transparent 45%),
    radial-gradient(circle at 85% 20%, #dbe1ff 0%, transparent 40%),
    var(--surface);
  padding: 5rem 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}

.hero-copy h1 span {
  color: var(--primary);
}

.lede {
  color: var(--muted);
  font-size: 1.14rem;
  max-width: 53ch;
}

.hero-cta {
  margin-top: 2rem;
}

.hero-visual {
  position: relative;
}

.hero-image-wrap {
  border-radius: 1.6rem;
  overflow: hidden;
  background: #c8dae8;
  min-height: 25rem;
  border: 1px solid #c1d2df;
}

.hero-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spark {
  position: absolute;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 0.25rem;
  background: conic-gradient(from 40deg, #5a4dff, #7ddfd0, #5a4dff);
}

.spark-one {
  top: 10%;
  right: 8%;
}

.spark-two {
  bottom: 12%;
  left: -4%;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.2rem;
  margin-top: 2rem;
}

.skill-card,
.project-card,
.quote-card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 0.7rem;
}

.skill-card {
  padding: 1.3rem;
  border-bottom: 3px solid transparent;
}

.skill-card:hover {
  border-bottom-color: var(--primary);
}

.skill-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.7rem;
}

.skill-card p {
  color: var(--muted);
}

.about-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 3rem;
  align-items: center;
}

.about-photo img {
  border-radius: 0.9rem;
  border: 1px solid var(--stroke);
  min-height: 28rem;
  object-fit: cover;
}

.about-copy p {
  color: var(--muted);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
}

.portfolio-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card {
  overflow: hidden;
}

.project-card img {
  height: 13.8rem;
  width: 100%;
  object-fit: cover;
}

.project-body {
  padding: 1rem 1rem 1.3rem;
}

.project-body p {
  color: var(--muted);
}

.project-body a {
  color: var(--teal);
  font-weight: 700;
}

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

.testimonials {
  background: #dfe8ed;
}

.testimonials-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quote-card {
  border-color: #6dbbc0;
  padding: 1.3rem;
}

.quote-card p {
  color: #2c3a5d;
}

.quote-card h3 {
  margin: 1.2rem 0 0.2rem;
  font-size: 1.05rem;
}

.quote-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

.rating {
  color: #0a7f83;
  letter-spacing: 0.15rem;
  font-size: 1.15rem;
}

.contact-copy {
  text-align: center;
  color: var(--muted);
  max-width: 60ch;
  margin: 0 auto 2rem;
}

.contact h2,
.contact .eyebrow {
  text-align: center;
}

.contact-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.9rem;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 0.48rem;
  border: 1px solid #8778ff;
  background: #fff;
  border-radius: 0.45rem;
  padding: 0.85rem;
  font: inherit;
}

.terms {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  margin-top: 1rem;
  color: var(--muted);
}

.terms input {
  width: 1rem;
  margin: 0;
}

.contact-form button {
  margin: 1.3rem auto 0;
  display: flex;
  min-width: 6.5rem;
}

.site-footer {
  background: #e3ebef;
  border-top: 1px solid #cad8e2;
  padding-top: 2.3rem;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-top nav {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.footer-top nav a:hover,
.socials a:hover {
  color: var(--primary);
}

.footer-bottom {
  margin-top: 1.3rem;
  padding: 1rem 0 2rem;
  border-top: 1px solid #bfced9;
  color: var(--muted);
}

.reveal,
.reveal-delay {
  opacity: 0;
  transform: translateY(20px);
}

.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: 700ms ease;
}

.reveal-delay.is-visible {
  transition-delay: 120ms;
}

/* Case Study Pages */
.sub-hero {
  padding: 4.8rem 0 3rem;
  background:
    radial-gradient(circle at 90% 10%, #e2defe 0%, transparent 35%),
    radial-gradient(circle at 10% 70%, #d6eff0 0%, transparent 30%),
    #f1f4f8;
}

.sub-hero h1 {
  max-width: 15ch;
}

.sub-hero p {
  color: var(--muted);
  max-width: 70ch;
  font-size: 1.1rem;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}

.meta-item {
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 0.55rem;
  padding: 0.85rem;
}

.meta-item strong {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.content-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.content-wrap section {
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 0.7rem;
  padding: 1.3rem;
}

.content-wrap ul {
  margin: 0;
  padding-left: 1rem;
}

.content-wrap li {
  margin-bottom: 0.55rem;
}

@media (max-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .portfolio-grid,
  .testimonials-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .main-nav,
  .btn-outline {
    display: none;
  }

  .section-pad {
    padding: 4rem 0;
  }

  .cards-grid,
  .portfolio-grid,
  .testimonials-grid,
  .field-grid,
  .meta-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 3.5rem 0;
  }

  .hero-image-wrap {
    min-height: 18rem;
  }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
  }
}
