:root {
  --ink: #101015;
  --paper: #ffffff;
  --muted: #686a72;
  --line: #dfdee5;
  --blue: #1d55ff;
  --red: #eb2f35;
  --gold: #f6b443;
  --soft: #f4f5f8;
  --shadow: 0 24px 70px rgba(16, 16, 21, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease, padding 180ms ease;
}

.site-header.scrolled {
  padding-block: 10px;
  border-color: var(--line);
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.main-nav a {
  position: relative;
  padding: 8px 0;
}

.main-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--red);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
}

.section-band {
  padding: clamp(82px, 9vw, 136px) clamp(20px, 5vw, 72px);
}

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1.1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
  padding-top: 122px;
  background:
    linear-gradient(90deg, rgba(29, 85, 255, 0.08), transparent 38%),
    linear-gradient(180deg, #fff 0%, #f7f8fb 100%);
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(48px, 8vw, 104px);
  line-height: 0.94;
  letter-spacing: 0;
}

.hero p {
  max-width: 610px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: 0 22px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(16, 16, 21, 0.16);
}

.button.primary {
  border-color: var(--red);
  background: var(--red);
  color: white;
}

.button.ghost {
  background: transparent;
  color: var(--ink);
}

.hero-media {
  position: relative;
}

.hero-image-wrap {
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transform: rotate(1deg);
}

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

.metric-panel {
  position: absolute;
  right: clamp(10px, 4vw, 42px);
  bottom: -28px;
  width: min(240px, 70%);
  border-left: 6px solid var(--blue);
  background: var(--ink);
  color: white;
  padding: 22px;
  box-shadow: var(--shadow);
}

.metric-panel strong {
  display: block;
  font-size: 44px;
  line-height: 1;
}

.metric-panel span {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
  line-height: 1.35;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 44px;
}

.section-heading p,
.filters,
.work-card span,
.contact-card h3,
.testimonial-copy cite,
.blog-list time {
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.section-heading p,
.work-card span,
.blog-list time {
  color: var(--red);
}

.section-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(34px, 5vw, 66px);
  line-height: 1.03;
  letter-spacing: 0;
}

.about {
  background: var(--ink);
  color: white;
}

.about .section-heading p,
.about .about-story p {
  color: rgba(255, 255, 255, 0.68);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 0.8fr);
  gap: clamp(28px, 6vw, 90px);
  align-items: start;
}

.about-story h3 {
  margin: 0 0 20px;
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.08;
}

.about-story p {
  max-width: 680px;
  font-size: 18px;
  line-height: 1.7;
}

.service-stack {
  display: grid;
  gap: 12px;
}

.service-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 18px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: white;
  padding: 22px;
  text-align: left;
  cursor: pointer;
}

.service-card span {
  color: var(--gold);
  font-weight: 900;
}

.service-card.active {
  border-color: var(--blue);
  background: var(--blue);
}

.service-detail {
  min-height: 92px;
  margin: 6px 0 0;
  border-left: 4px solid var(--gold);
  padding: 18px 0 0 20px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.6;
}

.portfolio {
  background: var(--paper);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.filter {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  padding: 10px 16px;
  cursor: pointer;
  color: var(--muted);
}

.filter.active,
.filter:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

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

.work-card {
  position: relative;
  display: grid;
  min-height: 430px;
  overflow: hidden;
  align-content: end;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  padding: 28px;
  text-align: left;
  cursor: pointer;
  isolation: isolate;
  transition: transform 220ms ease, opacity 180ms ease;
}

.work-card:hover {
  transform: translateY(-8px);
}

.work-card img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 320ms ease;
}

.work-card:hover img {
  transform: scale(1.06);
}

.work-card::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent 26%, rgba(16, 16, 21, 0.9));
  content: "";
}

.work-card strong {
  margin-top: 8px;
  font-size: 30px;
}

.work-card.hidden {
  display: none;
}

.testimonials {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1fr);
  gap: clamp(28px, 7vw, 110px);
  align-items: center;
  background: var(--soft);
}

.testimonial-media img {
  width: min(420px, 100%);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.quote-mark {
  margin: 0;
  color: var(--red);
  font-family: Georgia, serif;
  font-size: 120px;
  line-height: 0.6;
}

blockquote {
  margin: 0;
  max-width: 780px;
  font-size: clamp(28px, 4vw, 54px);
  font-weight: 900;
  line-height: 1.08;
}

.testimonial-copy cite {
  display: block;
  margin-top: 24px;
  color: var(--muted);
  font-style: normal;
}

.testimonial-controls {
  display: flex;
  gap: 10px;
  margin-top: 30px;
}

.testimonial-controls button,
.modal-close {
  width: 46px;
  height: 46px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.blog-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.blog-list article {
  border-top: 4px solid var(--ink);
  background: var(--soft);
  padding: 28px;
}

.blog-list h3 {
  margin: 12px 0;
  font-size: 28px;
  line-height: 1.1;
}

.blog-list p {
  color: var(--muted);
  line-height: 1.55;
}

.contact {
  background: var(--ink);
  color: white;
}

.contact .section-heading p {
  color: var(--gold);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: 24px;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 800;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: white;
  padding: 14px 14px;
}

.contact-form textarea {
  resize: vertical;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--gold);
  font-weight: 800;
}

.contact-card {
  border-left: 6px solid var(--blue);
  background: white;
  color: var(--ink);
  padding: 30px;
}

.contact-card a,
.contact-card p {
  display: block;
  margin: 14px 0;
  color: var(--muted);
}

.socials {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.socials a {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  font-weight: 900;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
}

.footer img {
  width: 54px;
}

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

.work-modal {
  width: min(920px, calc(100vw - 32px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

.work-modal::backdrop {
  background: rgba(16, 16, 21, 0.66);
  backdrop-filter: blur(8px);
}

.work-modal[open] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.75fr);
}

.work-modal img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.work-modal div {
  padding: 38px;
}

.work-modal p {
  color: var(--red);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.work-modal h3 {
  margin: 10px 0 18px;
  font-size: 42px;
  line-height: 1;
}

.work-modal span {
  color: var(--muted);
  line-height: 1.6;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  background: white;
  font-size: 28px;
  line-height: 1;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 550ms ease, transform 550ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .menu-toggle {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: white;
  }

  .menu-toggle span {
    width: 18px;
    height: 2px;
    background: var(--ink);
  }

  .main-nav {
    position: fixed;
    top: 76px;
    right: 20px;
    left: 20px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    padding: 22px;
    box-shadow: var(--shadow);
  }

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

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

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

  .hero {
    min-height: auto;
  }

  .work-modal[open] {
    grid-template-columns: 1fr;
  }

  .work-modal img {
    min-height: 260px;
  }
}

@media (max-width: 560px) {
  .section-band {
    padding-inline: 18px;
  }

  .hero {
    padding-top: 112px;
  }

  .hero h1 {
    font-size: 45px;
  }

  .metric-panel {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    margin-top: 14px;
  }

  .work-card {
    min-height: 330px;
  }

  .footer {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
