/* Midi Technology — responsive single-page styles */

:root {
  --bg-deep: #070b14;
  --bg-card: rgba(15, 23, 42, 0.65);
  --bg-card-solid: #0f172a;
  --border: rgba(148, 163, 184, 0.12);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #22d3ee;
  --accent-2: #818cf8;
  --accent-3: #c4b5fd;
  --header-h: 4rem;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --font-sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --step--1: clamp(0.875rem, 0.82rem + 0.2vw, 0.95rem);
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  --step-1: clamp(1.125rem, 1rem + 0.5vw, 1.25rem);
  --step-2: clamp(1.35rem, 1.15rem + 0.85vw, 1.65rem);
  --step-3: clamp(1.65rem, 1.35rem + 1.2vw, 2.1rem);
  --step-4: clamp(2rem, 1.5rem + 2vw, 2.85rem);
  --step-5: clamp(2.5rem, 1.75rem + 3vw, 3.75rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 1000;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--bg-deep);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(7, 11, 20, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(7, 11, 20, 0.88);
}

.header-inner {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand-mark {
  flex-shrink: 0;
  border-radius: 10px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.brand-name {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  padding: 0.5rem 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--step--1);
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
  background: rgba(148, 163, 184, 0.08);
  outline: none;
}

.site-nav .nav-cta {
  margin-left: 0.35rem;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(129, 140, 248, 0.25));
  color: var(--accent);
  border: 1px solid rgba(34, 211, 238, 0.35);
}

.site-nav .nav-cta:hover,
.site-nav .nav-cta:focus-visible {
  color: #fff;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.35), rgba(129, 140, 248, 0.4));
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1.25rem 1.25rem;
    background: rgba(7, 11, 20, 0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .site-nav a {
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
  }

  .site-nav .nav-cta {
    margin-left: 0;
    text-align: center;
    margin-top: 0.5rem;
  }
}

/* Nav toggle open state */
.site-header.nav-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.nav-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.site-header.nav-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-h) + 2.5rem) 1.25rem 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 55% at 50% -10%, rgba(34, 211, 238, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 45% at 100% 30%, rgba(129, 140, 248, 0.12), transparent 50%),
    radial-gradient(ellipse 50% 40% at 0% 70%, rgba(167, 139, 250, 0.1), transparent 45%),
    var(--bg-deep);
  pointer-events: none;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2394a3b8' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.9;
}

.hero-content {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.hero-title {
  margin: 0 0 1.25rem;
  font-size: var(--step-5);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero-title-line {
  display: inline-block;
  background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 45%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.slogan {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0 0 1.5rem;
  font-family: var(--font-mono);
  font-size: clamp(0.7rem, 2.5vw, 0.85rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.slogan-item {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.5);
  cursor: default;
  transition: color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.slogan-item:hover,
.slogan-item:focus-visible {
  outline: none;
  color: var(--accent);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.15);
  transform: translateY(-2px);
}

.slogan-sep {
  color: var(--border);
  user-select: none;
}

@media (max-width: 480px) {
  .slogan {
    gap: 0.35rem;
  }

  .slogan-sep {
    display: none;
  }

  .slogan-item {
    flex: 1 1 calc(50% - 0.35rem);
    text-align: center;
    min-width: calc(50% - 0.35rem);
  }
}

.hero-lead {
  margin: 0 auto 2rem;
  max-width: 540px;
  color: var(--text-muted);
  font-size: var(--step-1);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  font-family: inherit;
  font-size: var(--step--1);
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-primary {
  background: linear-gradient(135deg, #22d3ee, #6366f1);
  color: #0f172a;
  box-shadow: 0 8px 32px rgba(34, 211, 238, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(148, 163, 184, 0.08);
  transform: translateY(-2px);
}

.hero-scroll {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 40px;
  border: 2px solid var(--border);
  border-radius: 12px;
  opacity: 0.6;
}

.hero-scroll-line {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  background: var(--accent);
  border-radius: 2px;
  animation: scroll-hint 2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll-line {
    animation: none;
  }
}

@keyframes scroll-hint {
  0%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(12px);
  }
}

/* Sections */
main > .section {
  padding: 4.5rem 0;
  position: relative;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section-head {
  max-width: 720px;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  margin: 0 0 1rem;
  font-size: var(--step-3);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-intro {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--step-1);
}

/* About */
.section-about {
  border-top: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.25rem;
}

.about-card {
  padding: 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
}

.about-card h3 {
  margin: 0 0 0.75rem;
  font-size: var(--step-2);
  font-weight: 600;
  color: var(--accent);
}

.about-card p {
  margin: 0;
  color: var(--text-muted);
}

/* Services */
.section-services {
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.4) 30%, transparent);
}

.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1rem;
}

.service-card {
  padding: 1.5rem 1.5rem 1.75rem;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
  border-color: rgba(34, 211, 238, 0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.service-card-wide {
  grid-column: 1 / -1;
}

@media (min-width: 900px) {
  .service-card-wide {
    grid-column: span 2;
  }
}

.service-icon {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.9;
}

.service-card h3 {
  margin: 0 0 0.5rem;
  font-size: var(--step-2);
  font-weight: 600;
}

.service-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--step--1);
}

.service-card[data-service="cloud"] .service-icon {
  color: var(--accent);
}

.service-card[data-service="security"] .service-icon {
  color: var(--accent-2);
}

.service-card[data-service="data"] .service-icon {
  color: var(--accent-3);
}

.service-card[data-service="ai"] .service-icon {
  color: #f472b6;
}

.service-card[data-service="software"] .service-icon {
  color: #34d399;
}

/* Approach */
.section-approach {
  border-top: 1px solid var(--border);
}

.approach-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 1rem;
}

.approach-steps li {
  counter-increment: step;
  position: relative;
  padding: 1.25rem 1.25rem 1.25rem 3.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}

.approach-steps li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 8px;
}

.approach-steps strong {
  color: var(--text);
  font-weight: 600;
}

/* Contact */
.section-contact {
  padding: 5rem 0;
}

.contact-inner {
  text-align: center;
  padding: 3rem 1.5rem;
  background: linear-gradient(145deg, rgba(34, 211, 238, 0.08), rgba(99, 102, 241, 0.1));
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.contact-inner h2 {
  margin: 0 0 0.75rem;
  font-size: var(--step-3);
}

.contact-inner > p:first-of-type {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.contact-note {
  margin: 1rem 0 0;
  font-size: var(--step--1);
  color: var(--text-muted);
  opacity: 0.85;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

@media (min-width: 600px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 600;
}

.footer-copy {
  margin: 0;
  font-size: var(--step--1);
  color: var(--text-muted);
}

/* Scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
