/*
Theme Name: AEDatum Child
Theme URI: https://aedatum.com
Description: AEDatum Ltd child theme of Astra. Custom brand styles, dark mode, and bespoke page templates.
Author: AEDatum Ltd
Author URI: https://aedatum.com
Template: astra
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aedatum-child
*/

/* ==========================================================================
   Custom properties — Light (default)
   ========================================================================== */
:root {
  --bg: #FAFAFA;
  --bg-card: #ffffff;
  --text: #0A0A0A;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  --nav-bg: #ffffff;
  --nav-shadow: 0 1px 3px rgba(0,0,0,0.08);
  --hero-bg: #0A0F1E;
  --footer-bg: #0A0F1E;
  --blue: #1B4FD8;
  --blue-hover: #1338B0;
  --font-serif: 'DM Serif Display', Georgia, serif;
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --max-width: 1200px;
  --section-pad: 100px 24px;
}

/* ==========================================================================
   Custom properties — Dark mode
   ========================================================================== */
[data-theme="dark"] {
  --bg: #1E2433;
  --bg-card: #252D3D;
  --text: #F1F5F9;
  --text-muted: #94A3B8;
  --border: rgba(255,255,255,0.07);
  --nav-bg: #1E2433;
  --nav-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

/* ==========================================================================
   Reset and base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.2s ease, color 0.2s ease;
}

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

a { color: var(--blue); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--blue-hover); }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--text);
}

h1 { font-size: clamp(2.5rem, 5.5vw, 4.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
h4 { font-size: 1.25rem; }

p { margin: 0 0 1.2em; }

ul, ol { padding-left: 1.4em; }

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

section { padding: var(--section-pad); }

/* Astra overrides — defer to our system */
.ast-container, .site-content { background: transparent; }

/* ==========================================================================
   Header / Nav
   ========================================================================== */
#aedatum-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

#aedatum-header.scrolled {
  background: var(--nav-bg);
  box-shadow: var(--nav-shadow);
}

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

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--text);
  display: inline-flex;
  align-items: baseline;
}
.nav-logo:hover { color: var(--text); }
.logo-ae { color: var(--blue); font-weight: 400; }
.logo-datum { color: var(--text); font-weight: 400; }

/* When header is over hero (not scrolled), force light text */
#aedatum-header:not(.scrolled) .nav-logo,
#aedatum-header:not(.scrolled) .logo-ae,
#aedatum-header:not(.scrolled) .logo-datum,
#aedatum-header:not(.scrolled) .nav-links a {
  color: #ffffff;
}
#aedatum-header:not(.scrolled) .logo-ae {
  color: #6E91FF;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
}
.nav-links a:hover { color: var(--blue); }

.nav-links .nav-contact a {
  background: var(--blue);
  color: #ffffff !important;
  padding: 10px 20px;
  border-radius: 4px;
  transition: background-color 0.15s ease;
}
.nav-links .nav-contact a:hover { background: var(--blue-hover); }

#theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
#theme-toggle:hover { border-color: var(--blue); transform: scale(1.05); }

#aedatum-header:not(.scrolled) #theme-toggle {
  border-color: rgba(255,255,255,0.3);
  color: #ffffff;
}

#nav-hamburger {
  display: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
}
#nav-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 1px;
}
#aedatum-header:not(.scrolled) #nav-hamburger span { background: #ffffff; }

/* Mobile overlay */
#nav-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
}
#nav-overlay.open { opacity: 1; pointer-events: auto; }
#nav-overlay a {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--text);
}
#nav-overlay-close {
  position: absolute;
  top: 24px; right: 24px;
  background: transparent;
  border: 0;
  font-size: 2rem;
  color: var(--text);
  cursor: pointer;
  line-height: 1;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-primary, .btn-outline, .btn-outline-dark, .btn-white {
  display: inline-block;
  padding: 14px 28px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 4px;
  text-align: center;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn-primary { background: var(--blue); color: #ffffff; }
.btn-primary:hover { background: var(--blue-hover); color: #ffffff; transform: translateY(-1px); }

.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }

.btn-outline-dark { background: transparent; color: #ffffff; border-color: rgba(255,255,255,0.4); }
.btn-outline-dark:hover { border-color: #ffffff; background: rgba(255,255,255,0.06); color: #ffffff; }

.btn-white { background: #ffffff; color: var(--hero-bg); }
.btn-white:hover { background: #f1f5f9; color: var(--hero-bg); transform: translateY(-1px); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  background: var(--hero-bg);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 80%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero h1 {
  color: #ffffff;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: rgba(255,255,255,0.78);
  max-width: 640px;
  margin: 0 auto 40px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-size: 1.4rem;
  animation: bounce 2s infinite;
  z-index: 2;
}

@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 10px); }
}

/* ==========================================================================
   Eyebrow label
   ========================================================================== */
.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 18px;
  font-weight: 500;
}

.hero .eyebrow { color: #6E91FF; }

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 64px;
}
.section-head p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* ==========================================================================
   Service cards (number-accent, borderless)
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.service-card {
  padding: 32px 8px;
  background: transparent;
  border: 0;
  transition: transform 0.25s ease;
}

.service-card:hover { transform: translateY(-4px); }

.service-num {
  font-family: var(--font-serif);
  font-size: 64px;
  line-height: 1;
  color: var(--border);
  margin-bottom: 20px;
  transition: color 0.2s ease;
}

.service-card:hover .service-num { color: var(--blue); }

.service-card h3 { margin-bottom: 12px; }
.service-card p { color: var(--text-muted); margin-bottom: 16px; }
.service-card .service-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--blue);
}
.service-card .service-link::after {
  content: " \2192";
  transition: margin-left 0.2s ease;
  display: inline-block;
}
.service-card:hover .service-link::after { margin-left: 4px; }

/* ==========================================================================
   Why AEDatum
   ========================================================================== */
.why-section { background: var(--bg-card); }

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  max-width: var(--max-width);
  margin: 0 auto;
  align-items: start;
}

.why-grid > div:first-child h2 { margin-bottom: 16px; }
.why-grid > div:first-child p { color: var(--text-muted); }

.why-points {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.why-point h4 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
.why-point p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

/* ==========================================================================
   Portfolio grid + cards
   ========================================================================== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.portfolio-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}
.portfolio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

.portfolio-card .thumb {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #1B4FD8 0%, #0A0F1E 100%);
  overflow: hidden;
}
.portfolio-card .thumb img {
  width: 100%; height: 100%; object-fit: cover;
}

.portfolio-card .body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.portfolio-card .pc-type {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 500;
  margin-bottom: 8px;
}
.portfolio-card h3 {
  font-size: 1.3rem;
  margin: 0 0 8px;
}
.portfolio-card .excerpt { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

/* ==========================================================================
   Blog grid + cards
   ========================================================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 28px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.06);
}
.blog-card .meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.blog-card h3 {
  font-size: 1.3rem;
  margin: 0 0 10px;
}
.blog-card h3 a { color: var(--text); }
.blog-card h3 a:hover { color: var(--blue); }
.blog-card .excerpt { color: var(--text-muted); font-size: 0.95rem; margin: 0 0 16px; }
.blog-card .read-more {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--blue);
}

/* ==========================================================================
   CTA banner
   ========================================================================== */
.cta-banner {
  background: var(--hero-bg);
  color: #ffffff;
  text-align: center;
  padding: 80px 24px;
}
.cta-banner h2 { color: #ffffff; max-width: 720px; margin: 0 auto 28px; }
.cta-banner p { color: rgba(255,255,255,0.78); max-width: 560px; margin: 0 auto 32px; }

/* ==========================================================================
   Footer
   ========================================================================== */
#aedatum-footer {
  background: var(--footer-bg);
  color: rgba(255,255,255,0.7);
  padding: 80px 24px 32px;
}

.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
}

#aedatum-footer h5 {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0 0 18px;
  font-weight: 600;
}

#aedatum-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
#aedatum-footer li { margin-bottom: 10px; }
#aedatum-footer a { color: rgba(255,255,255,0.7); font-size: 0.95rem; }
#aedatum-footer a:hover { color: #ffffff; }

.footer-brand .nav-logo {
  font-size: 1.6rem;
  color: #ffffff;
  margin-bottom: 12px;
}
.footer-brand .logo-ae { color: #6E91FF; }
.footer-brand .logo-datum { color: #ffffff; }

.footer-tag {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 16px;
}
.footer-desc {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.7);
  max-width: 320px;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 56px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom ul { display: flex; gap: 24px; }

/* ==========================================================================
   Page hero (inner pages)
   ========================================================================== */
.page-hero {
  background: var(--bg-card);
  text-align: center;
  padding: 160px 24px 80px;
  border-bottom: 1px solid var(--border);
}
.page-hero h1 { margin-bottom: 16px; }
.page-hero p {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 640px;
  margin: 0 auto;
}

/* ==========================================================================
   Services page
   ========================================================================== */
.service-section {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: center;
  padding: 80px 0;
}

.service-section:nth-child(even) {
  direction: rtl;
}
.service-section:nth-child(even) > * { direction: ltr; }

.service-section .eyebrow { color: var(--blue); }
.service-section h2 { margin-bottom: 20px; }
.service-section p { color: var(--text-muted); margin-bottom: 20px; }
.service-section ul { color: var(--text-muted); }
.service-section ul li { margin-bottom: 8px; }

.service-icon-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: clamp(6rem, 12vw, 10rem);
  color: var(--blue);
  line-height: 1;
}

.process-section {
  background: var(--bg-card);
  padding: 100px 24px;
}
.process-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.process-step .step-num {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  color: var(--blue);
  margin-bottom: 12px;
  line-height: 1;
}
.process-step h4 { margin-bottom: 8px; }
.process-step p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

/* ==========================================================================
   About page
   ========================================================================== */
.about-section {
  max-width: 820px;
  margin: 0 auto;
}
.about-section h2 { margin-bottom: 20px; }
.about-section p { color: var(--text-muted); font-size: 1.05rem; }

.facts-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}
.fact-item .fact-num {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  color: var(--blue);
  line-height: 1;
  margin-bottom: 8px;
}
.fact-item .fact-label { color: var(--text-muted); font-size: 0.95rem; }

.values-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.value-card {
  background: var(--bg-card);
  border-top: 3px solid var(--blue);
  border-radius: 4px;
  padding: 32px 28px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.value-card h3 { font-size: 1.3rem; margin-bottom: 12px; }
.value-card p { color: var(--text-muted); margin: 0; }

/* ==========================================================================
   Contact page
   ========================================================================== */
.contact-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: start;
}

.contact-info h3 { font-size: 1.4rem; margin-bottom: 8px; }
.contact-info p { color: var(--text-muted); margin-bottom: 24px; }
.contact-detail {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.contact-detail:last-child { border-bottom: 0; }
.contact-detail .label {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.contact-detail .value { font-size: 1.05rem; color: var(--text); }
.contact-detail .value a { color: var(--text); }
.contact-detail .value a:hover { color: var(--blue); }

/* WPForms overrides */
.wpforms-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px;
}
.wpforms-container input[type="text"],
.wpforms-container input[type="email"],
.wpforms-container input[type="url"],
.wpforms-container input[type="tel"],
.wpforms-container select,
.wpforms-container textarea {
  background: var(--bg) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: 4px !important;
  font-family: var(--font-sans) !important;
  padding: 12px 14px !important;
}
.wpforms-container input:focus,
.wpforms-container textarea:focus,
.wpforms-container select:focus {
  border-color: var(--blue) !important;
  outline: none !important;
}
.wpforms-container label { color: var(--text) !important; font-weight: 500 !important; }
.wpforms-container button[type="submit"],
.wpforms-submit {
  background: var(--blue) !important;
  border: 0 !important;
  color: #ffffff !important;
  padding: 14px 28px !important;
  border-radius: 4px !important;
  font-weight: 500 !important;
  cursor: pointer;
}
.wpforms-container button[type="submit"]:hover { background: var(--blue-hover) !important; }

/* ==========================================================================
   Portfolio archive — filters
   ========================================================================== */
.portfolio-filters {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0 auto 48px;
}
.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 22px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.filter-btn:hover { border-color: var(--blue); color: var(--blue); }
.filter-btn.active { background: var(--blue); border-color: var(--blue); color: #ffffff; }

.portfolio-card.hidden { display: none; }

/* ==========================================================================
   Portfolio single
   ========================================================================== */
.portfolio-single-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 64px;
  align-items: start;
}

.portfolio-single-content .back-link {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.portfolio-single-content .back-link:hover { color: var(--blue); }

.portfolio-single-content .featured-image {
  margin: 32px 0;
  border-radius: 8px;
  overflow: hidden;
}

.portfolio-single-content .post-content {
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.7;
}

.results-box {
  background: var(--bg-card);
  border-left: 3px solid var(--blue);
  border-radius: 4px;
  padding: 24px 28px;
  margin-top: 32px;
}
.results-box h4 {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
  font-weight: 600;
}
.results-box p { color: var(--text); margin: 0; white-space: pre-line; }

.portfolio-meta-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px;
  position: sticky;
  top: 100px;
}
.portfolio-meta-box .meta-row {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.portfolio-meta-box .meta-row:last-of-type { border-bottom: 0; }
.portfolio-meta-box .meta-label {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.portfolio-meta-box .meta-value { color: var(--text); font-size: 1rem; }
.portfolio-meta-box .meta-value a { color: var(--blue); word-break: break-all; }

.tech-tag {
  display: inline-block;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  margin: 4px 6px 4px 0;
}

.portfolio-meta-box .btn-primary {
  width: 100%;
  margin-top: 8px;
}

/* ==========================================================================
   Blog archive
   ========================================================================== */
.blog-archive-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

/* ==========================================================================
   Blog single — 720px reading width
   ========================================================================== */
.blog-single {
  max-width: 720px;
  margin: 0 auto;
}
.blog-single .blog-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.blog-single h1 { margin-bottom: 24px; }
.blog-single .featured-image {
  margin: 32px 0;
  border-radius: 8px;
  overflow: hidden;
}
.blog-single .post-content {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text);
}
.blog-single .post-content p { margin-bottom: 1.4em; }
.blog-single .post-content h2 { margin-top: 1.6em; margin-bottom: 0.6em; }
.blog-single .post-content h3 { margin-top: 1.4em; margin-bottom: 0.5em; }
.blog-single .post-content blockquote {
  border-left: 3px solid var(--blue);
  padding-left: 24px;
  margin: 1.6em 0;
  font-style: italic;
  color: var(--text-muted);
}
.blog-single .post-content code {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.92em;
}
.blog-single .post-content pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 6px;
  overflow-x: auto;
}

/* ==========================================================================
   Fade-in animation
   ========================================================================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive — 1024px
   ========================================================================== */
@media (max-width: 1024px) {
  :root { --section-pad: 80px 24px; }

  .services-grid,
  .portfolio-grid,
  .blog-grid { grid-template-columns: repeat(2, 1fr); }

  .why-grid { grid-template-columns: 1fr; gap: 40px; }
  .why-points { grid-template-columns: 1fr 1fr; }

  .service-section { grid-template-columns: 1fr; gap: 40px; padding: 60px 0; }
  .service-section:nth-child(even) { direction: ltr; }

  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .facts-grid { grid-template-columns: repeat(2, 1fr); }
  .values-grid { grid-template-columns: 1fr; }

  .portfolio-single-grid { grid-template-columns: 1fr; gap: 40px; }
  .portfolio-meta-box { position: static; }

  .contact-grid { grid-template-columns: 1fr; gap: 40px; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }

  .blog-archive-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Responsive — 768px
   ========================================================================== */
@media (max-width: 768px) {
  :root { --section-pad: 64px 20px; }

  body { font-size: 16px; }

  .nav-links { display: none; }
  #nav-hamburger { display: inline-flex; }

  .hero { min-height: 90vh; padding: 100px 20px 60px; }

  .services-grid,
  .portfolio-grid,
  .blog-grid { grid-template-columns: 1fr; gap: 24px; }

  .why-points { grid-template-columns: 1fr; }

  .process-grid { grid-template-columns: 1fr; }
  .facts-grid { grid-template-columns: 1fr 1fr; gap: 24px; }

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

  .page-hero { padding: 130px 20px 60px; }

  .hero-buttons { flex-direction: column; align-items: stretch; }
  .hero-buttons .btn-primary,
  .hero-buttons .btn-outline-dark { width: 100%; }

  .service-num { font-size: 48px; }
}
