/* Ambex redesign (2026-10): visual layer over site.css. */
/* =========================================================================
   AMBEX REDESIGN — visual layer only.
   HTML structure, copy and behaviour are unchanged. Palette is taken from the
   reference artwork: deep blue-black, neon cyan and electric blue, with white
   glow. Page body stays light; the hero is the dark, glowing anchor.
   ========================================================================= */
:root{
  --navy:#17232d;
  --navy-2:#071a33;
  --cyan:#5aa5ff;
  --cyan-d:#0891b2;
  --blue:#1f75de;          /* brand blue from the logo arc */
  --sky:#60a5fa;
  --grad:linear-gradient(110deg,#5aa5ff 0%,#2f86e8 55%,#1f75de 100%);
  --bg:#f3f8fd;
  --bg-alt:#e7f1fa;
  --fg:#071a33;
  --fg-dim:#52647e;
  --rule:#d3e2f0;
  --accent:#1f75de;
  --shadow:0 1px 2px rgba(7,26,51,.05),0 14px 34px -10px rgba(7,40,80,.16);
}
body{background:var(--bg);color:var(--fg)}
::selection{background:rgba(31,117,222,.25)}

/* ---------- Header: deep-blue glass, seamless with the dark hero ---------- */
.site-header,.site-header.scrolled{
  background:rgba(8,10,14,.95);
  backdrop-filter:saturate(160%) blur(14px);
  -webkit-backdrop-filter:saturate(160%) blur(14px);
  border-bottom:1px solid rgba(90,165,255,.16);
  box-shadow:none;
  z-index:50;
}
.site-header.scrolled{box-shadow:0 10px 30px -18px rgba(0,0,0,.7)}
/* logo: soft blue glow around the white logo, a touch stronger on hover */
.site-header .brand-logo,.site-footer .brand-logo{
  filter:invert(1) hue-rotate(180deg) saturate(1.5) drop-shadow(0 0 8px rgba(120,180,255,.5)) drop-shadow(0 0 20px rgba(31,117,222,.45));
  opacity:1;transition:filter .35s ease;
}
.site-header .brand:hover .brand-logo,.site-footer .brand:hover .brand-logo{
  filter:invert(1) hue-rotate(180deg) saturate(1.5) drop-shadow(0 0 10px rgba(140,195,255,.65)) drop-shadow(0 0 26px rgba(31,117,222,.6));
}
.site-header .site-nav a{color:#b4c9e6}
.site-header .site-nav a:hover{color:#fff}
.site-header .site-nav a:not(.nav-cta)::after{background:linear-gradient(90deg,#5aa5ff,#2f86e8)}
.lang-switch{background:rgba(255,255,255,.05);border-color:rgba(255,255,255,.2)}
.lang-switch a{color:#b4c9e6;cursor:pointer}
.lang-switch a + a{border-left-color:rgba(255,255,255,.2)}
.lang-switch a:hover{color:#fff;background:rgba(255,255,255,.08)}
.lang-switch a.active,.lang-switch a.active:hover{background:#1f75de;color:#fff}

/* ---------- Hero: dark, patterned, the visual anchor of the page ---------- */
.hero{
  position:relative;overflow:hidden;isolation:isolate;
  background:var(--navy);color:#e8f4ff;border-bottom:0;
}
.hero::before,.hero::after{
  content:"";position:absolute;z-index:-2;pointer-events:none;border-radius:50%;filter:blur(110px);
}
.hero::before{width:760px;height:760px;right:-200px;top:-260px;background:rgba(90,165,255,.22)}
.hero::after{
  width:700px;height:700px;left:-240px;bottom:-300px;right:auto;top:auto;
  background:rgba(79,110,230,.22);
}
.hero-bg{
  display:block;position:absolute;inset:0;z-index:-3;
  background:
    radial-gradient(ellipse 45% 50% at 86% 28%,rgba(90,165,255,.14),transparent 68%),
    radial-gradient(ellipse 45% 55% at 6% 96%,rgba(79,110,230,.16),transparent 68%),
    linear-gradient(125deg,#123a58 0%,#17232d 55%,#232a4d 100%);
}
.hero-pattern{
  position:absolute;inset:0;z-index:-2;pointer-events:none;
  background-image:
    linear-gradient(rgba(130,200,235,.11) 1px,transparent 1px),
    linear-gradient(90deg,rgba(130,200,235,.11) 1px,transparent 1px),
    radial-gradient(rgba(170,220,240,.45) 1.2px,transparent 1.4px);
  background-size:56px 56px,56px 56px,56px 56px;
  background-position:0 0,0 0,28px 28px;
  -webkit-mask-image:radial-gradient(ellipse 85% 80% at 62% 42%,#000 20%,transparent 78%);
  mask-image:radial-gradient(ellipse 85% 80% at 62% 42%,#000 20%,transparent 78%);
}
#hero-net{position:absolute;inset:0;width:100%;height:100%;z-index:-1;pointer-events:none}
.hero .wrap{position:relative;z-index:2}

.hero h1{
  font-family:'Space Grotesk','Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  color:#fff;font-weight:700;letter-spacing:-.035em;
  font-size:clamp(40px,4.5vw,70px);line-height:1.02;
  text-shadow:0 0 40px rgba(90,165,255,.28);
}
.hero:not(.page-hero) h1{font-size:clamp(34px,3.5vw,54px);max-width:16ch}  /* same size and width in EN and LV */
.hero .lede{color:#c2d6ef;font-size:clamp(18px,1.5vw,21px)}
.hero .lede .muted{display:block;color:inherit;font-weight:inherit;font-size:inherit}  /* the second sentence starts on a new line */

/* diagram: no outer frame; the availability box is the single glass card, the
   external nodes sit directly on the hero pattern like in the original layout */
.hero-panel{
  --line:#d2deed;            /* lines that run over the dark hero */
  --line-internal:#d2deed;   /* lines inside the card */
  --bg-card:#2a3b4b;
  --bg-cluster:rgba(255,255,255,.07);
  --bg-firewall-col:rgba(0,0,0,.2);
  --border:rgba(255,255,255,.2);
  --border-dashed:rgba(255,255,255,.42);
  --text:#eef3f8;
  --text-muted:#b9c7d6;
  position:relative;
}
.hero-panel .availability-box{
  border:1.5px solid transparent;border-radius:18px;
  background:
    linear-gradient(#2a3b4b,#2a3b4b) padding-box,
    linear-gradient(135deg,#5aa5ff,#2f86e8 55%,#1f75de) border-box;
  box-shadow:0 30px 70px -10px rgba(0,0,0,.55),0 0 60px rgba(90,165,255,.18);
}
.hero-panel .availability-header,.hero-panel .availability-footer{background:rgba(255,255,255,.05)}
.hero-panel .status-bar{display:none}
.hero-panel .cluster-group{box-shadow:none}
.hero-panel .sync-arrow,.hero-panel .sync-arrow .sync-label{color:#8fbcff}
.hero-panel .diagram-disclaimer{color:#9fb0c4;opacity:1;margin:10px 4px 0}
.hero-panel .external-title{color:#fff}
.hero-panel .external-node .sub{color:#c9d4e3}
.hero-panel .external-icon{filter:drop-shadow(0 0 1px rgba(255,255,255,.4)) drop-shadow(0 4px 10px rgba(0,0,0,.5))}

/* hero pill (the "SIA Ambex · Riga, Latvia" label) */
.hero .kicker.hero-kicker{
  margin:0 0 26px;background:rgba(90,165,255,.1);border:1px solid rgba(90,165,255,.45);
  color:#b3d4ff;font-weight:600;
}
.hero .kicker.hero-kicker::before{background:#5aa5ff;box-shadow:0 0 8px #5aa5ff}

/* ---------- Buttons: original shape/behaviour, only recoloured ---------- */
.site-header .site-nav .nav-cta{color:#fff;border-color:rgba(90,165,255,.65)}
.site-header .site-nav .nav-cta:hover{background:#5aa5ff;color:#03111f;border-color:#5aa5ff}
.cta{border-color:var(--navy-2);color:var(--navy-2)}
.cta:hover{background:var(--navy-2);color:#fff;border-color:var(--navy-2)}
/* Hero button: the dark-blue button with a light-blue rim. On hover the colours stay exactly the same;
   only the motion changes: the button lifts and a light sheen sweeps across it. */
.hero-cta .cta{
  position:relative;overflow:hidden;
  font-size:17.5px;font-weight:600;letter-spacing:.01em;padding-top:16px;padding-bottom:16px;
  background:#071a33;
  color:#fff;border-color:rgba(90,165,255,.65);   /* light-blue outline, same as the Contact link */
  box-shadow:0 6px 16px -8px rgba(0,0,0,.55);
  transition:transform .25s ease,box-shadow .3s ease;
}
.hero-cta .cta::before{
  content:"";position:absolute;top:0;bottom:0;left:-70%;width:45%;
  background:linear-gradient(100deg,transparent,rgba(255,255,255,.3),transparent);
  transform:skewX(-20deg);transition:left .7s ease;pointer-events:none;
}
.hero-cta .cta:hover{
  background:#071a33;color:#fff;border-color:rgba(90,165,255,.65);filter:none;   /* unchanged */
  box-shadow:0 14px 28px -12px rgba(0,0,0,.7);
}
.hero-cta .cta:hover::before{left:130%}
/* Contact button: same behaviour as the hero button. The generic ".cta:hover"
   rule above would swap the gradient for a flat fill (a visible flash), so the
   selectors here are specific enough that the background never changes on hover. */
.contact-form .contact-submit,
.contact-form .contact-submit:hover,
.contact-form .contact-submit:focus-visible{
  background:#071a33;
  color:#fff;border-color:transparent;
}
.contact-form .contact-submit{box-shadow:0 10px 24px -12px rgba(7,26,51,.6)}
/* same hover as the hero button: small lift + soft shadow */
.contact-form .contact-submit:hover{
  box-shadow:0 10px 22px -10px rgba(7,26,51,.7);
}

/* ---------- Rounded (pill) buttons ---------- */
.site-header .site-nav .nav-cta,
.cta,
.hero-cta .cta,
.contact-submit{border-radius:999px}
.hero-cta .cta,.contact-submit{padding-left:30px;padding-right:30px}
.contact-form .contact-submit{align-self:center}

/* ---------- Kicker pills ---------- */
.kicker{
  background:#ebf3fc;border:1px solid #c6dcf6;color:#175cb4;font-weight:600;   /* solid, so it looks identical on white and on tinted sections */
}
.kicker::before{background:#1f75de}

/* ---------- Shared headings ---------- */
.founder-text h2,.services-header h2,.contact-intro h2{color:var(--navy-2);font-weight:700}

/* ---------- Founder ---------- */
.founder{background:#fff;border-bottom:1px solid var(--rule);position:relative}
.founder::before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background-image:radial-gradient(rgba(31,117,222,.16) 1px,transparent 1.2px);
  background-size:26px 26px;
  -webkit-mask-image:radial-gradient(ellipse 55% 75% at 12% 50%,#000,transparent 70%);
  mask-image:radial-gradient(ellipse 55% 75% at 12% 50%,#000,transparent 70%);
}
.founder .wrap{position:relative}
.founder-photo::before{
  content:"";position:absolute;inset:18px -16px -16px 18px;border-radius:18px;z-index:0;
  background:#1f75de;opacity:1;
}
.founder-photo img{position:relative;z-index:1;border-radius:16px;box-shadow:0 30px 60px -22px rgba(4,30,60,.5)}
.founder-text p{color:#34455f}
/* the intro sentence uses exactly the same text style as the paragraphs below it */
.founder-text p.lede{font-size:16.5px;line-height:1.65;font-weight:400;color:#34455f;margin:0 0 16px;max-width:60ch}

/* ---------- Services ---------- */
.services{background:var(--bg-alt);border-bottom:1px solid var(--rule)}
.services-grid{gap:18px;background:transparent;border:0;border-radius:0;overflow:visible}
.service-card{
  background:#fff;border:1px solid var(--rule);border-radius:16px;
  box-shadow:0 1px 2px rgba(7,26,51,.04);overflow:hidden;
}
.service-card::after{
  content:"";position:absolute;left:0;top:0;height:3px;width:0;
  background:#1f75de;transition:width .35s ease;
}
.service-card:hover{background:#fff;border-color:#b3cff2;box-shadow:var(--shadow);transform:translateY(-4px)}
.service-card:hover::after{width:100%}
.service-icon{
  color:#175cb4;                              /* dark logo blue */
  background:rgba(31,117,222,.1);
  /* slightly thinner glyph: a hairline stroke in the badge colour eats into the solid shape */
  -webkit-text-stroke:1px #e8f0fb;
}
.service-card:hover .service-icon{background:rgba(31,117,222,.18);-webkit-text-stroke-color:#dbe7f8}
.service-num{color:#1f75de}
.service-card h3{color:var(--navy-2)}
.service-card p{color:var(--fg-dim)}

/* ---------- Contact: section background is the same solid colour as the hero ---------- */
.contact{background:#17232d;border-bottom:0;color:#e6edf5}
.contact .kicker{background:rgba(90,165,255,.1);border-color:rgba(90,165,255,.45);color:#b3d4ff}
.contact .kicker::before{background:#5aa5ff}
.contact-intro h2{color:#fff}
.contact-intro p,.contact-intro .contact-details{color:#c3cedd}
.contact-intro .contact-details i{color:#5aa5ff}
.contact-intro .contact-details a{color:#fff;border-bottom-color:rgba(255,255,255,.25)}
.contact-intro .contact-details a:hover{color:#5aa5ff;border-bottom-color:#5aa5ff}
.contact-form{
  background:#f4f8fc;border:1px solid #f4f8fc;
  border-radius:20px;padding:clamp(22px,3vw,36px);box-shadow:0 24px 60px -24px rgba(0,0,0,.6);
}
.form-row input,.form-row textarea{border-radius:10px;background:#fff}
.form-row input:focus,.form-row textarea:focus{border-color:#1f75de;box-shadow:0 0 0 3px rgba(31,117,222,.22)}

/* ---------- Footer: deep-blue bookend ---------- */
.site-footer{background:#080a0e;border-top:0;color:#9db8dc;position:relative}
.site-footer::before{
  content:"";position:absolute;left:0;right:0;top:0;height:2px;
  background:linear-gradient(90deg,transparent,#5aa5ff,#1f75de,transparent);opacity:.9;
}
.site-footer .meta,.site-footer .meta a{color:#9db8dc}
.site-footer .meta a:hover{color:#fff}

/* ---------- Ambient dots: blue instead of yellow ---------- */
#float-bg .float-circle{background:rgba(31,117,222,.14)}

/* The original scheme is slightly taller than its 950x605 stage, so the host's
   overflow:hidden shaved ~10px off the top and bottom of the card. Let it show. */
.hero-panel .diagram-host{overflow:visible}
.hero-panel .diagram-disclaimer{margin-top:22px}

/* ---------- Contact fields: clearer outline (no hover effect) ---------- */
.form-row input,.form-row textarea{border:1.5px solid #8aa5c6}

/* Founder text justified on both edges */
.founder-text p{text-align:justify;text-justify:inter-word}


/* ---------- Inner pages (Video / Courses) ---------- */
.site-header .site-nav a.active{color:#fff}
.site-header .site-nav a.active::after{transform:scaleX(1)}
.page-hero{padding-top:clamp(56px,7vw,96px);padding-bottom:clamp(56px,6vw,88px)}
.page-hero h1{max-width:none}
.page-hero .lede{max-width:640px;margin-bottom:0}
.page-body{background:#fff;padding:clamp(56px,7vw,96px) 0;min-height:42vh;border-bottom:1px solid var(--rule)}
.empty-card{max-width:680px;margin:0 auto;padding:clamp(32px,5vw,56px);text-align:center;background:#f4f8fc;border:1px solid var(--rule);border-radius:20px;box-shadow:var(--shadow)}
.empty-icon{font-size:40px;color:#1f75de;margin-bottom:18px}
.empty-card h2{margin:0 0 12px;font-size:clamp(24px,3vw,32px);font-weight:700;color:var(--navy-2)}
.empty-card p{margin:0 auto 22px;max-width:46ch;color:var(--fg-dim)}
.empty-card .hero-cta{margin:0}

/* ---------- Service icons: the original tinted badge, with thin modern line icons inside ----------
   (badge colours / hover come from the .service-icon rules above; only the glyph is new) */
svg.service-icon{
  width:80px;height:76px;box-sizing:border-box;padding:15px 18px;
  fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;
}

/* ---------- Sticky footer: always at the bottom, whatever the page height ---------- */
html,body{min-height:100%}
body{min-height:100vh;display:flex;flex-direction:column}
body > main{flex:1 0 auto}
body > .site-footer{flex-shrink:0;margin-top:auto}
/* inner pages: the white content area stretches down to the footer */
body > main:has(> .page-body){display:flex;flex-direction:column}
main > .page-body{flex:1 0 auto}

/* ---------- Contact form: two fields per row ---------- */
.form-pair{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.form-pair .form-row{min-width:0}
@media (max-width:560px){.form-pair{grid-template-columns:1fr}}

/* placeholder disappears when the field is focused */
.form-row input::placeholder,.form-row textarea::placeholder{transition:opacity .15s ease}
.form-row input:focus::placeholder,.form-row textarea:focus::placeholder{opacity:0}

/* ---------- All headings in Space Grotesk (the scheme's own small label keeps its font) ---------- */
h1,h2,h3{font-family:'Space Grotesk','Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif}
.availability-box h2{font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif}

/* on the white content cards of the inner pages the button needs no light rim */
.empty-card .hero-cta .cta,.empty-card .hero-cta .cta:hover{border-color:transparent;background:#1f75de}

/* "Send message" gets the same hover animation as the hero button: lift + a light sheen sweeping across (no colour change) */
.contact-form .contact-submit{position:relative;overflow:hidden;transition:transform .25s ease,box-shadow .3s ease}
.contact-form .contact-submit::before{
  content:"";position:absolute;top:0;bottom:0;left:-70%;width:45%;
  background:linear-gradient(100deg,transparent,rgba(255,255,255,.3),transparent);
  transform:skewX(-20deg);transition:left .7s ease;pointer-events:none;
}
.contact-form .contact-submit:hover{filter:none;box-shadow:0 14px 28px -12px rgba(0,0,0,.6)}
.contact-form .contact-submit:hover::before{left:130%}

/* Section pills (Founder / Services / Contact) all have the same size as the Founder pill; the hero pill keeps its own size */
.kicker:not(.hero-kicker){font-size:16.5px;line-height:1.65}

/* Services pill text has the same colour as the Founder pill (dark slate) */
.services-header .kicker{color:#34455f;background:#cfe0f6;border-color:#a9c7ee}   /* darker pill so it stands out on the tinted section */

/* Phones: the hero button hugs its content (no stretching), only slightly roomier for thumbs */
@media (max-width:640px){
  .hero:not(.page-hero) .hero-cta .cta{display:inline-flex;width:auto;font-size:17px;padding:17px 28px}
}

/* ================= Responsive ================= */
html,body{overflow-x:clip}                       /* side-sliding animations can never create a sideways scrollbar */
.founder-text .kicker{text-align:left}           /* the justified paragraphs must not stretch the pill text */
@media (max-width:640px){
  .founder-text p{text-align:left}              /* justified text makes big word gaps on narrow screens */
  .contact-intro p br{display:none}             /* let the intro wrap naturally instead of forcing a line break */
}
@media (max-width:900px){
  .service-icon{font-size:38px;width:66px}      /* wide glyphs (cloud, robot, money) must stay inside their box */
}
@media (min-width:601px) and (max-width:900px){
  .services-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .service-card{column-gap:20px;padding:24px 22px 26px}
}
@media (max-width:560px){
  .service-card{padding:22px 18px 24px;column-gap:16px}
}
@media (max-width:400px){
  .site-header .nav{gap:10px}
  .site-header .brand-logo{height:30px}
  .site-header .lang-switch a{padding:7px 9px}
}
@media (min-width:901px) and (max-width:1080px){
  .site-header .nav{gap:16px}
  .site-header .site-nav{gap:22px;flex-wrap:nowrap;margin-left:auto}
  .site-header .site-nav a{white-space:nowrap}
}
@media (max-width:900px){
  .site-header .lang-switch{margin-left:auto}
}

/* ---------- Phones / tablets: keep the animated hero smooth ----------
   Animated SVG with drop-shadow filters and a backdrop blur over a moving
   background are re-rendered every frame; mobile GPUs drop frames on that. */
@media (max-width:900px),(pointer:coarse){
  .site-header,.site-header.scrolled{backdrop-filter:none;-webkit-backdrop-filter:none;background:rgba(8,10,14,.97)}
  .particle-group,.particle-group.particle-group-bad,
  .db-orbit-bg,.db-orbit-fg,.app-orbit-bg,.app-orbit-fg{filter:none}
  .hero-panel .external-icon{filter:none}
}
