/* ============================================================
   Edgeholm — Nordic Dark Theme
   Fonts: Syne (headings) + DM Sans (body)
   ============================================================ */

:root {
  --bg:          #07111f;
  --bg-2:        #0d1e30;
  --bg-3:        #122540;
  --surface:     #162b42;
  --border:      rgba(0, 212, 170, 0.12);
  --accent:      #00d4aa;
  --accent-dim:  rgba(0, 212, 170, 0.15);
  --accent-2:    #0099ff;
  --text:        #e8f0f8;
  --text-muted:  #7a9ab8;
  --text-dim:    #4a6a84;
  --white:       #ffffff;
  --danger:      #ff4757;
  --success:     #2ed573;
  --warning:     #ffa502;

  --font-head:   'Syne', sans-serif;
  --font-body:   'DM Sans', sans-serif;

  --radius:      6px;
  --radius-lg:   12px;
  --shadow:      0 4px 24px rgba(0,0,0,.4);
  --shadow-lg:   0 12px 48px rgba(0,0,0,.5);
  --glow:        0 0 40px rgba(0, 212, 170, 0.15);

  --header-h:    72px;
  --max-w:       1200px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--white); }
img { max-width: 100%; display: block; }
ul { list-style: none; }
input, textarea, select { font-family: inherit; }

/* ── Typography ─────────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 { font-family: var(--font-head); line-height: 1.15; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); }
h3 { font-size: 1.4rem; }

/* ── Cookie Banner ──────────────────────────────────────────── */
.cookie-banner {
  position: fixed; bottom: 1.5rem; left: 1.5rem; right: 1.5rem;
  max-width: 560px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem 1.5rem;
  display: flex; align-items: center; gap: 1rem;
  box-shadow: var(--shadow-lg); z-index: 9999;
}
.cookie-banner p { font-size: .9rem; color: var(--text-muted); flex: 1; }
.btn-accept {
  background: var(--accent); color: var(--bg); border: none;
  padding: .5rem 1.2rem; border-radius: var(--radius); font-weight: 600;
  cursor: pointer; white-space: nowrap; font-family: var(--font-body);
}
.btn-accept:hover { background: var(--white); }

/* ── Header / Nav ───────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-h);
  background: rgba(7, 17, 31, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background .3s, box-shadow .3s;
}
.site-header.scrolled {
  background: rgba(7, 17, 31, 0.97);
  box-shadow: var(--shadow);
}
.nav-container {
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 2rem; height: 100%;
  display: flex; align-items: center; gap: 2rem;
}
.nav-logo {
  display: flex; align-items: center; gap: .6rem;
  color: var(--white); font-family: var(--font-head); font-weight: 800;
  font-size: 1.25rem; letter-spacing: -.02em; flex-shrink: 0;
}
.logo-mark {
  width: 34px; height: 34px;
  background: var(--accent); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.nav-links {
  display: flex; align-items: center; gap: .25rem; margin-left: auto;
}
.nav-link {
  color: var(--text-muted); font-size: .95rem; font-weight: 500;
  padding: .5rem .9rem; border-radius: var(--radius); transition: all .2s;
  position: relative;
}
.nav-link::after {
  content: ''; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 0; height: 2px; background: var(--accent); border-radius: 2px; transition: width .2s;
}
.nav-link:hover, .nav-link.active { color: var(--white); }
.nav-link.active::after, .nav-link:hover::after { width: 60%; }
.nav-actions { display: flex; align-items: center; gap: 1rem; margin-left: 1rem; }
.btn-nav-cta {
  background: var(--accent); color: var(--bg); font-weight: 600; font-size: .9rem;
  padding: .5rem 1.25rem; border-radius: var(--radius); transition: all .2s;
  white-space: nowrap;
}
.btn-nav-cta:hover { background: var(--white); color: var(--bg); transform: translateY(-1px); }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: .5rem;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--accent); color: var(--bg);
  font-family: var(--font-head); font-weight: 700; font-size: .95rem;
  padding: .85rem 2rem; border-radius: var(--radius);
  transition: all .2s; border: none; cursor: pointer;
}
.btn-primary:hover { background: var(--white); color: var(--bg); transform: translateY(-2px); box-shadow: var(--glow); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--accent); font-weight: 600; font-size: .95rem;
  padding: .85rem 2rem; border-radius: var(--radius);
  border: 1px solid var(--border); transition: all .2s;
}
.btn-ghost:hover { background: var(--accent-dim); color: var(--white); border-color: var(--accent); }
.btn-large { font-size: 1.05rem; padding: 1rem 2.5rem; }
.btn-arrow { transition: transform .2s; }
.btn-ghost:hover .btn-arrow { transform: translateX(4px); }

/* ── Main padding for fixed header ─────────────────────────── */
#main-content { padding-top: var(--header-h); }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 92vh;
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: center; gap: 4rem;
  max-width: var(--max-w); margin: 0 auto; padding: 6rem 2rem 4rem;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,212,170,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,170,.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 30% 50%, black 0%, transparent 70%);
}
.hero-glow {
  position: absolute; top: 20%; left: 40%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,153,255,.08) 0%, transparent 70%);
  transform: translate(-50%, -50%);
}
.hero-content { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--accent-dim); border: 1px solid var(--border);
  color: var(--accent); font-size: .85rem; font-weight: 600;
  padding: .4rem 1rem; border-radius: 2rem; margin-bottom: 2rem;
  letter-spacing: .05em;
}
.hero-title { font-size: clamp(2.5rem, 5vw, 4.2rem); font-weight: 800; line-height: 1.05; margin-bottom: 1.5rem; }
.hero-title-line { display: block; }
.hero-title-line.accent { color: var(--accent); }
.hero-subtitle { font-size: 1.15rem; color: var(--text-muted); max-width: 520px; margin-bottom: 2.5rem; line-height: 1.8; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-visual { position: relative; z-index: 1; }

/* Code Window */
.code-window {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg);
}
.code-titlebar {
  background: var(--bg-3); padding: .75rem 1rem;
  display: flex; gap: .5rem; align-items: center;
  border-bottom: 1px solid var(--border);
}
.code-titlebar span {
  width: 12px; height: 12px; border-radius: 50%; display: block;
}
.code-titlebar span:nth-child(1) { background: #ff5f57; }
.code-titlebar span:nth-child(2) { background: #febc2e; }
.code-titlebar span:nth-child(3) { background: #28c840; }
.code-block { padding: 1.5rem; font-size: .9rem; line-height: 1.8; overflow-x: auto; }
code { font-family: 'Fira Code', 'Consolas', monospace; }
.c-key   { color: #7ec8e3; }
.c-var   { color: #e8f0f8; }
.c-fn    { color: #00d4aa; }
.c-str   { color: #a8e6cf; }
.c-punc  { color: #7a9ab8; }
.c-comment { color: #4a6a84; font-style: italic; }

/* ── Stats Band ─────────────────────────────────────────────── */
.stats-band {
  background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 3rem 2rem;
}
.stats-container {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; text-align: center;
}
.stat-num {
  display: block; font-family: var(--font-head); font-size: 2.5rem; font-weight: 800;
  color: var(--accent); line-height: 1;
}
.stat-label { display: block; font-size: .9rem; color: var(--text-muted); margin-top: .4rem; }

/* ── Section Helpers ────────────────────────────────────────── */
.section-container { max-width: var(--max-w); margin: 0 auto; padding: 0 2rem; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-tag {
  display: inline-block; color: var(--accent); font-size: .85rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem;
}
.section-title { color: var(--white); margin-bottom: 1rem; }
.section-sub { color: var(--text-muted); max-width: 560px; margin: 0 auto; }

/* ── Services ───────────────────────────────────────────────── */
.services-section { padding: 7rem 0; }
.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
.service-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem;
  transition: all .3s; position: relative; overflow: hidden;
  opacity: 0; animation: fadeUp .6s forwards;
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0); transition: transform .3s;
}
.service-card:hover { border-color: rgba(0,212,170,.3); transform: translateY(-4px); box-shadow: var(--glow); }
.service-card:hover::before { transform: scaleX(1); }
.service-icon { font-size: 2rem; margin-bottom: 1rem; }
.service-title { color: var(--white); margin-bottom: .75rem; font-size: 1.15rem; }
.service-desc { color: var(--text-muted); font-size: .95rem; line-height: 1.7; margin-bottom: 1.25rem; }
.service-link { color: var(--accent); font-size: .9rem; font-weight: 600; }
.service-link:hover { color: var(--white); }

/* ── Why Section ────────────────────────────────────────────── */
.why-section { padding: 7rem 0; background: var(--bg-2); }
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6rem; align-items: center; }
.why-text p { color: var(--text-muted); margin: 1.5rem 0; }
.why-list { display: flex; flex-direction: column; gap: .6rem; }
.why-list li { color: var(--text); font-size: .95rem; }
.process-steps { display: flex; flex-direction: column; gap: 1.5rem; }
.process-step {
  display: flex; align-items: flex-start; gap: 1.5rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
}
.step-num {
  font-family: var(--font-head); font-size: 2rem; font-weight: 800;
  color: var(--accent); line-height: 1; min-width: 2.5rem;
}
.step-text { display: flex; flex-direction: column; gap: .2rem; }
.step-text strong { color: var(--white); font-weight: 600; }
.step-text span { color: var(--text-muted); font-size: .9rem; }

/* ── CTA Band ───────────────────────────────────────────────── */
.cta-band {
  padding: 6rem 2rem; text-align: center;
  background: linear-gradient(135deg, var(--bg-2) 0%, rgba(0,212,170,.05) 50%, var(--bg-2) 100%);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.cta-content h2 { color: var(--white); margin-bottom: 1rem; }
.cta-content p { color: var(--text-muted); margin-bottom: 2.5rem; font-size: 1.1rem; }

/* ── Blog Preview ───────────────────────────────────────────── */
.blog-preview { padding: 7rem 0; }
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.post-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.75rem; transition: .3s;
}
.post-card:hover { border-color: rgba(0,212,170,.3); transform: translateY(-3px); }
.post-meta { color: var(--text-dim); font-size: .85rem; margin-bottom: .75rem; }
.post-card h3 { margin-bottom: .75rem; font-size: 1.1rem; }
.post-card h3 a { color: var(--white); transition: color .2s; }
.post-card h3 a:hover { color: var(--accent); }
.post-card p { color: var(--text-muted); font-size: .92rem; margin-bottom: 1rem; }
.post-link { color: var(--accent); font-size: .9rem; font-weight: 600; }

/* ── Page Hero ──────────────────────────────────────────────── */
.page-hero {
  padding: 6rem 2rem 4rem; max-width: var(--max-w); margin: 0 auto;
  border-bottom: 1px solid var(--border);
}
.page-title { color: var(--white); margin-bottom: 1rem; }
.page-subtitle { color: var(--text-muted); max-width: 600px; font-size: 1.1rem; line-height: 1.8; }

/* ── Page Content ───────────────────────────────────────────── */
.page-content { padding: 4rem 0 7rem; }
.prose { max-width: 800px; }
.prose h1,.prose h2,.prose h3 { color: var(--white); margin: 2rem 0 1rem; }
.prose p { color: var(--text-muted); margin-bottom: 1.25rem; }
.prose a { color: var(--accent); }
.prose ul, .prose ol { color: var(--text-muted); padding-left: 1.5rem; margin-bottom: 1.25rem; }
.prose li { margin-bottom: .5rem; }

/* ── Contact ────────────────────────────────────────────────── */
.contact-section { padding: 5rem 0 7rem; }
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 5rem; }
.contact-form-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.25rem; }
.form-group label { font-size: .9rem; font-weight: 600; color: var(--text); }
.form-group input, .form-group textarea {
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  padding: .75rem 1rem; border-radius: var(--radius); font-size: .95rem; transition: border .2s;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-feedback { padding: .9rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: .95rem; }
.form-feedback.success { background: rgba(46,213,115,.1); border: 1px solid rgba(46,213,115,.3); color: var(--success); }
.form-feedback.error   { background: rgba(255,71,87,.1);  border: 1px solid rgba(255,71,87,.3);  color: var(--danger); }
.btn-submit { width: 100%; justify-content: center; }
.contact-info { display: flex; flex-direction: column; gap: 1.5rem; }
.info-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; }
.info-icon { font-size: 1.5rem; margin-bottom: .75rem; }
.info-card h3 { color: var(--white); font-size: 1rem; margin-bottom: .4rem; }
.info-card p { color: var(--text-muted); font-size: .92rem; }
.info-card a { color: var(--accent); }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--border); padding: 5rem 2rem 2rem; }
.footer-container {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 4rem; padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}
.footer-logo { display: flex; align-items: center; gap: .6rem; color: var(--white); font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; margin-bottom: 1rem; }
.footer-tagline { color: var(--text-muted); font-size: .9rem; margin-bottom: 1.5rem; }
.footer-socials { display: flex; gap: .75rem; }
.social-link {
  width: 36px; height: 36px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: .8rem; font-weight: 700; transition: .2s;
}
.social-link:hover { background: var(--accent-dim); color: var(--accent); border-color: var(--accent); }
.footer-nav h4, .footer-contact h4 { color: var(--white); font-size: .9rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 1.25rem; }
.footer-nav ul { display: flex; flex-direction: column; gap: .6rem; }
.footer-nav a { color: var(--text-muted); font-size: .92rem; transition: color .2s; }
.footer-nav a:hover { color: var(--accent); }
.footer-contact p { color: var(--text-muted); font-size: .92rem; margin-bottom: .5rem; }
.footer-contact a { color: var(--text-muted); }
.footer-contact a:hover { color: var(--accent); }
.footer-address { font-size: .87rem !important; }
.footer-bottom {
  max-width: var(--max-w); margin: 2rem auto 0;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
}
.footer-bottom p { color: var(--text-dim); font-size: .87rem; }
.footer-legal { display: flex; gap: 1.5rem; }
.footer-legal a { color: var(--text-dim); font-size: .87rem; }
.footer-legal a:hover { color: var(--accent); }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-content { animation: fadeUp .8s ease both; }
.hero-visual  { animation: fadeUp .8s .2s ease both; }
.stats-band   { animation: fadeUp .6s .1s ease both; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero         { grid-template-columns: 1fr; max-width: 680px; text-align: center; }
  .hero-subtitle { max-width: 100%; }
  .hero-cta     { justify-content: center; }
  .hero-visual  { display: none; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid     { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links    { display: none; position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; background: var(--bg); flex-direction: column; align-items: center; justify-content: center; gap: 2rem; z-index: 999; }
  .nav-links.open { display: flex; }
  .nav-link     { font-size: 1.4rem; }
  .nav-toggle   { display: flex; }
  .btn-nav-cta  { display: none; }
  .stats-container { grid-template-columns: repeat(2, 1fr); }
  .services-grid   { grid-template-columns: 1fr; }
  .posts-grid      { grid-template-columns: 1fr; }
  .form-row        { grid-template-columns: 1fr; }
  .footer-container { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-bottom   { flex-direction: column; text-align: center; }
}
