/* ===== Variables ===== */
:root {
  --primary: #0f766e;
  --primary-dark: #0d5c56;
  --primary-light: #14b8a6;
  --accent: #f59e0b;
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #334155;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  --font: 'Tajawal', sans-serif;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: white;
  box-shadow: 0 4px 14px rgba(20, 184, 166, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.5);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--primary-light);
  border-color: var(--primary-light);
}

.btn-outline {
  background: transparent;
  color: var(--primary-light);
  border: 2px solid var(--primary-light);
}

.btn-outline:hover {
  background: var(--primary-light);
  color: var(--bg-dark);
}

.btn-light {
  background: white;
  color: var(--primary-dark);
}

.btn-outline-light {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: white;
}

.btn-block {
  width: 100%;
}

.btn-search {
  padding: 0.85rem 1.75rem;
  white-space: nowrap;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: white;
}

.logo-icon {
  color: var(--primary-light);
  font-size: 1.5rem;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-list a {
  padding: 0.5rem 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}

.nav-list a:hover {
  color: var(--primary-light);
  background: rgba(20, 184, 166, 0.1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 0 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(20, 184, 166, 0.25), transparent),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(15, 118, 110, 0.2), transparent),
    linear-gradient(180deg, var(--bg-dark) 0%, #0c1222 100%);
  z-index: 0;
}

.hero-bg::before {
  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='%2314b8a6' 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.5;
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 2.5rem;
}

.domain-search-box {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  max-width: 560px;
  margin: 0 auto 0.75rem;
}

.domain-input-wrap {
  display: flex;
  flex: 1;
  min-width: 220px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.domain-input-wrap:focus-within {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
}

.domain-input {
  flex: 1;
  padding: 0.9rem 1rem;
  font-family: var(--font);
  font-size: 1rem;
  background: transparent;
  border: none;
  color: var(--text);
  outline: none;
}

.domain-input::placeholder {
  color: var(--text-muted);
}

.domain-tld {
  padding: 0.9rem 1rem;
  font-family: var(--font);
  font-size: 0.95rem;
  background: rgba(0, 0, 0, 0.2);
  border: none;
  border-right: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  outline: none;
}

.domain-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ===== Sections ===== */
section {
  padding: 5rem 0;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 3rem;
}

/* ===== Services ===== */
.services {
  background: linear-gradient(180deg, var(--bg-dark) 0%, #0c1222 100%);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow);
}

.service-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.service-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

/* ===== Pricing ===== */
.pricing {
  background: var(--bg-dark);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

.price-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s, border-color 0.3s;
}

.price-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.price-card.featured {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.3);
}

.price-card .badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  white-space: nowrap;
}

.price-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
}

.price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
}

.price .currency {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.price .amount {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-light);
}

.price .period {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.price-features {
  flex: 1;
  margin-bottom: 1.5rem;
}

.price-features li {
  padding: 0.5rem 0;
  padding-right: 1.5rem;
  position: relative;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.price-features li::before {
  content: '✓';
  position: absolute;
  right: 0;
  color: var(--primary-light);
  font-weight: 700;
}

/* ===== Features ===== */
.features {
  background: linear-gradient(180deg, #0c1222 0%, var(--bg-dark) 100%);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.feature-item {
  text-align: center;
  padding: 1.5rem;
  background: rgba(30, 41, 59, 0.5);
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}

.feature-item:hover {
  background: var(--bg-card);
  border-color: var(--border);
}

.feature-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.75rem;
}

.feature-item h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== CTA ===== */
.cta {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  text-align: center;
  padding: 4rem 0;
}

.cta-inner h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.cta-inner p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.5rem;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* ===== Footer ===== */
.footer {
  background: #0c1222;
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand .logo {
  margin-bottom: 0.75rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 260px;
}

.footer-links h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

.footer-links ul li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== Modal ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  cursor: pointer;
}

.modal-content {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text);
}

#domainResult {
  padding-top: 1.5rem;
  font-size: 1rem;
}

#domainResult .available {
  color: var(--primary-light);
  font-weight: 700;
}

#domainResult .taken {
  color: #f87171;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 280px;
    height: calc(100vh - 70px);
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    padding: 2rem;
    transition: right 0.3s;
    overflow-y: auto;
  }

  .nav.active {
    right: 0;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-list a {
    padding: 0.85rem;
    display: block;
  }

  .header-actions {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .domain-search-box {
    flex-direction: column;
  }

  .domain-input-wrap {
    min-width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand p {
    max-width: none;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 6rem 0 3rem;
  }

  .pricing-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }
}
