:root {
  --teal: #55aebe;
  --amber: #feb449;
  --orange: #fe5c36;
  --ink: #16202a;
  --muted: #5b6673;
  --bg: #ffffff;
  --bg-alt: #f7f8fa;
  --border: #e7e9ec;
  --card-dark: #16202a;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

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

a {
  color: inherit;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 88px 0;
}

h1, h2, h3 {
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 14px;
}

.section-head {
  max-width: 640px;
  margin: 0 0 48px;
}

.section-head p {
  color: var(--muted);
  font-size: 1.05rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

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

.btn-primary:hover {
  background: #e94f2a;
  transform: translateY(-1px);
}

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

.btn-ghost:hover {
  background: var(--ink);
  color: #fff;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.1rem;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink);
}

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

.nav-cta {
  display: flex;
  align-items: center;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  position: relative;
  content: "";
}

.nav-toggle span::before {
  top: -7px;
}

.nav-toggle span::after {
  top: 5px;
}

/* Hero */
.hero {
  padding: 96px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
}

.hero p.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 52ch;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-frame {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-frame::before,
.hero-frame::after {
  content: "";
  position: absolute;
  width: 46%;
  height: 46%;
  border: 4px solid var(--teal);
}

.hero-frame::before {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
}

.hero-frame::after {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
  border-color: var(--orange);
}

.hero-frame img {
  width: 62%;
  z-index: 1;
}

/* Stat row */
.stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  padding-top: 40px;
  margin-top: 40px;
  border-top: 1px solid var(--border);
}

.stat b {
  display: block;
  font-size: 1.6rem;
  color: var(--ink);
}

.stat span {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Alt background sections */
.alt {
  background: var(--bg-alt);
}

/* About */
.about .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.about ul {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.about li {
  display: flex;
  gap: 10px;
  color: var(--muted);
}

.about li::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 8px;
  border-radius: 2px;
  background: var(--amber);
}

/* Why AI */
.why {
  text-align: center;
}

.why .wrap {
  max-width: 780px;
}

.why h2 {
  margin: 0 auto 20px;
}

/* Services grid */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.card:hover {
  box-shadow: 0 8px 24px rgba(22, 32, 42, 0.08);
  transform: translateY(-2px);
}

.card .icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: rgba(254, 180, 73, 0.15);
  color: var(--orange);
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.card p {
  color: var(--muted);
  font-size: 0.96rem;
  margin: 0;
}

/* Portfolio */
.confidentiality-note {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: -32px;
  margin-bottom: 40px;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.work-card {
  border-radius: 12px;
  padding: 28px;
  background: var(--card-dark);
  color: #fff;
}

.work-card .tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 14px;
}

.work-card h3 {
  font-size: 1.15rem;
}

.work-card p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
  margin: 0;
}

/* Contact */
.contact .wrap {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
}

.contact-info h2 {
  margin-bottom: 16px;
}

.contact-info p {
  color: var(--muted);
  margin-bottom: 28px;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-weight: 600;
}

.contact-detail .icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  flex: none;
}

form {
  display: grid;
  gap: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

label {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 6px;
  display: block;
}

input,
textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--teal);
}

textarea {
  min-height: 130px;
  resize: vertical;
}

.form-status {
  font-size: 0.92rem;
  min-height: 1.3em;
}

.form-status.ok {
  color: #1a7f4e;
}

.form-status.err {
  color: var(--orange);
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--muted);
}

footer a {
  text-decoration: none;
  color: var(--muted);
}

footer a:hover {
  color: var(--orange);
}

/* Responsive */
@media (max-width: 880px) {
  .hero .wrap,
  .about .wrap,
  .contact .wrap {
    grid-template-columns: 1fr;
  }

  .hero-frame {
    order: -1;
    max-width: 280px;
    margin: 0 auto;
  }

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

  section {
    padding: 64px 0;
  }
}

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

  header.open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
  }

  header.open .nav-cta {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 168px;
    padding: 0 24px 20px;
    background: #fff;
  }

  .nav-toggle {
    display: block;
  }

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

  .form-row {
    grid-template-columns: 1fr;
  }

  .stats {
    gap: 24px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef1f4;
    --muted: #a3adb8;
    --bg: #12171d;
    --bg-alt: #171d24;
    --border: #2a323b;
  }

  header {
    background: rgba(18, 23, 29, 0.9);
  }

  header.open .nav-links,
  header.open .nav-cta {
    background: var(--bg);
  }

  input,
  textarea {
    background: #171d24;
    color: var(--ink);
  }

  .btn-ghost {
    border-color: var(--ink);
  }

  .btn-ghost:hover {
    color: var(--bg);
  }
}
