/* ═══════════════════════════════════════════
   base.css — Design tokens, reset, typography
   Dochia Software · Design System v1.0
   ═══════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  /* Colors */
  --white:     #ffffff;
  --s50:       #f1f3f8;
  --s100:      #e4e8f0;
  --s200:      #c8cfe0;
  --s300:      #a0adc4;
  --s400:      #6b7a99;
  --s500:      #4a5568;
  --ink:       #0f1117;
  --ink-s:     #2d3347;
  --accent:    #0066ff;
  --accent-l:  #e8f0ff;
  --accent-m:  #4d94ff;
  --dark:      #0b0f1a;
  --dark-s:    #131b2e;

  /* Shadows */
  --sh-sm: 0 1px 3px rgba(15,17,23,.06), 0 1px 2px rgba(15,17,23,.04);
  --sh-md: 0 4px 16px rgba(15,17,23,.08), 0 2px 6px rgba(15,17,23,.04);
  --sh-lg: 0 20px 60px rgba(15,17,23,.10), 0 8px 24px rgba(15,17,23,.06);
  --sh-xl: 0 40px 100px rgba(15,17,23,.14), 0 16px 40px rgba(15,17,23,.08);

  /* Radius */
  --r:    16px;
  --r-lg: 24px;
  --r-xl: 32px;

  /* Nav height (used for padding-top on pages) */
  --nav-h: 68px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--white);
  color: var(--ink);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
a { color: inherit; }

/* ── GLOBAL BACKGROUND MESH ── */
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 15% -5%,  rgba(0,102,255,.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 90%  10%,  rgba(0,170,255,.05) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 50%  110%, rgba(190,205,235,.22) 0%, transparent 55%);
}

/* ── TYPOGRAPHY ── */
h1 {
  font-size: clamp(2.4rem, 7vw, 5.75rem);
  font-weight: 900;
  line-height: 1.03;
  letter-spacing: -.04em;
  color: var(--ink);
}
h2 {
  font-size: clamp(1.85rem, 4vw, 3.25rem);
  font-weight: 900;
  letter-spacing: -.035em;
  line-height: 1.1;
  color: var(--ink);
}
h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ink);
}
p { line-height: 1.7; }

.h1-italic {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -.01em;
}

/* ── SECTION LAYOUT ── */
section { padding: clamp(4rem, 8vw, 7rem) 5%; position: relative; z-index: 1; }
.sec-wrap { max-width: 1280px; margin: 0 auto; }

/* Section header helpers */
.sec-label {
  display: inline-block;
  font-size: .7rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .75rem;
}
.sec-sub {
  color: var(--s400);
  font-size: clamp(.9rem, 2vw, 1.05rem);
  margin-top: .875rem;
  max-width: 560px;
}

/* Centered header block */
.sec-header-center {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem;
}
.sec-header-center .sec-sub { max-width: none; margin-left: auto; margin-right: auto; }

/* ── SHARED BG VARIANTS ── */
.bg-white   { background: var(--white); }
.bg-silver  { background: var(--s50); }
.bg-dark    {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-s) 60%, #0d1f3c 100%);
  color: #fff;
}

/* ── ANIMATIONS ── */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
@keyframes orbFloat {
  0%,100% { transform: translateX(-50%) translateY(0)    scale(1);    }
  50%      { transform: translateX(-50%) translateY(-20px) scale(1.03); }
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1);   }
  50%      { opacity: .5; transform: scale(1.6); }
}
@keyframes typing {
  0%,100% { transform: translateY(0);  }
  50%      { transform: translateY(-4px); }
}

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .65s ease, transform .65s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  position: relative; z-index: 1;
  padding: calc(var(--nav-h) + 5rem) 5% 5rem;
  background: var(--white);
  overflow: hidden;
}
.page-hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(0,102,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,102,255,.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, black 20%, transparent 70%);
}
.page-hero-inner { max-width: 1280px; margin: 0 auto; position: relative; z-index: 2; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 4rem); }
.page-hero .sec-sub { max-width: 600px; font-size: 1.1rem; margin-top: 1rem; }
.page-breadcrumb {
  display: flex; align-items: center; gap: .5rem;
  font-size: .78rem; color: var(--s400); margin-bottom: 1.25rem;
}
.page-breadcrumb a { color: var(--accent); text-decoration: none; }
.page-breadcrumb a:hover { text-decoration: underline; }
.page-breadcrumb span { color: var(--s300); }

/* ── CARD BASE ── */
.card {
  background: var(--white); border: 1px solid var(--s100);
  border-radius: var(--r-lg); padding: 2rem 2.25rem 2.5rem;
  box-shadow: var(--sh-sm); transition: all .25s;
}
.card:hover { box-shadow: var(--sh-lg); border-color: rgba(0,102,255,.15); transform: translateY(-3px); }

/* ── TAGS ── */
.tag {
  font-size: .68rem; font-weight: 600;
  padding: .22rem .65rem; border-radius: 100px;
  background: var(--s50); color: var(--s500); border: 1px solid var(--s100);
}
.tag.blue { background: var(--accent-l); color: var(--accent); border-color: rgba(0,102,255,.15); }

/* ── ICON CONTAINERS ── */
.icon-wrap {
  width: 48px; height: 48px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
}
.iw-blue   { background: var(--accent-l);          color: var(--accent); }
.iw-teal   { background: rgba(0,180,160,.1);        color: #009b8d; }
.iw-orange { background: rgba(255,130,0,.1);        color: #d97706; }
.iw-purple { background: rgba(120,80,220,.1);       color: #7850dc; }
.iw-green  { background: rgba(0,160,100,.1);        color: #00a064; }
.iw-red    { background: rgba(220,50,80,.1);        color: #dc3250; }

/* ── RESPONSIVE BASE ── */
@media (max-width: 640px) {
  :root { --nav-h: 60px; }
}
