/* =============================================
   JOIKEF S.L. — Corporate Website Stylesheet
   Colors: Corporate Blue #1B3A6B / Accent #3B7DDD / Light Gray #F4F6F9
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* --- CSS Variables --- */
:root {
  --blue-dark: #0F2342;
  --blue-primary: #1B3A6B;
  --blue-accent: #3B7DDD;
  --blue-light: #5A9CF5;
  --gray-100: #F4F6F9;
  --gray-200: #E8ECF1;
  --gray-300: #D1D8E3;
  --gray-400: #A0ADBF;
  --gray-500: #6B7A8D;
  --gray-600: #4A5568;
  --gray-700: #2D3748;
  --white: #FFFFFF;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --shadow-sm: 0 1px 3px rgba(15, 35, 66, 0.08);
  --shadow-md: 0 4px 16px rgba(15, 35, 66, 0.1);
  --shadow-lg: 0 8px 32px rgba(15, 35, 66, 0.12);
  --shadow-xl: 0 16px 48px rgba(15, 35, 66, 0.16);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--gray-700);
  background: var(--gray-100);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue-light); }

img { max-width: 100%; height: auto; display: block; }

/* --- Grid Background Pattern --- */
.grid-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(rgba(27, 58, 107, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27, 58, 107, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-200);
  transition: box-shadow var(--transition);
}

.nav.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo img {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--gray-600);
  font-weight: 500;
  font-size: 0.925rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--blue-primary);
  background: rgba(59, 125, 221, 0.08);
}

.nav-links a.nav-cta {
  background: var(--blue-primary);
  color: var(--white);
  padding: 0.5rem 1.25rem;
  font-weight: 600;
}

.nav-links a.nav-cta:hover {
  background: var(--blue-accent);
  color: var(--white);
}

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

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: all var(--transition);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 2rem 80px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(59, 125, 221, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -10%; left: -5%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(27, 58, 107, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(59, 125, 221, 0.1);
  border: 1px solid rgba(59, 125, 221, 0.2);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--blue-primary);
  font-weight: 500;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.6s ease-out;
}

.hero-badge::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--blue-accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--blue-dark);
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--blue-accent), var(--blue-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-text {
  font-size: 1.15rem;
  color: var(--gray-500);
  line-height: 1.8;
  margin-bottom: 2rem;
  max-width: 520px;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

/* Hero Visual */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--gray-200);
  width: 100%;
  max-width: 460px;
}

.hero-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--gray-200);
}

.hero-card-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}

.hero-card-dot.red { background: #FF5F57; }
.hero-card-dot.yellow { background: #FEBC2E; }
.hero-card-dot.green { background: #28C840; }

.terminal-line {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 2.2;
  color: var(--gray-500);
}

.terminal-line .prompt {
  color: var(--blue-accent);
  font-weight: 700;
}

.terminal-line .cmd {
  color: var(--gray-700);
  font-weight: 500;
}

.terminal-line .output {
  color: #28C840;
}

.terminal-line .comment {
  color: var(--gray-400);
  font-style: italic;
}

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--blue-accent);
  animation: blink 1s steps(1) infinite;
  vertical-align: text-bottom;
  margin-left: 4px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--blue-primary);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(27, 58, 107, 0.3);
}

.btn-primary:hover {
  background: var(--blue-accent);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 125, 221, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--blue-primary);
  border: 2px solid var(--gray-300);
}

.btn-outline:hover {
  border-color: var(--blue-accent);
  color: var(--blue-accent);
  transform: translateY(-2px);
}

/* --- Sections --- */
.section {
  position: relative;
  padding: 100px 2rem;
  z-index: 1;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue-accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--blue-dark);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--gray-500);
  max-width: 600px;
  line-height: 1.8;
}

/* --- Services Section --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-accent), var(--blue-light));
  opacity: 0;
  transition: opacity var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(59, 125, 221, 0.2);
}

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

.service-icon {
  width: 48px; height: 48px;
  background: rgba(59, 125, 221, 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.4rem;
}

.service-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 0.75rem;
}

.service-card p {
  font-size: 0.925rem;
  color: var(--gray-500);
  line-height: 1.7;
}

.service-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.25rem 0.6rem;
  background: var(--gray-100);
  color: var(--gray-500);
  border-radius: 4px;
  margin-top: 1rem;
  margin-right: 0.35rem;
}

/* --- Why Section (Dark) --- */
.section-dark {
  background: var(--blue-dark);
  color: var(--white);
}

.section-dark .section-title {
  color: var(--white);
}

.section-dark .section-subtitle {
  color: rgba(255, 255, 255, 0.6);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.stat-card {
  text-align: center;
  padding: 2rem 1rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all var(--transition);
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue-light), #8BB8F8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

/* --- Contact Page --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 3rem;
}

.contact-form-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.925rem;
  color: var(--gray-700);
  background: var(--white);
  transition: all var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--blue-accent);
  box-shadow: 0 0 0 3px rgba(59, 125, 221, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-status {
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-weight: 500;
  font-size: 0.9rem;
}

.form-status.success {
  background: rgba(40, 200, 64, 0.1);
  color: #1a7a2e;
  border: 1px solid rgba(40, 200, 64, 0.2);
}

.form-status.error {
  background: rgba(255, 59, 48, 0.1);
  color: #c0392b;
  border: 1px solid rgba(255, 59, 48, 0.2);
}

/* Contact Info Side */
.contact-info-side {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-info-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.contact-info-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-info-card p {
  font-size: 0.9rem;
  color: var(--gray-500);
  line-height: 1.7;
}

.contact-info-card a {
  font-weight: 600;
}

.contact-map {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  flex-grow: 1;
  min-height: 240px;
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  min-height: 240px;
  border: 0;
  display: block;
}

/* --- Page Header (for inner pages) --- */
.page-header {
  padding: 140px 2rem 60px;
  position: relative;
  z-index: 1;
}

.page-header-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.page-header h1 {
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--blue-dark);
  margin-bottom: 0.75rem;
}

.page-header p {
  font-size: 1.1rem;
  color: var(--gray-500);
  max-width: 550px;
}

/* --- Footer --- */
.footer {
  background: var(--blue-dark);
  color: rgba(255, 255, 255, 0.6);
  padding: 60px 2rem 30px;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand img {
  height: 36px;
  margin-bottom: 1rem;
  filter: brightness(0) invert(1);
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.8;
  max-width: 320px;
}

.footer h4 {
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.4);
}

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  .hero-text { margin: 0 auto 2rem; }
  .hero-actions { justify-content: center; }
  .hero-visual { justify-content: center; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { 
    display: none;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .hero { min-height: auto; padding: 120px 1.5rem 60px; }
  .services-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  .section { padding: 60px 1.5rem; }
}
