/* ===== Brand tokens (taken from the DevRise logo) ===== */
:root {
  --cyan: #1fb8ff;
  --blue: #2e6bff;
  --violet: #4a3df5;
  --navy: #061125;
  --navy-2: #0c1b36;
  --ink: #0b1426;
  --text: #3d4a60;
  --muted: #6b7890;
  --line: #e4e9f2;
  --bg: #ffffff;
  --bg-alt: #f5f8fd;
  --grad: linear-gradient(135deg, var(--cyan) 0%, var(--blue) 55%, var(--violet) 100%);
  --radius: 16px;
  --shadow: 0 10px 30px rgba(14, 35, 80, .08);
  --shadow-lg: 0 24px 60px rgba(14, 35, 80, .16);
  --font-head: "Poppins", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--blue); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }

.container { width: min(1180px, 100%); margin: 0 auto; padding-inline: 24px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}
.eyebrow-light { color: var(--cyan); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; border: 0;
  font: 600 1rem/1 var(--font-body); cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(46, 107, 255, .35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(46, 107, 255, .45); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-sm { padding: 10px 20px; font-size: .92rem; }
.btn-block { width: 100%; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 4px 20px rgba(14, 35, 80, .05); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand img { height: 44px; width: auto; }
.nav-menu { display: flex; align-items: center; gap: 32px; }
.nav-menu a:not(.btn) { color: var(--ink); font-weight: 500; font-size: .96rem; position: relative; }
.nav-menu a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--grad); transition: width .25s;
}
.nav-menu a:not(.btn):hover::after { width: 100%; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; margin: 5px 0; background: var(--ink); border-radius: 2px; transition: transform .25s, opacity .25s; }

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; padding: 80px 0 110px; }
.hero-glow {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(600px 400px at 85% 20%, rgba(31, 184, 255, .18), transparent 70%),
    radial-gradient(500px 400px at 70% 80%, rgba(74, 61, 245, .14), transparent 70%),
    linear-gradient(var(--bg-alt), #fff);
}
.hero-glow::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(46, 107, 255, .06) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(46, 107, 255, .06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: center; }
.lead { font-size: 1.15rem; max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 28px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: .92rem; color: var(--muted); }
.hero-points li::before { content: "✓"; color: var(--blue); font-weight: 700; margin-right: 8px; }

.hero-visual { position: relative; min-height: 380px; }
.window {
  position: relative; margin: 30px 20px 0 40px;
  background: var(--navy); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.window-bar { display: flex; align-items: center; gap: 7px; padding: 14px 18px; background: var(--navy-2); }
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.window-bar i:nth-child(2) { background: #febc2e; }
.window-bar i:nth-child(3) { background: #28c840; }
.window-bar span { margin-left: 10px; font-size: .8rem; color: #8aa0c4; }
.window pre { margin: 0; padding: 26px 26px 34px; font: .95rem/1.9 ui-monospace, "Cascadia Code", Consolas, monospace; color: #c9d6ee; overflow-x: auto; }
.window b { color: var(--cyan); font-weight: 600; }
.window em { color: #9db7ff; font-style: normal; }
.window s { color: #5ee2a0; text-decoration: none; }

.float-card {
  position: absolute; display: flex; align-items: center; gap: 12px;
  background: #fff; padding: 14px 18px; border-radius: 14px; box-shadow: var(--shadow-lg);
  animation: float 6s ease-in-out infinite;
}
.float-card strong { display: block; color: var(--ink); font-size: .92rem; }
.float-card small { color: var(--muted); font-size: .8rem; }
.float-card img { width: 32px; height: auto; }
.fc-1 { top: 0; right: 0; }
.fc-2 { bottom: 0; left: 0; animation-delay: -3s; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 30px; }
.bars i { width: 7px; border-radius: 2px; background: var(--grad); }
.bars i:nth-child(1) { height: 35%; } .bars i:nth-child(2) { height: 55%; }
.bars i:nth-child(3) { height: 75%; } .bars i:nth-child(4) { height: 100%; }
@keyframes float { 50% { transform: translateY(-10px); } }

/* ===== Sections ===== */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

/* Services */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.service-card {
  position: relative; padding: 32px 28px; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--line);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.service-card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px; border-radius: var(--radius) var(--radius) 0 0;
  background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .3s;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.service-card:hover::before { transform: scaleX(1); }
.service-card p { font-size: .96rem; }
.service-card ul { list-style: none; padding: 0; margin: 18px 0 0; border-top: 1px solid var(--line); padding-top: 16px; }
.service-card li { font-size: .9rem; color: var(--muted); padding: 4px 0 4px 20px; position: relative; }
.service-card li::before { content: ""; position: absolute; left: 0; top: 12px; width: 8px; height: 8px; border-radius: 2px; background: var(--grad); }
.icon {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center;
  background: var(--grad); margin-bottom: 22px; box-shadow: 0 8px 20px rgba(46, 107, 255, .3);
}
.icon svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Process */
.process { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.process li { position: relative; background: #fff; padding: 30px 26px; border-radius: var(--radius); box-shadow: var(--shadow); }
.process li:not(:last-child)::after {
  content: ""; position: absolute; top: 52px; right: -24px; width: 24px; height: 2px;
  background: linear-gradient(90deg, var(--blue), transparent);
}
.step { display: inline-block; font: 700 2.2rem/1 var(--font-head); margin-bottom: 14px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.process p { font-size: .95rem; margin: 0; }

/* Technologies */
.tech-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.tech-tabs button {
  padding: 10px 22px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font: 500 .95rem var(--font-body); color: var(--text); cursor: pointer; transition: all .2s;
}
.tech-tabs button:hover { border-color: var(--blue); color: var(--blue); }
.tech-tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chips { list-style: none; padding: 0; margin: 0 auto; max-width: 860px; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.chips li {
  padding: 14px 24px; border-radius: 12px; background: var(--bg-alt); border: 1px solid var(--line);
  font-weight: 600; color: var(--ink); animation: pop .35s ease both;
}
.chips li:nth-child(2) { animation-delay: .04s; } .chips li:nth-child(3) { animation-delay: .08s; }
.chips li:nth-child(4) { animation-delay: .12s; } .chips li:nth-child(5) { animation-delay: .16s; }
.chips li:nth-child(6) { animation-delay: .2s; }  .chips li:nth-child(7) { animation-delay: .24s; }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }

/* Why */
.section-dark {
  background:
    radial-gradient(600px 400px at 10% 0%, rgba(31, 184, 255, .15), transparent 70%),
    radial-gradient(600px 400px at 100% 100%, rgba(74, 61, 245, .2), transparent 70%),
    var(--navy);
  color: #c4cfe3;
}
.section-dark h2, .section-dark h3 { color: #fff; }
.muted-light { color: #9fb0cc; font-size: 1.08rem; margin-bottom: 28px; }
.why-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: center; }
.why-list { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.why-item {
  padding: 26px; border-radius: var(--radius);
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08);
  transition: background .25s, border-color .25s;
}
.why-item:hover { background: rgba(255, 255, 255, .07); border-color: rgba(31, 184, 255, .4); }
.why-item h3 { font-size: 1.08rem; }
.why-item h3::before { content: ""; display: block; width: 32px; height: 3px; border-radius: 2px; background: var(--grad); margin-bottom: 16px; }
.why-item p { margin: 0; font-size: .94rem; color: #9fb0cc; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; }
.contact-info { list-style: none; padding: 0; margin: 32px 0 0; }
.contact-info li { padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 500; }
.contact-info span { display: block; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 2px; }
.contact-form { background: #fff; padding: 36px; border-radius: 20px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.contact-form label { display: block; font-size: .88rem; font-weight: 600; color: var(--ink); margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form input, .contact-form select, .contact-form textarea {
  display: block; width: 100%; margin-top: 8px; padding: 13px 15px;
  font: 400 1rem var(--font-body); color: var(--ink);
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: 10px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.contact-form textarea { resize: vertical; }
.contact-form :is(input, select, textarea):focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(46, 107, 255, .12); }
.contact-form .invalid { border-color: #e5484d; }
.form-status { margin: 14px 0 0; font-size: .92rem; text-align: center; min-height: 1.4em; }
.form-status.ok { color: #12a150; }
.form-status.err { color: #e5484d; }

/* Footer */
.site-footer { background: var(--navy); color: #8b9bb8; padding: 70px 0 0; font-size: .94rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.footer-logo { height: 46px; width: auto; margin-bottom: 18px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.site-footer a { display: block; color: #8b9bb8; padding: 4px 0; transition: color .2s; }
.site-footer a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-block: 22px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .86rem; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 1080px) {
  .services-grid, .process { grid-template-columns: repeat(2, 1fr); }
  .process li::after { display: none; }
}
@media (max-width: 900px) {
  .hero { padding: 50px 0 80px; }
  .hero-grid, .why-grid, .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { max-width: 520px; }
  .nav-toggle { display: block; }
  .nav-menu {
    position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px 24px 24px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav-menu a:not(.btn)::after { display: none; }
  .nav-menu .btn { margin-top: 16px; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 600px) {
  .container { padding-inline: 18px; }
  .section { padding: 72px 0; }
  .brand img { height: 36px; }
  .services-grid, .process, .why-list, .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .window { margin: 40px 0 0; }
  .window pre { font-size: .82rem; padding: 20px; }
  .contact-form { padding: 24px; }
  .hero-visual { min-height: 0; padding-bottom: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ===== Legal pages ===== */
.legal-hero { padding: 64px 0 40px; background: linear-gradient(var(--bg-alt), #fff); border-bottom: 1px solid var(--line); }
.legal-hero h1 { margin-bottom: .3em; }
.legal-meta { color: var(--muted); font-size: .95rem; margin: 0; }
.legal-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 64px; padding-block: 56px 100px; }
.legal-toc { position: sticky; top: 100px; align-self: start; display: flex; flex-direction: column; font-size: .9rem; max-height: calc(100vh - 120px); overflow-y: auto; }
.legal-toc strong { color: var(--ink); font-family: var(--font-head); margin-bottom: 10px; }
.legal-toc a { color: var(--muted); padding: 5px 0 5px 14px; border-left: 2px solid var(--line); transition: color .2s, border-color .2s; }
.legal-toc a:hover { color: var(--blue); border-color: var(--blue); }
.legal-content { max-width: 760px; }
.legal-content h2 { font-size: 1.45rem; margin-top: 2.2em; padding-top: 4px; }
.legal-content h2:first-of-type { margin-top: 1.4em; }
.legal-content h3 { font-size: 1.05rem; margin-top: 1.6em; }
.legal-content ul, .legal-content ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.legal-content li { margin-bottom: .45em; }
.legal-content ul.plain { list-style: none; padding-left: 0; }
.legal-content a { text-decoration: underline; text-underline-offset: 2px; }
.legal-content .note { font-size: .92rem; }
.ph { background: #fff4c2; color: #6b4e00; padding: 1px 4px; border-radius: 4px; }
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; }
.legal-content table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.legal-content th, .legal-content td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal-content th { background: var(--bg-alt); color: var(--ink); font-weight: 600; }
.form-consent { font-size: .82rem; color: var(--muted); text-align: center; margin: 12px 0 0; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-legal a { display: inline; padding: 0; }
@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; gap: 32px; padding-block: 32px 72px; }
  .legal-toc { position: static; max-height: none; padding: 20px; background: var(--bg-alt); border-radius: var(--radius); }
}
