:root {
  --primary: #0f6fc5;
  --primary-dark: #0b5aa1;
  --primary-tint: #eaf3fc;
  --ink: #101114;
  --ink-soft: #5a5f6a;
  --bg: #ffffff;
  --bg-alt: #f5f6f8;
  --dark-bg: #111318;
  --dark-ink-soft: #a8adb8;
  --border: #e6e7eb;
  --radius: 4px;
  --max-width: 1360px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

em {
  font-style: italic;
  color: var(--primary);
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 64px;
  width: auto;
  display: block;
}

.nav {
  display: flex;
  gap: 36px;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.88rem;
  letter-spacing: -0.01em;
  transition: color 0.15s ease;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  display: block;
}

/* Hero */
.hero {
  position: relative;
  padding: 150px 0 110px;
  overflow: hidden;
  background:
    radial-gradient(60% 60% at 85% 10%, var(--primary-tint) 0%, rgba(234, 243, 252, 0) 70%),
    linear-gradient(180deg, #fbfcfd 0%, var(--bg) 100%);
}

.hero-glow {
  position: absolute;
  top: -220px;
  right: -160px;
  width: 800px;
  height: 500px;
  background: radial-gradient(closest-side, rgba(15, 111, 197, 0.16), rgba(15, 111, 197, 0));
  pointer-events: none;
}

.hero .container {
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: start;
  gap: 48px;
}

.hero-badge {
  display: inline-block;
  margin: 0 0 24px;
  padding: 8px 18px;
  border: 1px solid rgba(15, 111, 197, 0.25);
  border-radius: 999px;
  background: rgba(15, 111, 197, 0.06);
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hero-sub {
  margin-left: 0;
}

.hero-actions {
  justify-content: flex-start;
}

.hero-visual-panel {
  position: relative;
  border-radius: 20px;
  box-shadow: 0 30px 60px -20px rgba(15, 18, 24, 0.35);
}

.hero-visual-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3.4;
  object-fit: cover;
  display: block;
  border-radius: 20px;
}

.hero-badge-float {
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-shadow: 0 10px 24px rgba(15, 18, 24, 0.25);
}

.hero-badge-float svg {
  width: 100%;
  height: 100%;
}

.hero-badge-flutter {
  top: -18px;
  right: 32px;
}

.hero-badge-firebase {
  bottom: 40px;
  left: -18px;
}

.eyebrow {
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  margin: 0 0 20px;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.05;
  font-weight: 700;
  margin: 0 0 28px;
  letter-spacing: -0.03em;
}

.hero-sub {
  font-size: 1.2rem;
  color: var(--ink-soft);
  margin: 0 0 40px;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 16px 32px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, background 0.15s ease;
  border: 1px solid transparent;
  cursor: pointer;
}

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

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

/* Sections */
.section {
  padding: 110px 0;
  border-top: 1px solid var(--border);
}

.section-alt {
  background: var(--bg-alt);
}

.section-dark {
  background: var(--dark-bg);
  color: #fff;
  border-top-color: var(--dark-bg);
}

.section-dark .eyebrow {
  color: #7fb4e8;
}

.section h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 700;
  margin: 0 0 56px;
  letter-spacing: -0.02em;
  max-width: 780px;
}

.section h2.section-title-center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

#stack h2,
#faq h2 {
  max-width: none;
}

/* Icons */
.service-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--primary-tint);
  color: var(--primary);
  margin-bottom: 18px;
}

.service-icon svg {
  width: 22px;
  height: 22px;
}

.section-dark .service-icon,
.stack-card .service-icon {
  background: rgba(15, 111, 197, 0.18);
  color: #7fb4e8;
}

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

.service-card {
  background: rgba(15, 111, 197, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.service-card:hover {
  background: var(--primary-tint);
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(15, 111, 197, 0.12);
}

.service-card h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  font-weight: 600;
}

.service-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

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

.stack-card {
  background: #1a1d24;
  border: 1px solid #2a2e38;
  border-radius: var(--radius);
  padding: 32px;
}

.stack-card h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  font-weight: 700;
}

.stack-card p {
  color: var(--dark-ink-soft);
  margin: 0 0 20px;
  font-size: 0.95rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: rgba(15, 111, 197, 0.18);
  color: #7fb4e8;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
}

/* Case studies */
.case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.case-card {
  background: rgba(15, 111, 197, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
}

.case-badge {
  display: inline-block;
  background: var(--primary-tint);
  color: var(--primary-dark);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.case-card h3 {
  margin: 0 0 12px;
  font-size: 1.4rem;
  font-weight: 700;
}

.case-card p {
  margin: 0 0 18px;
  color: var(--ink-soft);
}

.case-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.case-links a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}

.case-links a:hover {
  text-decoration: underline;
}

/* Process */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.process-item h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 600;
}

.process-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* Benefits */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px 48px;
}

.benefit {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.benefit h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: 600;
}

.benefit p {
  margin: 0;
  color: var(--ink-soft);
}

/* FAQ */
.faq-list {
  max-width: 780px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  flex-shrink: 0;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--primary);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  margin: 16px 0 0;
  color: var(--ink-soft);
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 56px;
}

.contact-info p {
  margin: 0 0 26px;
}

.contact-info a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.contact-info a:hover {
  text-decoration: underline;
}

.contact-map {
  width: 100%;
  height: 320px;
  border: 0;
  border-radius: 12px;
  display: block;
}

.contact-form {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 32px;
}

.form-row-hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.form-row {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

.form-row input,
.form-row textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  background: #fff;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 111, 197, 0.15);
}

.form-note {
  margin: 14px 0 0;
  font-size: 0.9rem;
  color: var(--primary);
}

.form-note-success {
  font-size: 1.05rem;
  font-weight: 600;
  color: #1a8a4a;
}

/* Footer */
.site-footer {
  background: var(--dark-bg);
  color: var(--dark-ink-soft);
  padding: 56px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-logo {
  height: 44px;
  width: auto;
  filter: brightness(0) invert(1);
}

.footer-brand p {
  margin: 0;
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--dark-ink-soft);
  text-decoration: none;
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: #fff;
}

.legal-page {
  padding: 160px 0 100px;
}

.legal-content {
  max-width: 720px;
}

.legal-content h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 700;
  margin: 0 0 32px;
  letter-spacing: -0.02em;
}

.legal-content h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 40px 0 12px;
}

.legal-content p {
  margin: 0 0 12px;
  color: var(--ink-soft);
}

.legal-content a {
  color: var(--primary);
}

.footer-copy {
  width: 100%;
  margin: 0;
  font-size: 0.8rem;
  border-top: 1px solid #2a2e38;
  padding-top: 24px;
}

/* Responsive */
@media (max-width: 900px) {
  .stack-grid { grid-template-columns: 1fr; }
  .case-grid { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .benefits-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { max-width: 420px; margin: 0 auto; }
}

@media (max-width: 720px) {
  .nav {
    position: absolute;
    top: 96px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 20px 32px;
    display: none;
    gap: 20px;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
  }
  .nav.open { display: flex; }
  .nav-toggle { display: flex; }
  .service-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .hero { padding: 100px 0 70px; }
  .section { padding: 72px 0; }
}

@media (max-width: 480px) {
  .container { padding: 0 20px; }
  .header-inner { height: 80px; }
  .logo-img { height: 52px; }
  .nav { top: 80px; }
  .hero-badge-float { width: 44px; height: 44px; padding: 9px; }
  .hero-badge-flutter { top: -12px; right: 20px; }
  .hero-badge-firebase { bottom: 24px; left: -12px; }
  .btn { padding: 14px 24px; width: 100%; text-align: center; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .case-card, .stack-card, .service-card { padding: 24px; }
}
