/* =============================================
   PortalCore Studio — Global Stylesheet
   ============================================= */

:root {
  --color-bg:         #ffffff;
  --color-surface:    #f8fafc;
  --color-surface-2:  #f1f5f9;
  --color-border:     #e2e8f0;
  --color-primary:    #0f172a;
  --color-secondary:  #1e293b;
  --color-accent:     #2563eb;
  --color-accent-h:   #1d4ed8;
  --color-accent-lt:  #eff6ff;
  --color-text:       #1e293b;
  --color-muted:      #64748b;
  --color-white:      #ffffff;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.1), 0 4px 12px rgba(0,0,0,.06);

  --max-w: 1160px;
  --nav-h: 68px;
}

/* ---- Reset & Base ---- */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--color-accent-h); }

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

ul { list-style: none; }

h1,h2,h3,h4,h5 {
  color: var(--color-primary);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -.02em;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); }
h4 { font-size: 1.1rem; }

p { color: var(--color-muted); font-size: 1.0625rem; line-height: 1.75; }

/* ---- Layout ---- */

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

section { padding: 88px 0; }
section:nth-child(even) { background: var(--color-surface); }

.section-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 14px;
}

.section-header { max-width: 680px; margin-bottom: 56px; }
.section-header.centered { margin-inline: auto; text-align: center; }
.section-header p { margin-top: 16px; font-size: 1.125rem; }

/* ---- Navigation ---- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  height: var(--nav-h);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--color-primary);
  letter-spacing: -.03em;
  flex-shrink: 0;
}
.nav-logo:hover { color: var(--color-primary); }

.nav-logo-mark {
  width: 34px; height: 34px;
  background: var(--color-accent);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
}
.nav-logo-mark svg { width: 18px; height: 18px; fill: white; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  padding: 6px 13px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  color: var(--color-muted);
  transition: color .15s, background .15s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--color-primary);
  background: var(--color-surface-2);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  border: none;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
}
.btn-primary:hover { background: var(--color-accent-h); color: var(--color-white); }

.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
}
.btn-outline:hover { background: var(--color-accent-lt); }

.btn-ghost {
  background: transparent;
  color: var(--color-muted);
}
.btn-ghost:hover { background: var(--color-surface-2); color: var(--color-primary); }

.btn-lg { padding: 13px 28px; font-size: 1rem; border-radius: var(--radius-md); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: all .25s;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 16px 24px 24px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 10px 4px;
  font-size: .95rem;
  font-weight: 500;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
}
.mobile-menu a:last-child { border-bottom: none; }

/* ---- Hero ---- */

.hero {
  padding: 96px 0 80px;
  background: linear-gradient(160deg, #f0f4ff 0%, #ffffff 55%);
  overflow: hidden;
  position: relative;
}
.hero::after {
  content: '';
  position: absolute;
  right: -120px; top: -80px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(37,99,235,.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-accent-lt);
  border: 1px solid #bfdbfe;
  color: var(--color-accent);
  font-size: .8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.hero-text h1 { color: var(--color-primary); margin-bottom: 20px; }
.hero-text h1 span { color: var(--color-accent); }
.hero-text p { font-size: 1.15rem; margin-bottom: 36px; max-width: 520px; }

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

.hero-trust {
  margin-top: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .85rem;
  color: var(--color-muted);
}
.hero-trust span { display: flex; align-items: center; gap: 6px; }
.hero-trust .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--color-border); }

.hero-visual {
  position: relative;
}
.hero-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px;
  position: relative;
}
.hero-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.hero-card-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.hero-module {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--color-secondary);
}
.hero-module svg { width: 16px; height: 16px; color: var(--color-accent); flex-shrink: 0; }
.hero-module-badge {
  margin-left: auto;
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  background: #dcfce7;
  color: #15803d;
}

/* ---- Cards & Grid ---- */

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: box-shadow .2s, border-color .2s, transform .2s;
}
.card:hover {
  box-shadow: var(--shadow-md);
  border-color: #c7d7fe;
  transform: translateY(-2px);
}

.card-icon {
  width: 48px; height: 48px;
  background: var(--color-accent-lt);
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}
.card-icon svg { width: 22px; height: 22px; color: var(--color-accent); }

.card h3 { margin-bottom: 10px; }
.card p { font-size: .95rem; }

/* ---- Feature list ---- */

.feature-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .9rem;
  color: var(--color-text);
}
.feature-item::before {
  content: '';
  width: 18px; height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%232563eb'%3E%3Cpath fill-rule='evenodd' d='M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z' clip-rule='evenodd'/%3E%3C/svg%3E") center / contain no-repeat;
  flex-shrink: 0;
}

/* ---- Stats bar ---- */

.stats-bar {
  background: var(--color-primary);
  padding: 48px 0;
}
.stats-bar .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}
.stat-item h3 {
  font-size: 2.4rem;
  color: var(--color-white);
  margin-bottom: 6px;
}
.stat-item p { color: #94a3b8; font-size: .9rem; }

/* ---- CTA Banner ---- */

.cta-banner {
  background: linear-gradient(135deg, var(--color-accent) 0%, #1d4ed8 100%);
  padding: 72px 0;
}
.cta-banner .container { text-align: center; }
.cta-banner h2 { color: var(--color-white); margin-bottom: 16px; }
.cta-banner p { color: rgba(255,255,255,.8); font-size: 1.1rem; max-width: 520px; margin: 0 auto 36px; }
.btn-white {
  background: var(--color-white);
  color: var(--color-accent);
  font-weight: 700;
}
.btn-white:hover { background: #f1f5f9; color: var(--color-accent-h); }
.btn-white-outline {
  background: transparent;
  color: var(--color-white);
  border: 2px solid rgba(255,255,255,.5);
}
.btn-white-outline:hover { background: rgba(255,255,255,.1); color: white; }

/* ---- Process steps ---- */

.process-steps { display: flex; flex-direction: column; gap: 0; }
.process-step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 24px;
  position: relative;
  padding-bottom: 40px;
}
.process-step:last-child { padding-bottom: 0; }
.step-number-col { display: flex; flex-direction: column; align-items: center; }
.step-number {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--color-accent);
  color: white;
  font-weight: 800;
  font-size: 1rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  z-index: 1;
}
.step-line {
  width: 2px;
  flex: 1;
  background: var(--color-border);
  margin-top: 8px;
}
.process-step:last-child .step-line { display: none; }
.step-content { padding-top: 10px; }
.step-content h3 { margin-bottom: 8px; }

/* ---- FAQ ---- */

.faq-list { display: flex; flex-direction: column; gap: 0; max-width: 760px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--color-border);
}
.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 22px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary);
  transition: color .15s;
}
.faq-question:hover { color: var(--color-accent); }
.faq-icon {
  width: 22px; height: 22px;
  flex-shrink: 0;
  transition: transform .25s;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  display: none;
  padding-bottom: 20px;
  font-size: .96rem;
  color: var(--color-muted);
  line-height: 1.75;
}
.faq-item.open .faq-answer { display: block; }

/* ---- Contact form ---- */

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: .875rem;
  font-weight: 600;
  color: var(--color-secondary);
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 11px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: .95rem;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.form-group textarea { resize: vertical; min-height: 130px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ---- Tag / Badge ---- */

.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: .78rem;
  font-weight: 600;
}
.tag-blue { background: var(--color-accent-lt); color: var(--color-accent); }
.tag-green { background: #dcfce7; color: #15803d; }
.tag-amber { background: #fef9c3; color: #92400e; }
.tag-slate { background: var(--color-surface-2); color: var(--color-muted); }

/* ---- Split layout ---- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.split.reverse { direction: rtl; }
.split.reverse > * { direction: ltr; }

/* ---- Testimonial / Case Study card ---- */

.case-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.case-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.case-card-header {
  background: linear-gradient(135deg, var(--color-accent) 0%, #1d4ed8 100%);
  padding: 28px 28px 20px;
}
.case-card-header h3 { color: white; font-size: 1.15rem; }
.case-card-header p { color: rgba(255,255,255,.75); font-size: .85rem; margin-top: 4px; }
.case-card-body { padding: 24px 28px; }
.case-metric {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 6px;
}
.case-metric strong { font-size: 1.5rem; color: var(--color-accent); font-weight: 800; }
.case-metric span { font-size: .85rem; color: var(--color-muted); }
.case-metrics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }

/* ---- Team card ---- */

.team-card {
  text-align: center;
  padding: 32px 24px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.team-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: white;
}
.team-card h4 { margin-bottom: 4px; }
.team-card .role { font-size: .85rem; color: var(--color-accent); font-weight: 600; margin-bottom: 10px; }
.team-card p { font-size: .875rem; }

/* ---- Page hero (sub-pages) ---- */

.page-hero {
  background: linear-gradient(160deg, #f0f4ff 0%, #ffffff 60%);
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--color-border);
}
.page-hero h1 { margin-bottom: 16px; }
.page-hero p { font-size: 1.125rem; max-width: 580px; }

/* ---- Footer ---- */

.site-footer {
  background: var(--color-primary);
  color: #94a3b8;
  padding: 64px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid #1e293b;
}
.footer-brand p { margin-top: 12px; font-size: .9rem; line-height: 1.7; max-width: 280px; }
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--color-white);
  letter-spacing: -.03em;
}
.footer-logo-mark {
  width: 32px; height: 32px;
  background: var(--color-accent);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
}
.footer-logo-mark svg { width: 16px; height: 16px; fill: white; }

.footer-col h5 {
  color: var(--color-white);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  color: #94a3b8;
  font-size: .9rem;
  padding: 4px 0;
  transition: color .15s;
}
.footer-col a:hover { color: var(--color-white); }

.footer-bottom {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .85rem;
}
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: #64748b; }
.footer-bottom-links a:hover { color: #94a3b8; }

/* ---- Misc Utilities ---- */

.text-center { text-align: center; }
.text-muted { color: var(--color-muted); }
.mb-0 { margin-bottom: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.gap-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

.highlight-box {
  background: var(--color-accent-lt);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 20px 24px;
}

.icon-sm { width: 20px; height: 20px; }
.icon-md { width: 28px; height: 28px; }

.divider { border: none; border-top: 1px solid var(--color-border); margin: 40px 0; }

/* ---- Responsive ---- */

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  section { padding: 64px 0; }

  .nav-links, .nav-cta .btn-outline { display: none; }
  .hamburger { display: flex; }

  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { display: none; }

  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }

  .split { grid-template-columns: 1fr; gap: 40px; }
  .split.reverse { direction: ltr; }

  .stats-bar .container { grid-template-columns: repeat(2, 1fr); }

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

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

@media (max-width: 480px) {
  .hero { padding: 64px 0 56px; }
  h1 { font-size: 1.9rem; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .stats-bar .container { grid-template-columns: 1fr 1fr; }
  .case-metrics-grid { grid-template-columns: 1fr; }
}
