/* =====================
   BASE & RESET
   ===================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --border: #E2E8F0;
  --border-subtle: #F1F5F9;
  --text-primary: #0F172A;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --accent: #2563EB;
  --accent-light: #EFF6FF;
  --accent-hover: #1D4ED8;
  --accent-border: #BFDBFE;
  --tag-bg: #F1F5F9;
  --tag-text: #475569;
  --green: #16A34A;
  --green-light: #F0FDF4;
  --green-border: #BBF7D0;
  --red-light: #FEF2F2;
  --red: #DC2626;
  --red-border: #FECACA;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.10), 0 4px 8px rgba(15, 23, 42, 0.05);
  --shadow-xl: 0 24px 60px rgba(15, 23, 42, 0.14), 0 8px 16px rgba(15, 23, 42, 0.06);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv01", "ss01";
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

/* =====================
   NAVIGATION
   ===================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo::before {
  content: '';
  width: 24px;
  height: 24px;
  background: var(--accent);
  border-radius: 6px;
  display: block;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: var(--tag-bg);
}

.btn-nav {
  background: var(--text-primary) !important;
  color: #fff !important;
  padding: 7px 16px !important;
  border-radius: var(--radius-xs) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em !important;
  transition: background 0.15s, transform 0.1s !important;
  margin-left: 8px;
}

.btn-nav:hover {
  background: #1E293B !important;
  transform: translateY(-1px) !important;
}

/* =====================
   BUTTONS
   ===================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.3);
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  color: var(--text-primary);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  cursor: pointer;
  font-family: inherit;
}

.btn-secondary:hover {
  border-color: #CBD5E1;
  background: var(--tag-bg);
  transform: translateY(-1px);
}

.btn-large {
  padding: 13px 28px;
  font-size: 15px;
}

/* =====================
   SECTION LABELS & TITLES
   ===================== */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.section-label::before {
  content: '';
  width: 16px;
  height: 1.5px;
  background: var(--border);
  display: block;
  flex-shrink: 0;
}

.section-title {
  font-size: clamp(24px, 3.5vw, 34px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 40px;
  line-height: 1.2;
}

/* =====================
   HERO
   ===================== */
.hero {
  padding: 110px 32px 104px;
  max-width: 820px;
  position: relative;
}

/* Subtle dot grid behind hero */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: -200px;
  width: 600px;
  height: 100%;
  background-image: radial-gradient(circle, #CBD5E1 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  background: var(--green-light);
  border: 1px solid var(--green-border);
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 32px;
  letter-spacing: 0.02em;
}

.hero-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.75); }
}

.hero-headline {
  font-size: clamp(38px, 5.5vw, 62px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: var(--text-primary);
  margin-bottom: 24px;
}

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

.hero-sub {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 520px;
  margin-bottom: 40px;
  font-weight: 400;
}

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

/* =====================
   PAIN POINT SECTION
   ===================== */
.pain {
  padding: 88px 32px;
  border-top: 1px solid var(--border);
}

.pain-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

.pain-headline {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.pain-strike {
  text-decoration: line-through;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2.5px;
  color: var(--text-muted);
}

.pain-sub {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
  max-width: 460px;
}

.pain-sub strong {
  color: var(--text-primary);
  font-weight: 600;
}

.pain-sub em {
  font-style: normal;
  font-weight: 600;
  color: var(--text-primary);
}

.pain-sub:last-of-type {
  margin-bottom: 32px;
}

/* Right card */
.pain-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.pain-card-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.pain-list {
  list-style: none;
}

.pain-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s;
}

.pain-list li:last-child {
  border-bottom: none;
}

.pain-list li:hover {
  background: var(--bg);
}

.pain-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 2px;
}

.pain-red {
  background: var(--red-light);
  color: var(--red);
  border: 1px solid var(--red-border);
}

.pain-list li div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pain-list li strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.pain-list li span {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.pain-card-footer {
  padding: 14px 24px;
  background: var(--accent-light);
  border-top: 1px solid var(--accent-border);
}

.pain-card-cta {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

@media (max-width: 860px) {
  .pain-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* =====================
   SERVICES
   ===================== */
.services {
  padding: 88px 32px;
  border-top: 1px solid var(--border);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.2s;
}

.service-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: #CBD5E1;
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  font-size: 18px;
  margin-bottom: 18px;
  width: 40px;
  height: 40px;
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.service-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.service-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* =====================
   PROJECTS
   ===================== */
.projects {
  padding: 88px 32px;
  border-top: 1px solid var(--border);
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s, border-color 0.25s;
}

.project-card:hover {
  box-shadow: var(--shadow-xl);
  border-color: #CBD5E1;
}

.project-meta {
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--bg);
}

.project-tag {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  background: var(--surface);
  color: var(--tag-text);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 100px;
  text-transform: uppercase;
}

.project-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.project-text {
  padding: 40px 40px 40px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-name {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 6px;
}

.project-subtitle {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.project-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 12px;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
  margin-bottom: 24px;
}

.project-stack span {
  font-size: 11.5px;
  font-weight: 600;
  background: var(--tag-bg);
  color: var(--tag-text);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.02em;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.project-links {
  display: flex;
  gap: 10px;
}

/* =====================
   PROJECT MOCKUP
   ===================== */
.project-visual {
  background: var(--bg);
  border-left: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
}

.project-mockup {
  width: 100%;
  max-width: 300px;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.mockup-bar {
  display: flex;
  gap: 5px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.mockup-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: block;
}

.mockup-bar span:first-child { background: #FC6058; }
.mockup-bar span:nth-child(2) { background: #FEC02F; }
.mockup-bar span:nth-child(3) { background: #2ACA44; }

.mockup-content {
  padding: 18px;
}

.mockup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.mockup-logo-pill {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.mockup-role-badge {
  font-size: 10px;
  font-weight: 700;
  background: var(--accent-light);
  color: var(--accent);
  padding: 3px 8px;
  border-radius: 100px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--accent-border);
}

.mockup-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.mockup-stat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 6px;
  text-align: center;
}

.stat-num {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mockup-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mockup-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg);
  border-radius: 7px;
  border: 1px solid var(--border);
}

.mockup-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}

.mockup-dot.active {
  background: var(--green);
}

.mockup-name {
  font-size: 11px;
  font-weight: 600;
  flex: 1;
  color: var(--text-primary);
}

.mockup-time {
  font-size: 10px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* =====================
   PROJECTS MORE
   ===================== */
.projects-more {
  margin-top: 24px;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-muted);
}

/* =====================
   CONTACT
   ===================== */
.contact {
  padding: 88px 32px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.contact .section-label {
  justify-content: center;
}

.contact .section-label::before {
  display: none;
}

.contact .section-title {
  text-align: center;
}

.contact-sub {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 460px;
  margin: 0 auto 36px;
  line-height: 1.75;
}

/* =====================
   MODAL
   ===================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--surface);
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  position: relative;
  border: 1px solid var(--border);
}

.modal-step {
  display: none;
  padding: 36px 36px 28px;
}

.modal-step.active {
  display: block;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  transition: background 0.15s, color 0.15s;
}

.modal-close:hover {
  background: var(--tag-bg);
  color: var(--text-primary);
}

.modal-step-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.modal-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.modal-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.65;
}

/* Service selection cards */
.service-select-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
}

.service-select-card {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  width: 100%;
}

.service-select-card:hover {
  border-color: #CBD5E1;
  background: var(--surface);
}

.service-select-card.selected {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.service-select-icon {
  font-size: 18px;
  width: 38px;
  height: 38px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}

.service-select-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.service-select-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Form fields */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 28px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.form-group label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.required {
  color: var(--red);
}

.form-group input,
.form-group textarea,
.form-group select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  outline: none;
  resize: vertical;
  appearance: none;
  -webkit-appearance: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
  background: var(--surface);
}

.form-group input.field-error,
.form-group textarea.field-error,
.form-group select.field-error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

/* Modal footer */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

/* Success state */
.modal-success {
  text-align: center;
  padding: 52px 36px;
}

.success-icon {
  width: 52px;
  height: 52px;
  background: var(--green-light);
  border: 1px solid var(--green-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--green);
  margin: 0 auto 20px;
}

/* =====================
   FOOTER
   ===================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  background: var(--surface);
}

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

.footer-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

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

.footer-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  transition: color 0.15s, background 0.15s;
}

.footer-links a:hover {
  color: var(--text-primary);
  background: var(--tag-bg);
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 720px) {
  .container {
    padding: 0 20px;
  }

  .nav-links a:not(.btn-nav) {
    display: none;
  }

  .hero {
    padding: 72px 20px 80px;
  }

  .hero::before {
    display: none;
  }

  .project-body {
    grid-template-columns: 1fr;
  }

  .project-visual {
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 28px;
  }

  .project-text {
    padding: 28px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .pain {
    padding: 64px 20px;
  }

  .services, .projects, .contact {
    padding: 64px 20px;
  }
}
