/* ─── CSS Variables / Theme ─── */
:root {
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-light: #14b8a6;
  --accent: #0d9488;
  --accent-dark: #0f766e;
  --bg: #0F0F1A;
  --bg-card: #1A1A2E;
  --bg-card-hover: #222240;
  --bg-input: #16162B;
  --text: #E8E8F0;
  --text-muted: #8888A8;
  --text-heading: #FFFFFF;
  --border: #2A2A45;
  --success: #00E676;
  --error: #FF5252;
  --warning: #FFD740;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.5);
  --transition: 0.2s ease;
}

/* ─── Custom scrollbar ─── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── Selection ─── */
::selection { background: rgba(0, 206, 201, 0.3); color: white; }

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); touch-action: manipulation; }
a:hover { color: var(--primary-light); }

/* ─── Layout ─── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ─── Header / Nav ─── */
header {
  background: rgba(15, 15, 26, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 24px;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  height: 70px;
}
.logo {
  font-size: 1.5rem;
  font-weight: 900;
  font-style: italic;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 0;
  letter-spacing: -0.5px;
  text-decoration: none;
}
.logo i { display: none; } /* icon removed — bar is part of the wordmark */
.logo .logo-bar {
  display: inline-block;
  width: 3px;
  height: 1.1em;
  background: linear-gradient(to bottom, #0D9488, #0CE4E4);
  border-radius: 2px;
  margin: 0 5px;
  flex-shrink: 0;
  align-self: center;
  vertical-align: middle;
  position: relative;
  top: -1px;
}
.logo span { color: #0CE4E4; }

.nav-links { display: flex; gap: 8px; align-items: center; }
.nav-links a, .nav-links button {
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}
.nav-links a:hover, .nav-links button:hover {
  color: var(--text);
  background: var(--bg-card);
}
.nav-links a.active, .nav-links button.active {
  color: var(--accent);
  background: rgba(0, 206, 201, 0.1);
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  touch-action: manipulation;
  min-height: 48px;
  min-width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(15, 15, 26, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px;
    z-index: 99;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: slideDown 0.3s ease-out;
  }
  .nav-links.open { display: flex; }
  .nav-links a, .nav-links button {
    padding: 14px 16px;
    min-height: 48px;
    display: flex;
    align-items: center;
  }
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Hero Section ─── */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.08) 0%, transparent 100%);
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 16px;
  line-height: 1.2;
}
.hero h1 span {
  background: linear-gradient(135deg, var(--accent), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 40px;
}

/* Quick Check Box */
.quick-check {
  max-width: 560px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.quick-check h3 {
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: var(--text-heading);
}
.input-row {
  display: flex;
  gap: 12px;
}
.input-row input {
  flex: 1;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: 1rem;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 1px;
  outline: none;
  transition: border-color var(--transition);
}
.input-row input:focus { border-color: var(--accent); }
.input-row input::placeholder { color: var(--text-muted); font-family: 'Inter', sans-serif; letter-spacing: 0; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  touch-action: manipulation;
  min-height: 44px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(15, 118, 110, 0.4);
}
.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #0F0F1A;
}
.btn-accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 206, 201, 0.4);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ─── Stats Bar ─── */
.stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}
.stat { text-align: center; }
.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}
@media (max-width: 600px) { .stats { gap: 24px; flex-wrap: wrap; } }

/* ─── Category Grid ─── */
.section { padding: 60px 0; }
.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 8px;
}
.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 40px;
  font-size: 1rem;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}
.cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.cat-card:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.cat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(15, 118, 110, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.2rem;
  color: var(--primary-light);
}
.cat-card h3 {
  font-size: 1.15rem;
  color: var(--text-heading);
  margin-bottom: 8px;
}
.cat-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
}
.cat-card .service-count {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
}

/* ─── Service List View ─── */
.page-header {
  padding: 40px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.page-header .back-link {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}
.page-header h2 {
  font-size: 1.6rem;
  color: var(--text-heading);
}

.service-list { display: flex; flex-direction: column; gap: 12px; padding-bottom: 60px; }

.service-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: all var(--transition);
  gap: 16px;
  flex-wrap: wrap;
}
.service-item:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
}
.service-info { flex: 1; min-width: 250px; }
.service-info h4 { color: var(--text-heading); font-size: 1rem; margin-bottom: 4px; }
.service-info p { color: var(--text-muted); font-size: 0.85rem; }
.service-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.service-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 80px;
  text-align: right;
}
.badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-instant {
  background: rgba(0, 230, 118, 0.15);
  color: var(--success);
}
.badge-processing {
  background: rgba(255, 215, 64, 0.15);
  color: var(--warning);
}

/* ─── Order Modal ─── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}
.modal-backdrop.open { opacity: 1; visibility: visible; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform 0.3s;
}
.modal-backdrop.open .modal { transform: translateY(0); }

.modal h3 {
  font-size: 1.3rem;
  color: var(--text-heading);
  margin-bottom: 4px;
}
.modal .modal-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--accent);
}
.form-group textarea {
  min-height: 100px;
  resize: vertical;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
}
.form-group .hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.order-summary {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 24px;
}
.order-summary .line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9rem;
}
.order-summary .line:last-child { margin-bottom: 0; }
.order-summary .total {
  font-weight: 700;
  color: var(--accent);
  font-size: 1.1rem;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

/* ─── Results Display ─── */
.result-box {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  margin-top: 20px;
}
.result-box h4 {
  color: var(--accent);
  margin-bottom: 12px;
  font-size: 1rem;
}
.result-content {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-all;
}
.result-content b, .result-content strong { color: var(--text-heading); }

.result-success { border-color: var(--success); }
.result-error { border-color: var(--error); }

/* ─── Tabs ─── */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.tab {
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition);
  font-family: inherit;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ─── Bulk Order Area ─── */
.bulk-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-top: 32px;
}
.bulk-section h3 {
  color: var(--text-heading);
  margin-bottom: 16px;
}

/* ─── Footer ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
footer a { color: var(--text-muted); }
footer a:hover { color: var(--accent); }

/* ─── Loading Spinner ─── */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Toast Notification ─── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 24px;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s;
  max-width: 400px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--error); }
@media (max-width: 768px) {
  .toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: unset;
    border-radius: var(--radius-sm);
  }
}

/* ─── Features / Trust ─── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  padding: 60px 0;
}
.feature {
  text-align: center;
  padding: 32px 20px;
}
.feature-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 14px;
  background: rgba(15, 118, 110, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--primary-light);
}
.feature h4 {
  color: var(--text-heading);
  margin-bottom: 8px;
}
.feature p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ─── Smooth page transitions ─── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.cat-card { animation: fadeIn 0.4s ease-out backwards; }
.cat-card:nth-child(1) { animation-delay: 0.05s; }
.cat-card:nth-child(2) { animation-delay: 0.1s; }
.cat-card:nth-child(3) { animation-delay: 0.15s; }
.cat-card:nth-child(4) { animation-delay: 0.2s; }
.cat-card:nth-child(5) { animation-delay: 0.25s; }
.cat-card:nth-child(6) { animation-delay: 0.3s; }
.cat-card:nth-child(7) { animation-delay: 0.35s; }

.service-item { animation: fadeIn 0.3s ease-out backwards; }
.feature { animation: fadeIn 0.5s ease-out backwards; }
.feature:nth-child(1) { animation-delay: 0.1s; }
.feature:nth-child(2) { animation-delay: 0.2s; }
.feature:nth-child(3) { animation-delay: 0.3s; }
.feature:nth-child(4) { animation-delay: 0.4s; }

.stat { animation: fadeIn 0.4s ease-out backwards; }
.stat:nth-child(1) { animation-delay: 0.05s; }
.stat:nth-child(2) { animation-delay: 0.1s; }
.stat:nth-child(3) { animation-delay: 0.15s; }
.stat:nth-child(4) { animation-delay: 0.2s; }

/* Focus ring */
input:focus, select:focus, textarea:focus {
  box-shadow: 0 0 0 3px rgba(0, 206, 201, 0.15);
}

/* Button press effect */
.btn:active:not(:disabled) { transform: translateY(1px) !important; }

/* Gradient text helper */
.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass card effect */
.glass {
  background: rgba(26, 26, 46, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Subtle glow on hover for category cards */
.cat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: var(--radius);
  background: radial-gradient(circle at 50% 0%, rgba(15, 118, 110, 0.08), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.cat-card:hover::before { opacity: 1; }

/* Service price shimmer on hover */
.service-item:hover .service-price {
  text-shadow: 0 0 12px rgba(0, 206, 201, 0.4);
}

/* ─── Hidden ─── */
.hidden { display: none !important; }

/* ─── Search ─── */
.search-box {
  margin-bottom: 24px;
}
.search-box input {
  width: 100%;
  padding: 14px 18px 14px 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition);
}
.search-box input:focus { border-color: var(--accent); }
.search-box { position: relative; }
.search-box i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* ─── Mobile Enhancements ─── */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .section { padding: 40px 0; }
  .section-title { font-size: 1.4rem; }
  .cat-grid { grid-template-columns: 1fr; gap: 12px; }
  .cat-card { padding: 20px; }
  .service-item { padding: 16px; flex-direction: column; align-items: flex-start; }
  .service-meta { width: 100%; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
  .service-info { min-width: unset; }
  .modal { padding: 24px; margin: 12px; }
  .modal-backdrop { padding: 12px; }
  .input-row { flex-direction: column; }
  .quick-check { padding: 24px; margin: 0 8px; }
  .stats { gap: 16px; padding: 24px 0; }
  .stat-value { font-size: 1.5rem; }
  .features { gap: 12px; padding: 40px 0; }
  .feature { padding: 24px 16px; }
  .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; gap: 0; }
  .tab { padding: 12px 16px; font-size: 0.82rem; flex-shrink: 0; }
}

/* ─── Small Phone Enhancements ─── */
@media (max-width: 380px) {
  body { font-size: 14px; }
  .container { padding: 0 12px; }
  header { padding: 0 12px; }
  .nav { height: 60px; }
  .logo { font-size: 1.3rem; }
  .btn { padding: 12px 20px; font-size: 0.88rem; }
  .btn-sm { padding: 8px 16px; font-size: 0.8rem; }
}
