﻿/*
  RDIGI WORKS - Global styles
  Shared design system for all pages
*/

:root {
  --bg: #060b18;
  --bg-soft: #0b142a;
  --surface: #0f1d3d;
  --surface-2: #13264e;
  --text: #e8f0ff;
  --muted: #9db0d6;
  --primary: #2f7dff;
  --primary-2: #0ea5ff;
  --accent: #44d0ff;
  --success: #1ecf9a;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(47, 125, 255, 0.28), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(14, 165, 255, 0.2), transparent 60%),
    linear-gradient(180deg, #070d1d 0%, #050913 100%);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.section {
  padding: 4.5rem 0;
}

.section-title {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.2;
  margin: 0 0 0.8rem;
}

.section-subtitle {
  color: var(--muted);
  margin: 0 0 2rem;
  max-width: 70ch;
}

.grid {
  display: grid;
  gap: 1.2rem;
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.four-col {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Header and Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 99;
  backdrop-filter: blur(16px);
  background: rgba(5, 10, 22, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.navbar {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 1.05rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links a {
  color: #dbe7ff;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  font-size: 0.94rem;
  transition: 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  cursor: pointer;
}

/* Buttons */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0.8rem 1.2rem;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 10px 24px rgba(47, 125, 255, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn-secondary {
  color: #cfe0ff;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.17);
}

.btn-secondary:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.1);
}

/* Hero */
.hero {
  padding: 6rem 0 4.5rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 2rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #bcd0ff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
}

.hero h1 {
  margin: 1rem 0;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  line-height: 1.15;
}

.hero p {
  color: var(--muted);
  margin-bottom: 1.5rem;
  max-width: 58ch;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.metric {
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.metric strong {
  display: block;
  font-size: 1.25rem;
  line-height: 1;
}

.metric span {
  font-size: 0.82rem;
  color: var(--muted);
}

.tech-frame {
  background: linear-gradient(160deg, rgba(66, 112, 255, 0.25), rgba(8, 23, 56, 0.8));
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.screen {
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.16);
  min-height: 360px;
  background: radial-gradient(circle at 20% 20%, rgba(68, 208, 255, 0.25), transparent 45%),
    linear-gradient(180deg, rgba(16, 35, 72, 0.92), rgba(9, 20, 45, 0.96));
  padding: 1.15rem;
}

.pill-row {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.pill {
  font-size: 0.74rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  color: #d8e7ff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.mock-chart {
  margin-top: 1rem;
  height: 180px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.01));
  position: relative;
  overflow: hidden;
}

.mock-chart::before {
  content: "";
  position: absolute;
  inset: auto -10% 25% -10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(68, 208, 255, 0.8), transparent);
}

.mock-chart::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 22%;
  height: 90px;
  border-radius: 999px;
  border: 2px solid rgba(68, 208, 255, 0.55);
  border-top-color: transparent;
  transform: skewX(-18deg);
}

/* Cards */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(68, 208, 255, 0.45);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.45rem;
  font-size: 1.1rem;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 0.8rem;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.list {
  margin: 0.7rem 0 0;
  padding: 0;
  list-style: none;
}

.list li {
  color: #d5e5ff;
  margin-bottom: 0.4rem;
  position: relative;
  padding-left: 1.05rem;
}

.list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58rem;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

/* Timelines and process */
.process {
  counter-reset: flow;
}

.process-step {
  position: relative;
  padding: 1.05rem 1.05rem 1.05rem 3rem;
  border-left: 1px dashed rgba(255, 255, 255, 0.2);
}

.process-step::before {
  counter-increment: flow;
  content: counter(flow);
  position: absolute;
  left: -14px;
  top: 1.05rem;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
}

.process-step h3 {
  margin: 0 0 0.35rem;
  font-size: 1.03rem;
}

.process-step p {
  margin: 0;
  color: var(--muted);
}

/* Portfolio and blog visuals */
.project-thumb,
.blog-thumb {
  width: 100%;
  height: 190px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background:
    linear-gradient(140deg, rgba(47, 125, 255, 0.25), rgba(68, 208, 255, 0.18)),
    linear-gradient(220deg, rgba(12, 26, 56, 0.95), rgba(18, 33, 66, 0.9));
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #ddecff;
  font-weight: 600;
  text-align: center;
  padding: 1rem;
}

.project-thumb::after,
.blog-thumb::after {
  content: "";
  position: absolute;
  inset: auto -20% -30% auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(68, 208, 255, 0.35), transparent 62%);
}

.tag-row {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag {
  font-size: 0.73rem;
  color: #d1e3ff;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
}

/* Forms */
form {
  width: 100%;
}

.field {
  margin-bottom: 0.95rem;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: #dce9ff;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 0.8rem 0.85rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  outline: none;
}

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

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(68, 208, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(68, 208, 255, 0.14);
}

.error-text {
  color: #ffb4b4;
  font-size: 0.8rem;
  margin-top: 0.28rem;
  display: none;
}

.error .error-text {
  display: block;
}

.error input,
.error textarea {
  border-color: rgba(255, 113, 113, 0.85);
}

.map-placeholder {
  height: 280px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    linear-gradient(120deg, rgba(47, 125, 255, 0.18), rgba(8, 20, 45, 0.88)),
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.05),
      rgba(255, 255, 255, 0.05) 8px,
      transparent 8px,
      transparent 16px
    );
  display: grid;
  place-items: center;
  color: #c7dbff;
  text-align: center;
  padding: 1rem;
}

/* CTA band */
.cta-band {
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    radial-gradient(circle at 15% 0%, rgba(68, 208, 255, 0.25), transparent 35%),
    linear-gradient(125deg, rgba(19, 38, 77, 0.95), rgba(9, 17, 36, 0.95));
  padding: 2.1rem;
}

/* Footer */
.site-footer {
  margin-top: 2.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(2, 6, 14, 0.72);
}

.footer-top {
  padding: 3.4rem 0 2.2rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-title {
  margin: 0 0 0.8rem;
  font-size: 1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.45rem;
}

.footer-links a {
  color: #c6dbff;
  font-size: 0.92rem;
}

.socials {
  display: flex;
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.social-link {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
  color: #e4efff;
  background: rgba(255, 255, 255, 0.05);
}

.newsletter {
  display: flex;
  gap: 0.6rem;
}

.newsletter input {
  flex: 1;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Utility */
.m-0 {
  margin: 0;
}

.mt-1 {
  margin-top: 1rem;
}

.mt-2 {
  margin-top: 2rem;
}

.center {
  text-align: center;
}

/* Responsive breakpoints */
@media (max-width: 1024px) {
  .three-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .four-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-links {
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.6rem 1rem 1rem;
    background: rgba(5, 10, 22, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transform: scaleY(0);
    transform-origin: top;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
  }

  .nav-links a {
    width: 100%;
    border-radius: 10px;
    padding: 0.75rem 0.8rem;
  }

  .nav-links.open {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
  }

  .two-col,
  .three-col,
  .four-col {
    grid-template-columns: 1fr;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 3.4rem 0;
  }

  .hero {
    padding: 5.4rem 0 3rem;
  }

  .cta-band {
    padding: 1.4rem;
  }

  .newsletter {
    flex-direction: column;
  }
}


/* Asset-driven brand and media overrides */
.brand-logo {
  height: 36px;
  width: auto;
  border-radius: 0;
  display: block;
}

.icon-badge img {
  width: 24px;
  height: 24px;
  display: block;
}

.project-thumb,
.blog-thumb {
  display: block;
  padding: 0;
}

.project-thumb img,
.blog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-label {
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.7rem;
  background: rgba(6, 11, 24, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #e7f3ff;
  font-size: 0.8rem;
  padding: 0.34rem 0.5rem;
  text-align: center;
  backdrop-filter: blur(4px);
}

.social-link img {
  width: 18px;
  height: 18px;
  display: block;
}

/* Embedded map styling */
.map-placeholder {
  padding: 0;
  overflow: hidden;
  display: block;
}

.map-placeholder iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}



/* Blog detail pages */
.breadcrumbs {
  margin-top: 0.5rem;
  font-size: 0.86rem;
  color: #b6caef;
}

.breadcrumbs a {
  color: #d7e8ff;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.post-meta .tag {
  font-size: 0.78rem;
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.5fr) minmax(0, 1fr);
  gap: 1.2rem;
}

.post-content {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
}

.post-content h2,
.post-content h3 {
  margin-top: 1.4rem;
  margin-bottom: 0.55rem;
  line-height: 1.25;
}

.post-content p {
  color: #d7e5ff;
  margin: 0.65rem 0;
}

.post-content ul,
.post-content ol {
  margin: 0.6rem 0 1rem;
  padding-left: 1.1rem;
}

.post-content li {
  margin-bottom: 0.45rem;
  color: #d5e5ff;
}

.post-content strong {
  color: #f1f7ff;
}

.post-cover {
  margin: 0 0 1rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.post-sidebar {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.sticky-card {
  position: sticky;
  top: 95px;
}

.toc-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-links li {
  margin-bottom: 0.4rem;
}

.toc-links a {
  color: #d6e6ff;
  font-size: 0.9rem;
}

.key-points {
  padding: 0;
  margin: 0;
  list-style: none;
}

.key-points li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.5rem;
  color: #d9e7ff;
}

.key-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58rem;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

.faq-item {
  margin-top: 0.9rem;
}

.faq-item h3 {
  margin-top: 0;
}

.author-box {
  display: flex;
  gap: 0.9rem;
  align-items: center;
}

.author-mark {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  color: #dbebff;
  font-weight: 700;
}

.related-links {
  display: grid;
  gap: 0.6rem;
}

.related-links a {
  color: #d8e8ff;
}

@media (max-width: 980px) {
  .post-layout {
    grid-template-columns: 1fr;
  }

  .sticky-card {
    position: static;
  }
}

/* Portfolio page enhancements */
.portfolio-hero {
  padding-bottom: 3.2rem;
}

.portfolio-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  gap: 1.2rem;
  align-items: stretch;
}

.portfolio-metrics {
  margin-top: 1.35rem;
}

.portfolio-summary {
  display: grid;
  align-content: start;
  gap: 0.8rem;
}

.portfolio-summary h2 {
  margin: 0;
  font-size: 1.3rem;
}

.portfolio-summary p {
  margin: 0;
}

.client-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.25rem;
}

.client-pill {
  font-size: 0.75rem;
  color: #d8e8ff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.3rem 0.55rem;
}

.section-intro {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.section-intro p {
  color: var(--muted);
  margin: 0.4rem 0 0;
  max-width: 68ch;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}

.featured-case {
  overflow: hidden;
  padding: 0;
}

.featured-case .project-thumb {
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  height: 220px;
}

.case-content {
  padding: 1.2rem;
}

.case-content h3 {
  margin: 0;
}

.case-content p {
  margin-top: 0.55rem;
}

.case-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.95rem 0 1.1rem;
}

.case-kpi {
  font-size: 0.76rem;
  border-radius: 999px;
  padding: 0.28rem 0.54rem;
  color: #d6ebff;
  border: 1px solid rgba(68, 208, 255, 0.4);
  background: rgba(68, 208, 255, 0.12);
}

.portfolio-case-card {
  display: grid;
  align-content: start;
}

.portfolio-case-card p {
  margin-top: 0.25rem;
}

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.65rem 0 0.35rem;
}

.case-meta span {
  font-size: 0.74rem;
  color: #d7e9ff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.27rem 0.55rem;
}

.capability-grid .card {
  min-height: 100%;
}

.portfolio-cta {
  margin-top: 0;
}

@media (max-width: 1024px) {
  .portfolio-hero-grid,
  .featured-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .section-intro {
    flex-direction: column;
    align-items: flex-start;
  }

  .featured-case .project-thumb {
    height: 200px;
  }
}
