/* LOURCA Systems landing page */

@font-face {
  font-family: "Geist";
  src: url("assets/fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("assets/fonts/geist-mono-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #0a0a0b;
  --graphite: #131416;
  --white: #ffffff;
  --paper: #f5f5f6;
  --silver-50: #f3f4f6;
  --silver-100: #e9ebee;
  --silver-200: #dcdfe3;
  --silver-300: #c3c8ce;
  --silver-400: #a3a9b1;
  --silver-500: #6b7178;
  --silver-600: #5f656e;
  --error: #b42318;

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --container: 1200px;
  --gutter: clamp(20px, 5vw, 40px);
  --header-h: 72px;
  --section-y: clamp(80px, 11vw, 136px);
  --radius-sm: 10px;
  --radius-lg: 24px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 200ms;
  --shadow-hover: 0 1px 2px rgb(10 10 11 / 0.04), 0 24px 48px -24px rgb(10 10 11 / 0.22);

  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f656e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

/* Color themes: each section picks one, and components read the variables. */
.theme-light,
.theme-paper {
  --bg: var(--white);
  --fg: var(--black);
  --fg-muted: var(--silver-600);
  --line: var(--silver-200);
  --line-strong: var(--silver-300);
  --surface: var(--white);
  --tint: rgb(10 10 11 / 0.04);
  --btn-hover: #2a2b2f;
  --focus: var(--black);
  background: var(--bg);
  color: var(--fg);
}

.theme-paper {
  --bg: var(--paper);
}

.theme-dark {
  --bg: var(--black);
  --fg: var(--white);
  --fg-muted: var(--silver-400);
  --line: rgb(255 255 255 / 0.12);
  --line-strong: rgb(255 255 255 / 0.28);
  --surface: var(--graphite);
  --tint: rgb(255 255 255 / 0.07);
  --btn-hover: var(--silver-200);
  --focus: var(--white);
  background: var(--bg);
  color: var(--fg);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  scrollbar-gutter: stable;
}

html.menu-open,
html:has(dialog[open]) {
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--black);
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p,
ul,
ol {
  margin: 0;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
}

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

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

[hidden] {
  display: none !important;
}

::selection {
  background: var(--black);
  color: var(--white);
}

.theme-dark ::selection {
  background: var(--white);
  color: var(--black);
}

:focus-visible {
  outline: 2px solid var(--focus, var(--black));
  outline-offset: 3px;
}

[tabindex="-1"]:focus {
  outline: none;
}

/* Utilities */
.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

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

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--black);
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.icon {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-arrow {
  transition: transform var(--dur) var(--ease);
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* Shared text styles */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  flex: none;
  width: 28px;
  height: 1px;
  background: currentColor;
}

.lead {
  max-width: 36rem;
  color: var(--fg-muted);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.6;
}

.section-title {
  max-width: 18ch;
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.list-label,
.project-category,
.dialog-subhead,
.mission-label,
.footer-heading {
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid var(--silver-200);
  border-radius: 999px;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.check-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 0;
  list-style: none;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.check-list li::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: calc((1lh - 18px) / 2);
  background: var(--fg-muted);
  -webkit-mask: var(--check) center / contain no-repeat;
  mask: var(--check) center / contain no-repeat;
}

/* Buttons and links */
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.96875rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
}

.btn .icon {
  width: 18px;
  height: 18px;
}

.btn-sm {
  min-height: 42px;
  padding: 0 18px;
  font-size: 0.90625rem;
}

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

.btn-secondary {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--fg);
}

.btn[aria-disabled="true"] {
  cursor: not-allowed;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: text-decoration-color var(--dur) var(--ease);
}

.text-link .icon {
  width: 18px;
  height: 18px;
}

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

  .btn-secondary:not([aria-disabled="true"]):hover {
    border-color: var(--fg);
    background: var(--tint);
  }

  .btn:hover .icon-arrow,
  .text-link:hover .icon-arrow {
    transform: translateX(3px);
  }

  .text-link:hover {
    text-decoration-color: currentColor;
  }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
  background: rgb(10 10 11 / 0.94);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--fg);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.brand-name {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.brand-sub {
  color: var(--silver-400);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  list-style: none;
}

.nav-link {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--silver-400);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition:
    color var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--white);
}

.nav-link.is-active {
  background: rgb(255 255 255 / 0.08);
}

.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 22px;
  height: 10px;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition:
    transform var(--dur) var(--ease),
    top var(--dur) var(--ease);
}

.nav-toggle-bars::before {
  top: 0;
}

.nav-toggle-bars::after {
  top: calc(100% - 1.5px);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  top: calc(50% - 0.75px);
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  top: calc(50% - 0.75px);
  transform: rotate(-45deg);
}

@media (min-width: 900px) {
  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
  }

  .brand {
    justify-self: start;
  }

  .nav-cta {
    justify-self: end;
  }

  .nav-toggle,
  .nav-cta-mobile {
    display: none;
  }
}

@media (max-width: 899.98px) {
  .nav-cta {
    display: none;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
    height: calc(100dvh - var(--header-h));
    padding: 8px var(--gutter) 40px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--black);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition:
      opacity var(--dur) var(--ease),
      transform var(--dur) var(--ease),
      visibility 0s linear var(--dur);
  }

  .site-header.is-open .site-nav {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition-delay: 0s;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-link {
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    color: var(--white);
    font-size: 1.375rem;
    letter-spacing: -0.01em;
  }

  .nav-link.is-active {
    background: none;
  }

  .nav-cta-mobile {
    width: 100%;
  }
}

/* Hero */
.hero {
  overflow: hidden;
  padding-block: clamp(56px, 9vw, 104px) clamp(72px, 10vw, 120px);
}

.hero-inner {
  display: grid;
  align-items: center;
  gap: clamp(48px, 7vw, 80px);
}

.hero h1 {
  font-size: clamp(2.5rem, 1.2rem + 5.4vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero h1 .line {
  display: block;
}

.text-silver {
  color: var(--silver-400);
}

.hero .lead {
  max-width: 32rem;
  margin-top: 28px;
}

.hero .button-row {
  margin-top: 40px;
}

.hero-visual {
  justify-self: center;
  width: 100%;
  max-width: 480px;
}

.hero-visual svg {
  width: 100%;
  height: auto;
}

@media (max-width: 479.98px) {
  .hero .button-row .btn {
    flex: 1 1 100%;
  }
}

@media (min-width: 1024px) {
  .hero {
    display: flex;
    align-items: center;
    min-height: min(calc(100svh - var(--header-h)), 880px);
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }

  .hero-visual {
    justify-self: end;
    max-width: 500px;
  }
}

/* Sections */
.section {
  padding-block: var(--section-y);
}

.section-head {
  display: grid;
  gap: 20px;
  margin-bottom: clamp(44px, 6vw, 72px);
}

.section-head-aside {
  display: grid;
  gap: 20px;
}

.section-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--fg-muted);
  font-size: 0.9375rem;
}

@media (min-width: 1024px) {
  .section-head--split {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: end;
    column-gap: 64px;
  }
}

/* Services */
.service-grid {
  display: grid;
  gap: 20px;
}

.service-card {
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition:
    border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}

.service-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 32px;
  border-radius: 14px;
  background: var(--black);
  color: var(--white);
}

.service-icon .icon {
  width: 26px;
  height: 26px;
  stroke-width: 1.5;
}

.service-card h3 {
  font-size: 1.375rem;
}

.service-text {
  margin-top: 12px;
  color: var(--fg-muted);
}

.service-includes {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.service-card .text-link {
  align-self: flex-start;
  justify-self: start;
  margin-top: auto;
  padding-top: 32px;
}

@media (hover: hover) {
  .service-card:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
  }
}

@media (min-width: 640px) and (max-width: 959.98px) {
  .service-card {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    grid-template-rows: auto auto 1fr auto;
    column-gap: 40px;
  }

  .service-card > :not(.service-includes) {
    grid-column: 1;
  }

  .service-includes {
    grid-column: 2;
    grid-row: 1 / -1;
    margin-top: 0;
    padding: 4px 0 0 40px;
    border-top: 0;
    border-left: 1px solid var(--line);
  }
}

@media (min-width: 960px) {
  .service-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(5, auto);
    gap: 0 24px;
  }

  /* Subgrid keeps icon, title, text, list, and link rows aligned across the three cards. */
  .service-card {
    display: grid;
    grid-row: span 5;
    grid-template-rows: subgrid;
  }
}

/* Our Work */
.project-grid {
  display: grid;
  gap: 24px;
}

.project-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  scroll-margin-top: 24px;
  transition:
    border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.project-preview {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 11;
  border-bottom: 1px solid var(--line);
  background: var(--silver-100);
}

.preview-svg {
  width: 100%;
  height: 100%;
  transition: transform 500ms var(--ease);
}

.project-category {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.project-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 28px clamp(24px, 3vw, 32px) 32px;
}

.project-body h3 {
  margin-top: 10px;
  font-size: 1.375rem;
}

.project-text {
  flex-grow: 1;
  margin-top: 12px;
  color: var(--fg-muted);
}

.project-body .btn {
  margin-top: 28px;
}

.project-card:target {
  animation: target-flash 2.4s var(--ease);
}

@keyframes target-flash {
  0%,
  40% {
    box-shadow: 0 0 0 2px var(--black), var(--shadow-hover);
  }

  100% {
    box-shadow: 0 0 0 2px rgb(10 10 11 / 0);
  }
}

@media (hover: hover) {
  .project-card:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-hover);
  }

  .project-card:hover .preview-svg {
    transform: scale(1.025);
  }
}

@media (min-width: 720px) and (max-width: 1023.98px) {
  .project-card {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    grid-template-rows: none;
  }

  .project-preview {
    min-height: 280px;
    aspect-ratio: auto;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .project-body {
    justify-content: center;
    padding: 32px;
  }

  .project-text {
    flex-grow: 0;
  }
}

@media (min-width: 1024px) {
  .project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Process */
.steps {
  display: grid;
  gap: 40px;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  padding-left: 72px;
}

.step-marker {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
}

.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 60px;
  bottom: -28px;
  left: 24px;
  width: 1px;
  background: var(--line-strong);
}

.step h3 {
  padding-top: 10px;
  font-size: 1.5rem;
}

.step p {
  max-width: 22rem;
  margin-top: 10px;
  color: var(--fg-muted);
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
  }

  .step {
    padding-top: 76px;
    padding-left: 0;
  }

  .step:not(:last-child)::after {
    top: 24px;
    right: -16px;
    bottom: auto;
    left: 64px;
    width: auto;
    height: 1px;
  }

  .step h3 {
    padding-top: 0;
  }
}

/* About */
.about-grid {
  display: grid;
  gap: 32px;
}

.about-copy {
  display: grid;
  gap: 20px;
  max-width: 40rem;
  color: var(--fg-muted);
  font-size: 1.125rem;
}

.about-lead {
  color: var(--fg);
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.625rem);
  line-height: 1.45;
  letter-spacing: -0.015em;
}

.mission {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  color: var(--fg);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  font-weight: 500;
  letter-spacing: -0.01em;
}

@media (min-width: 1024px) {
  .about-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 64px;
  }
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 48px;
}

.contact-intro .lead {
  margin-top: 20px;
}

.whatsapp {
  display: grid;
  justify-items: start;
  gap: 14px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.whatsapp-title {
  font-weight: 600;
}

.whatsapp-number {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  color: var(--fg-muted);
  font-size: 0.9375rem;
}

.whatsapp-number .mono {
  color: var(--fg);
}

.form-card {
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  scroll-margin-top: 24px;
  background: var(--white);
  box-shadow: 0 1px 2px rgb(10 10 11 / 0.04), 0 24px 48px -32px rgb(10 10 11 / 0.18);
}

.form-grid {
  display: grid;
  gap: 20px;
}

.field {
  display: grid;
  align-content: start;
  gap: 8px;
}

.field label {
  font-size: 0.9375rem;
  font-weight: 500;
}

.optional {
  color: var(--fg-muted);
  font-weight: 400;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid var(--silver-300);
  border-radius: var(--radius-sm);
  background-color: var(--white);
  color: var(--black);
  font-size: 1rem;
  line-height: 1.4;
  /* Leaves room for the label above when focus scrolls a field into view under the sticky header. */
  scroll-margin-top: 48px;
  transition:
    border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.field textarea {
  min-height: 150px;
  line-height: 1.55;
  resize: vertical;
}

.field select {
  padding-right: 44px;
  background-image: var(--chevron);
  background-position: right 16px center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
  cursor: pointer;
  appearance: none;
}

.field select:invalid {
  color: var(--silver-500);
}

.field option {
  color: var(--black);
}

.field ::placeholder {
  color: var(--silver-500);
  opacity: 1;
}

@media (hover: hover) {
  .field input:hover,
  .field select:hover,
  .field textarea:hover {
    border-color: var(--silver-400);
  }
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--black);
  outline: none;
  box-shadow: 0 0 0 3px rgb(10 10 11 / 0.14);
}

.field [aria-invalid="true"],
.field [aria-invalid="true"]:hover,
.field [aria-invalid="true"]:focus {
  border-color: var(--error);
}

.field [aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgb(180 35 24 / 0.16);
}

.field-error {
  color: var(--error);
  font-size: 0.875rem;
  line-height: 1.4;
}

.field-error:empty {
  display: none;
}

.form-actions {
  margin-top: 28px;
}

.form-success {
  display: grid;
  justify-items: start;
  gap: 14px;
}

.success-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
}

.success-icon .icon {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}

.form-success h3 {
  font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem);
  letter-spacing: -0.025em;
}

.form-success p {
  color: var(--fg-muted);
}

.form-note,
.dialog-note {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--silver-50);
  color: var(--fg-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.form-success .btn {
  margin-top: 8px;
}

@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
  }

  .field-full {
    grid-column: 1 / -1;
  }
}

@media (max-width: 639.98px) {
  .form-actions .btn {
    width: 100%;
  }
}

@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
    gap: 72px;
  }
}

/* Footer */
.site-footer {
  padding-top: clamp(64px, 8vw, 96px);
}

.footer-grid {
  display: grid;
  gap: 40px;
  padding-bottom: 56px;
}

.footer-tagline {
  margin-top: 16px;
  color: var(--fg-muted);
}

.footer-heading {
  margin-bottom: 18px;
}

.footer-col ul {
  display: grid;
  gap: 12px;
  padding: 0;
  list-style: none;
}

.footer-col a,
.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--silver-300);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

.footer-col a[href]:hover,
.back-to-top:hover {
  color: var(--white);
}

.footer-col a[aria-disabled="true"] {
  color: var(--fg-muted);
  cursor: default;
}

.soon {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 24px 32px;
  border-top: 1px solid var(--line);
  color: var(--fg-muted);
  font-size: 0.875rem;
}

.back-to-top {
  gap: 8px;
}

.back-to-top .icon {
  width: 16px;
  height: 16px;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  }
}

/* Project dialog */
.project-dialog {
  --dialog-max-height: min(100dvh - 24px, 880px);
  width: min(100% - 24px, 920px);
  max-width: none;
  max-height: var(--dialog-max-height);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 120px -40px rgb(0 0 0 / 0.6);
}

.project-dialog[open] {
  animation: dialog-in 240ms var(--ease);
}

.project-dialog::backdrop {
  background: rgb(10 10 11 / 0.62);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
}

.dialog-inner {
  display: grid;
  max-height: var(--dialog-max-height);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.dialog-preview {
  aspect-ratio: 16 / 11;
  border-bottom: 1px solid var(--line);
  background: var(--silver-100);
}

.dialog-body {
  display: grid;
  gap: 24px;
  padding: clamp(24px, 4vw, 40px);
}

.dialog-summary,
.dialog-details {
  display: grid;
  align-content: start;
  gap: 14px;
}

.dialog-summary h2 {
  font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2.125rem);
  letter-spacing: -0.03em;
}

.dialog-summary > p:not([class]) {
  color: var(--fg-muted);
}

.dialog-details .check-list {
  margin-top: 0;
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--black);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease);
}

.dialog-close .icon {
  width: 18px;
  height: 18px;
}

@media (hover: hover) {
  .dialog-close:hover {
    border-color: var(--black);
  }
}

@media (min-width: 860px) {
  .dialog-preview {
    height: clamp(220px, 36vh, 340px);
    aspect-ratio: auto;
  }

  .dialog-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 48px;
  }

  .dialog-body .button-row {
    grid-column: 1 / -1;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

  .service-card:hover,
  .project-card:hover .preview-svg,
  .icon-arrow {
    transform: none !important;
  }
}
