:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --ink: #1a1f28;
  --ink-soft: #4a5568;
  --navy: #1a1f28;
  --brand: #5bc0de;
  --brand-bright: #7dd3f0;
  --brand-dark: #3a9ec0;
  --accent: var(--brand);
  --accent-hover: var(--brand-dark);
  --board-bg: #3a3d42;
  --board-ink: #f0f3f6;
  --board-muted: rgba(240, 243, 246, 0.72);
  --panel-bg: var(--board-bg);
  --panel-ink: var(--board-ink);
  --panel-muted: var(--board-muted);
  --border: #d8dee6;
  --shadow: 0 12px 40px rgba(26, 31, 40, 0.08);
  --radius: 14px;
  --shell: min(1080px, 100% - 2.5rem);
  --sans: "Figtree", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.35rem 0;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.brand img {
  height: 3.5rem;
  width: auto;
}

.nav {
  display: flex;
  gap: 1.75rem;
  margin-left: auto;
}

.nav a {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
}

.nav a:hover {
  color: var(--ink);
}

.header-phone {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.9375rem;
  color: #fff;
  background: var(--brand-dark);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
}

.header-phone:hover {
  background: var(--brand);
  color: #fff;
}

.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

.menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  margin-inline: auto;
  background: var(--ink);
  transition: transform 0.2s, opacity 0.2s;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0 0 1rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.mobile-nav:not([hidden]) {
  display: flex;
}

.mobile-nav a {
  font-family: var(--sans);
  font-weight: 500;
  padding: 0.65rem 0;
  color: var(--ink);
  text-decoration: none;
}

.mobile-nav a:hover {
  color: var(--brand-dark);
}

/* Circuit panel (mousepad-inspired) */
.hero-panel {
  position: relative;
  color: var(--panel-ink);
  overflow: hidden;
  background-color: var(--panel-bg);
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.028) 0 1px,
      transparent 1px 3px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.06) 0 1px,
      transparent 1px 3px
    ),
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.012) 0 1px,
      transparent 1px 5px
    );
  background-size: 100% 3px, 3px 100%, 8px 8px;
}

.circuit-deco {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  height: min(46%, 280px);
  pointer-events: none;
  line-height: 0;
}

.circuit-deco img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top;
  opacity: 0.9;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 50%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 50%, transparent 100%);
}

.circuit-deco--top {
  top: 0;
}

.circuit-deco--bottom {
  bottom: 0;
  transform: scaleY(-1);
}

.circuit-deco--bottom img {
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 50%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 50%, transparent 100%);
}

.circuit-band {
  position: relative;
  line-height: 0;
  background-color: var(--panel-bg);
}

.circuit-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.028) 0 1px,
      transparent 1px 3px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.06) 0 1px,
      transparent 1px 3px
    ),
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.012) 0 1px,
      transparent 1px 5px
    );
  background-size: 100% 3px, 3px 100%, 8px 8px;
}

.circuit-band img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  display: block;
  min-height: 90px;
  object-fit: cover;
  opacity: 0.9;
}

.hero-panel .shell {
  position: relative;
  z-index: 2;
}

/* Hero */
.hero {
  padding: 3.5rem 0 4rem;
}

.hero-panel.hero {
  padding: 4.5rem 0 4.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-text h1 {
  margin: 0 0 1rem;
  font-family: var(--sans);
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--navy);
}

.hero-panel .hero-text h1 {
  color: #fff;
}

.hero-text > p {
  margin: 0 0 1.75rem;
  color: var(--ink-soft);
  max-width: 28em;
}

.hero-panel .hero-text > p {
  color: var(--panel-muted);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.75rem 1.35rem;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.btn-main {
  background: var(--accent);
  color: #fff;
}

.btn-main:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-soft {
  background: var(--surface);
  color: var(--navy);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.btn-soft:hover {
  border-color: #c5bfb4;
  color: var(--ink);
}

.hero-panel .btn-soft {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(91, 192, 222, 0.35);
  box-shadow: none;
}

.hero-panel .btn-soft:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(91, 192, 222, 0.55);
  color: #fff;
}

.hero-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.hero-panel .hero-points {
  color: var(--panel-muted);
}

.hero-points li::before {
  content: "✓ ";
  color: var(--accent);
  font-weight: 700;
}

.hero-photo {
  margin: 0;
}

.hero-photo img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.hero-panel .hero-photo img {
  border-color: rgba(91, 192, 222, 0.3);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.hero-photo figcaption {
  margin-top: 0.6rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--ink-soft);
  text-align: center;
}

.hero-panel .hero-photo figcaption {
  color: var(--panel-muted);
}

/* Services */
.services {
  padding: 1rem 0 4.5rem;
}

.section-top {
  margin-bottom: 2rem;
}

.section-top h2 {
  margin: 0 0 0.35rem;
  font-family: var(--sans);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.section-top p {
  margin: 0;
  color: var(--ink-soft);
}

.service-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 0.35rem;
  font-family: var(--sans);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--navy);
}

.card > p {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.card ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.card li + li {
  margin-top: 0.3rem;
}

.card-accent {
  background: linear-gradient(135deg, #eef9fc 0%, var(--surface) 100%);
  border-color: #b8e4f0;
}

.card-accent p {
  margin: 0;
  color: var(--ink-soft);
}

/* Board work */
.board-work {
  color: var(--board-ink);
  padding: 4.5rem 0;
}

.board-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.board-photo {
  margin: 0;
}

.board-photo img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid rgba(91, 192, 222, 0.3);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.board-photo figcaption {
  margin-top: 0.65rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--board-muted);
  text-align: center;
}

.kicker {
  margin: 0 0 0.5rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-bright);
}

.board-work h2 {
  margin: 0 0 1rem;
  font-family: var(--sans);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.board-copy > p {
  margin: 0;
  color: var(--board-muted);
  max-width: 32em;
}

.board-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.board-list li {
  padding: 1.1rem 0;
  border-top: 1px solid rgba(91, 192, 222, 0.2);
  font-size: 0.98rem;
  color: var(--board-muted);
}

.board-list strong {
  display: block;
  font-family: var(--sans);
  font-size: 1rem;
  color: #fff;
  margin-bottom: 0.2rem;
}

/* Contact */
.contact {
  padding: 4.5rem 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.contact h2 {
  margin: 0 0 0.5rem;
  font-family: var(--sans);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
}

.contact-lead {
  margin: 0 0 1.75rem;
  color: var(--ink-soft);
}

address {
  font-style: normal;
}

address p {
  margin: 0 0 1.1rem;
}

.label {
  display: block;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.15rem;
}

address a {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
}

.map-box {
  min-height: 260px;
  padding: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.map-embed {
  display: block;
  width: 100%;
  height: 320px;
  border: 0;
}

.map-link {
  display: block;
  padding: 0.65rem 1rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  color: var(--ink-soft);
  border-top: 1px solid var(--border);
  background: #fafbfc;
}

.map-link:hover {
  color: var(--navy);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.75rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 500;
}

.contact-form input,
.contact-form textarea {
  padding: 0.7rem 0.85rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(91, 192, 222, 0.25);
}

.contact-form textarea {
  resize: vertical;
  min-height: 100px;
}

.btn-block {
  width: 100%;
  border: none;
  cursor: pointer;
  margin-top: 0.25rem;
}

.form-alert {
  margin: 1.25rem 0 0;
  padding: 0.75rem 1rem;
  font-family: var(--sans);
  font-size: 0.9375rem;
  border-radius: 8px;
}

.form-alert--ok {
  color: #1a4d3a;
  background: #e8f5ef;
  border: 1px solid #b8dfc8;
}

.form-alert--err {
  color: #6b2d2d;
  background: #fceeee;
  border: 1px solid #e8c4c4;
}

.preview-banner {
  margin: 0;
  padding: 0.5rem 1rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  text-align: center;
  color: #4a5568;
  background: #fff8e6;
  border-bottom: 1px solid #e8d5a8;
}

.preview-banner code {
  font-size: 0.85em;
}

.form-note {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.form-note code {
  font-size: 0.9em;
}

/* Footer */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.footer-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.footer-logo {
  height: 3.25rem;
  width: auto;
  margin-bottom: 0.25rem;
}

.footer-row p {
  margin: 0;
}

.footer-copy {
  font-size: 0.8125rem;
  opacity: 0.7;
}

/* Mobile */
@media (max-width: 800px) {
  .nav,
  .header-phone {
    display: none;
  }

  .brand img {
    height: 2.85rem;
  }

  .menu-btn {
    display: flex;
    margin-left: auto;
  }

  .menu-btn[aria-expanded="true"] span:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  .menu-btn[aria-expanded="true"] span:nth-child(2) {
    transform: translateY(-4px) rotate(-45deg);
  }

  .hero-grid,
  .board-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel.hero {
    padding-top: 3.5rem;
  }

  .hero-photo {
    order: -1;
  }

  .service-cards {
    grid-template-columns: 1fr;
  }
}
