/**
 * DigitSpire — Global styles
 * Production-ready base + components
 */

:root {
  --primary: #0a0f1e;
  --secondary: #0d1b3e;
  --accent: #0072ff;
  --accent-light: #00c6ff;
  --text-primary: #ffffff;
  --text-muted: #8a9bbe;
  --surface: #111827;
  --border: rgba(0, 114, 255, 0.2);
  --gradient: linear-gradient(135deg, #0072ff, #00c6ff);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-glow: 0 0 0 1px var(--border), 0 12px 40px rgba(0, 114, 255, 0.15);
  --shadow-glow-hover: 0 0 0 1px rgba(0, 198, 255, 0.35), 0 18px 50px rgba(0, 114, 255, 0.28);
  --font-heading: "Syne", system-ui, sans-serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --max-width: 1200px;
  --header-height: 76px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--primary);
  min-height: 100vh;
  overflow-x: hidden;
}

body.page-exit {
  opacity: 0;
  transition: opacity 0.35s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-color: var(--primary);
  background-image:
    linear-gradient(rgba(0, 114, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 114, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--text-primary);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
  color: var(--text-muted);
}

ul {
  margin: 0;
  padding: 0;
}

.container {
  width: min(100% - 2.5rem, var(--max-width));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* ——— Brand ——— */
.logo {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  align-items: flex-start;
}

.logo__name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  text-transform: none;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 32px rgba(0, 198, 255, 0.35);
}

.logo__tag {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-style: italic;
  max-width: 220px;
  line-height: 1.3;
}

.logo--footer .logo__name {
  font-size: 1.5rem;
}

/* ——— Header / Nav ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), backdrop-filter var(--transition);
}

.site-header.is-scrolled {
  background: rgba(10, 15, 30, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav__list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.nav__link {
  display: inline-block;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--text-primary);
  background: rgba(0, 114, 255, 0.12);
  box-shadow: 0 0 20px rgba(0, 114, 255, 0.12);
}

.nav__cta {
  margin-left: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.35rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
}

.btn:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 3px;
}

.btn--primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn--primary:hover {
  box-shadow: var(--shadow-glow-hover);
  transform: translateY(-2px);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  border-color: rgba(0, 198, 255, 0.45);
  box-shadow: var(--shadow-glow-hover);
  transform: translateY(-2px);
}

.btn--block {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin-inline: auto;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  padding-block: 4rem 5rem;
  overflow: hidden;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero__grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.hero__eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-light);
  margin-bottom: 1rem;
}

.hero__title {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  max-width: 14ch;
}

.hero__title .gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(0, 198, 255, 0.45));
}

.hero__typing::after {
  content: "|";
  animation: caret-blink 1s step-end infinite;
  color: var(--accent-light);
  margin-left: 2px;
}

.hero__lead {
  font-size: 1.15rem;
  max-width: 36ch;
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ——— Page hero (inner pages) ——— */
.page-hero {
  padding-block: 4rem 3rem;
  background: linear-gradient(180deg, rgba(13, 27, 62, 0.9) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--accent-light);
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
}

.page-hero p {
  max-width: 55ch;
  margin-bottom: 0;
}

/* ——— Sections ——— */
.section {
  padding-block: 5rem;
  position: relative;
  z-index: 1;
}

.section__head {
  text-align: center;
  max-width: 640px;
  margin-inline: auto 3rem;
}

.section__head h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
}

.section__head p {
  margin-bottom: 0;
}

/* ——— Stats ——— */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1.5rem;
  margin-top: -3rem;
  position: relative;
  z-index: 3;
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glow);
}

.stat {
  text-align: center;
  padding: 0.5rem;
}

.stat__value {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat__label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ——— Cards / Glass ——— */
.glass {
  background: rgba(17, 24, 39, 0.55);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-glow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.glass:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow-hover);
  border-color: rgba(0, 198, 255, 0.35);
}

.glass__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  margin-bottom: 1rem;
  background: rgba(0, 114, 255, 0.15);
  border: 1px solid var(--border);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

/* ——— Split ——— */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.split__visual {
  min-height: 320px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(0, 114, 255, 0.2), rgba(0, 198, 255, 0.08));
  box-shadow: inset 0 0 80px rgba(0, 114, 255, 0.15);
}

.checklist {
  list-style: none;
  padding: 0;
}

.checklist li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-light);
  font-weight: 700;
}

/* ——— Logo strip ——— */
.logo-strip-wrap {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}

.logo-strip {
  display: flex;
  gap: 3rem;
  animation: logo-scroll 28s linear infinite;
  width: max-content;
}

.logo-strip__item {
  flex-shrink: 0;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.03);
}

/* ——— Testimonials ——— */
.stars {
  color: #fbbf24;
  letter-spacing: 2px;
  margin-bottom: 0.75rem;
}

.testimonial-card p:last-child {
  margin-bottom: 0;
}

.testimonial-card cite {
  display: block;
  margin-top: 1rem;
  font-style: normal;
  color: var(--text-primary);
  font-weight: 500;
}

.testimonial-card span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ——— CTA banner ——— */
.cta-banner {
  text-align: center;
  padding: 3.5rem 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(0, 114, 255, 0.18), rgba(13, 27, 62, 0.95));
  box-shadow: var(--shadow-glow);
}

.cta-banner h2 {
  margin-bottom: 0.75rem;
}

.cta-banner p {
  margin-bottom: 1.5rem;
}

/* ——— Footer ——— */
.site-footer {
  margin-top: 4rem;
  padding-block: 4rem 0;
  background: var(--secondary);
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}

.footer-col h3 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-light);
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  display: block;
  padding: 0.35rem 0;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.social-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.social-row a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: box-shadow var(--transition), color var(--transition), border-color var(--transition);
}

.social-row a:hover {
  color: var(--accent-light);
  border-color: rgba(0, 198, 255, 0.45);
  box-shadow: 0 0 20px rgba(0, 114, 255, 0.25);
}

.footer-bar {
  padding: 1.25rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.footer-bar a {
  color: var(--text-muted);
}

.footer-bar a:hover {
  color: var(--accent-light);
}

/* ——— Forms ——— */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 114, 255, 0.2);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
  border-color: #f87171;
}

.form-error {
  font-size: 0.8rem;
  color: #fca5a5;
  margin-top: 0.35rem;
  display: none;
}

.form-group.has-error .form-error {
  display: block;
}

.form-success {
  display: none;
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
  margin-bottom: 1rem;
}

.form-success.is-visible {
  display: block;
}

/* ——— Service blocks ——— */
.service-block {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: start;
  padding: 2.5rem;
  margin-bottom: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(17, 24, 39, 0.4);
}

.service-block:nth-child(even) {
  direction: rtl;
}

.service-block:nth-child(even) > * {
  direction: ltr;
}

.service-block__icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  background: rgba(0, 114, 255, 0.15);
  border: 1px solid var(--border);
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.feature-list li {
  padding: 0.35rem 0;
  padding-left: 1.25rem;
  position: relative;
  color: var(--text-muted);
}

.feature-list li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--accent-light);
}

/* ——— Portfolio ——— */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.filter-tab {
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.filter-tab:hover,
.filter-tab.is-active {
  color: var(--text-primary);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(0, 114, 255, 0.2);
  background: rgba(0, 114, 255, 0.12);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.portfolio-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(17, 24, 39, 0.5);
  transition: transform var(--transition), box-shadow var(--transition);
}

.portfolio-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-glow-hover);
}

.portfolio-card__thumb {
  height: 180px;
  background: linear-gradient(135deg, rgba(0, 114, 255, 0.35), rgba(0, 198, 255, 0.15));
}

.portfolio-card:nth-child(3n + 1) .portfolio-card__thumb {
  height: 210px;
}

.portfolio-card:nth-child(3n + 2) .portfolio-card__thumb {
  height: 240px;
}

.portfolio-card:nth-child(5) .portfolio-card__thumb {
  height: 200px;
}

.portfolio-card__body {
  padding: 1.5rem;
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background: rgba(0, 114, 255, 0.2);
  color: var(--accent-light);
  margin-bottom: 0.75rem;
}

/* ——— Blog ——— */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
}

.blog-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
  background: rgba(17, 24, 39, 0.45);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.blog-card:hover {
  box-shadow: var(--shadow-glow-hover);
  border-color: rgba(0, 198, 255, 0.3);
}

.blog-card__thumb {
  min-height: 140px;
  border-radius: var(--radius-sm);
  background: linear-gradient(160deg, rgba(0, 114, 255, 0.4), rgba(13, 27, 62, 0.9));
}

.blog-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.blog-meta .tag {
  color: var(--accent-light);
  margin-left: 0.5rem;
}

.sidebar-widget {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(17, 24, 39, 0.5);
  margin-bottom: 1.5rem;
}

.sidebar-widget h3 {
  font-family: var(--font-body);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  color: var(--accent-light);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-cloud a {
  font-size: 0.85rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.tag-cloud a:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

.sidebar-list {
  list-style: none;
}

.sidebar-list a {
  display: block;
  padding: 0.4rem 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ——— Contact ——— */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info__block {
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

.contact-info__block strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.35rem;
}

.map-placeholder {
  margin-top: 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  min-height: 280px;
  background: rgba(0, 114, 255, 0.08);
}

.map-placeholder iframe {
  width: 100%;
  height: 280px;
  border: 0;
  filter: grayscale(0.4) contrast(1.05);
}

.notice {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

/* ——— About timeline etc ——— */
.timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid var(--border);
}

.timeline__item {
  position: relative;
  padding-bottom: 2rem;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: -2rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 12px rgba(0, 198, 255, 0.6);
}

.value-card {
  text-align: center;
  padding: 2rem 1.25rem;
}

.team-card {
  text-align: center;
}

.team-card__avatar {
  width: 120px;
  height: 120px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: linear-gradient(135deg, rgba(0, 114, 255, 0.5), rgba(0, 198, 255, 0.2));
}

.award-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.award-strip span {
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ——— Utilities ——— */
.text-center {
  text-align: center;
}

.mt-0 {
  margin-top: 0;
}

.mb-0 {
  margin-bottom: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Scroll animation hooks */
[data-animate] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-tilt] {
  transform-style: preserve-3d;
  will-change: transform;
}
