/* Controlled refinements: hero composition, cut geometry and company rhythm. */
:root{
  --cut-large:18px;
  --cut-card:14px;
  --cut-mobile:12px;
}

/* Hero planes retain their approved animation, gradients and desktop geometry. */
.grid path{stroke:#d3ddec;stroke-width:.8;opacity:.78}
.a-planes .hero-a-entry-layer .a-plane{animation:none;opacity:1;stroke:rgba(255,255,255,.2);stroke-width:.8}
.a-planes .a-plane.a-plane--leg-left{fill:url(#plane-navy)}
.a-planes .a-plane.a-plane--one{fill:url(#plane-indigo)}
.a-planes .a-plane.a-plane--two{fill:url(#plane-blue)}
.a-planes .a-plane.a-plane--three{fill:url(#plane-light)}
.a-planes .a-plane.a-plane--leg-right{fill:url(#plane-deep)}
.hero-a-entry-layer{opacity:var(--opacity);animation:plane .75s both}
.hero-a-entry-layer--leg-left{--opacity:.76}
.hero-a-entry-layer--one{--opacity:.58;animation-delay:.12s}
.hero-a-entry-layer--two{--opacity:.54;animation-delay:.2s}
.hero-a-entry-layer--three{--opacity:.62;animation-delay:.28s}
.hero-a-entry-layer--leg-right{--opacity:.68;animation-delay:.36s}
.hero-detail{pointer-events:none}
.dot-field path{fill:none;stroke:#5f78aa;stroke-width:1;stroke-linecap:round;stroke-dasharray:0 14;opacity:.24}
.construction path{fill:none;stroke:#7088b7;stroke-width:1;opacity:.5}
.node-rings circle{fill:none;stroke:#3659a7;stroke-width:1.2;opacity:.72}
.hero-mobile-copy{display:contents}

/* One-time entrance: text keeps its final metrics from the first paint. */
html.js .site-header{animation:header-enter .4s ease-out both}
html.js .hero-intro{animation:hero-copy-enter .55s ease-out both}
html.js .hero-copy .eyebrow{animation-delay:.18s}
html.js .hero-copy h1{animation-delay:.3s}
html.js .hero-copy .lead{animation-delay:.44s}
html.js .hero-copy .hero-actions{animation-delay:.58s}
html.js .hero-copy .tagline{animation-delay:.72s}
.hero-detail{animation:hero-detail-enter .35s 1s ease-out both}
@keyframes header-enter{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
@keyframes hero-copy-enter{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@keyframes hero-detail-enter{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}

/* Sections are visible by default; JavaScript only enables their one-time reveal. */
html.js.reveal-ready .scroll-reveal{opacity:0;transform:translateY(10px)}
html.js .scroll-reveal.is-visible{animation:section-reveal .55s ease-out forwards}
.about.is-visible .about-copy,.about.is-visible .competences article{animation:content-reveal .5s ease-out both}
.about.is-visible .competences article:nth-child(1){animation-delay:.07s}
.about.is-visible .competences article:nth-child(2){animation-delay:.14s}
.about.is-visible .competences article:nth-child(3){animation-delay:.21s}
.areas.is-visible .cards article{animation:content-reveal .48s ease-out both}
.areas.is-visible .cards article:nth-child(1){animation-delay:.07s}
.areas.is-visible .cards article:nth-child(2){animation-delay:.15s}
.areas.is-visible .cards article:nth-child(3){animation-delay:.23s}
.areas.is-visible .cards article:nth-child(4){animation-delay:.31s}
@keyframes section-reveal{to{opacity:1;transform:none}}
@keyframes content-reveal{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

/* Microinteractions apply only to interactive controls. */
.header-cta b,.button b,.text-link b,.rf-profile b{transition:transform .2s ease}
.header-cta:hover b,.button:hover b,.text-link:hover b,.rf-profile:hover b{transform:translateX(3px)}
.rf-banner img{transition:opacity .2s ease}
.rf-banner:hover img{opacity:.88}

/* One polygon system draws both the clipped surface and its complete diagonal border. */
.cut{
  --cut:var(--cut-large);
  --cut-path:polygon(0 0,calc(100% - var(--cut)) 0,100% var(--cut),100% calc(100% - var(--cut)),calc(100% - var(--cut)) 100%,0 100%);
  position:relative;
  isolation:isolate;
  clip-path:var(--cut-path);
  border:0;
  background:transparent;
}
.cut::before,.cut::after{
  content:"";
  position:absolute;
  pointer-events:none;
  clip-path:var(--cut-path);
}
.cut::before{z-index:-2;inset:0;background:var(--color-line)}
.cut::after{z-index:-1;inset:1px;background:rgba(255,255,255,.78)}
.about.cut{
  --cut-path:polygon(var(--cut) 0,100% 0,100% calc(100% - var(--cut)),calc(100% - var(--cut)) 100%,0 100%,0 var(--cut));
}
.cards article{--cut:var(--cut-card)}

/* Buttons use the same diagonal angle; keyboard focus remains outside the clipped control. */
.header-cta,.button{
  clip-path:polygon(0 0,calc(100% - var(--cut-card)) 0,100% var(--cut-card),100% 100%,0 100%);
}
.header-cta:focus-visible,.button:focus-visible{
  outline:0;
  filter:drop-shadow(0 0 0 var(--color-teal)) drop-shadow(0 0 2px var(--color-teal));
}

.about{
  min-height:0;
  padding:38px;
  grid-template-columns:minmax(0,40%) minmax(0,49%);
  justify-content:space-between;
}
.about-copy{max-width:430px}
.watermark{
  position:absolute;
  left:32%;
  top:8px;
  width:30%;
  height:calc(100% - 16px);
  overflow:hidden;
  font-size:276px;
  line-height:1;
  color:#dfe6f1;
  opacity:.25;
  pointer-events:none;
  user-select:none;
  z-index:0;
}
.competences{gap:24px;align-content:start}
.competences article{
  grid-template-columns:64px minmax(0,1fr) 72px;
  align-items:center;
  gap:16px;
}
.competences article>div{min-width:0}
.competences h3{margin-bottom:6px}
.competence-accent{
  position:relative;
  display:block;
  width:72px;
  height:1px;
  background:rgba(54,89,167,.28);
  pointer-events:none;
}
.competence-accent::after{
  content:"";
  position:absolute;
  right:-1px;
  top:50%;
  width:6px;
  height:6px;
  background:var(--color-teal);
  transform:translateY(-50%);
}

/* Desktop icon scale follows the approved reference while mobile keeps its existing rhythm. */
@media(min-width:1280px){
  .competences article{grid-template-columns:88px minmax(0,1fr) 72px;gap:10px}
  .competences svg{width:86px;height:86px}
  .competences article:nth-child(1) svg{transform:scale(1.14)}
  .competences article:nth-child(2) svg{transform:scale(1.03)}
  .competences article:nth-child(3) svg{transform:scale(1.08)}

  .cards svg{width:96px;height:96px;margin:0 auto 6px}
  .cards article:nth-child(1) svg{transform:scale(1.08)}
  .cards article:nth-child(2) svg{transform:scale(.98)}
  .cards article:nth-child(3) svg{transform:scale(1.13)}
  .cards article:nth-child(4) svg{transform:scale(1.08)}
}

@media(min-width:1024px) and (max-width:1279px){
  .competences article{grid-template-columns:82px minmax(0,1fr) 72px;gap:12px}
  .competences svg{width:80px;height:80px}
  .competences article:nth-child(1) svg{transform:scale(1.13)}
  .competences article:nth-child(2) svg{transform:scale(1.02)}
  .competences article:nth-child(3) svg{transform:scale(1.07)}

  .cards svg{width:84px;height:84px;margin:0 auto 7px}
  .cards article:nth-child(1) svg{transform:scale(1.07)}
  .cards article:nth-child(2) svg{transform:scale(.98)}
  .cards article:nth-child(3) svg{transform:scale(1.12)}
  .cards article:nth-child(4) svg{transform:scale(1.07)}
}

@media(min-width:861px) and (max-width:1023px){
  .competences article{grid-template-columns:72px minmax(0,1fr) 58px;gap:10px}
  .competences svg{width:70px;height:70px}
  .competences article:nth-child(1) svg{transform:scale(1.12)}
  .competences article:nth-child(2) svg{transform:scale(1.02)}
  .competences article:nth-child(3) svg{transform:scale(1.06)}

  .cards svg{width:76px;height:76px;margin:0 auto 7px}
  .cards article:nth-child(1) svg{transform:scale(1.06)}
  .cards article:nth-child(2) svg{transform:scale(.98)}
  .cards article:nth-child(3) svg{transform:scale(1.1)}
  .cards article:nth-child(4) svg{transform:scale(1.06)}
}

.footer-inner{grid-template-columns:1fr auto;padding:29px 12px}
.footer-inner>img{width:190px;height:auto}
.footer-inner>p{margin:0;text-align:right;font-size:11px;font-weight:600;line-height:1.55}
.rf-banner{display:block}
.rf-profile{font-size:12px;font-weight:700;line-height:1.4}
.rf-profile b{font-size:20px;color:var(--color-teal);margin-left:14px;font-weight:400}

@media(max-width:1120px) and (min-width:861px){
  .about{grid-template-columns:minmax(0,39%) minmax(0,53%);padding-inline:30px}
  .about-copy{grid-column:auto;max-width:430px;margin-bottom:0}
  .watermark{display:block;left:31%;width:31%;font-size:235px}
  .competences{grid-column:auto;grid-template-columns:1fr}
  .competences article{grid-template-columns:64px minmax(0,1fr) 58px}
  .competences svg{width:64px}
  .competence-accent{width:58px}
}

/* This narrower desktop layout is declared after its structural breakpoint. */
@media(min-width:1024px) and (max-width:1120px){
  .competences article{grid-template-columns:82px minmax(0,1fr) 58px;gap:12px}
  .competences svg{width:80px;height:80px}
}

@media(min-width:861px) and (max-width:1023px){
  .competences article{grid-template-columns:72px minmax(0,1fr) 58px;gap:10px}
  .competences svg{width:70px;height:70px}
}

@media(max-width:860px){
  .hero{
    display:block;
    position:relative;
    padding:29px 5px 24px;
    min-height:0;
    overflow:hidden;
  }
  .hero-copy{display:block;position:relative;z-index:2}
  .hero h1{
    font-size:clamp(1.85rem,7.8vw,2.35rem);
    line-height:1.04;
    max-width:62%;
  }
  .hero h1 br{display:none}
  .hero-art{
    position:absolute;
    z-index:1;
    top:18px;
    right:-36px;
    width:62%;
    height:270px;
    min-height:0;
    margin:0;
    overflow:hidden;
  }
  .hero-art svg{height:100%}
  .hero-art .dot-field{opacity:.55}
  .hero-art .construction{display:none}
  .hero-art .node-rings circle:nth-child(n+3){display:none}
  html.js .hero-intro{animation-name:hero-copy-enter-mobile;animation-duration:.45s}
  .about,.cred-box,.cards article{--cut:var(--cut-mobile)}
  .watermark{display:none}
  .competences{display:grid;grid-template-columns:1fr;gap:20px}
  .competences article{grid-template-columns:58px minmax(0,1fr);align-items:start;gap:12px}
  .competences svg{width:58px;height:58px}
  .competences h3{margin-bottom:5px}
  .competence-accent{display:none}
  .footer-inner{display:flex;flex-direction:column;align-items:flex-start;gap:14px;padding:28px 12px}
  .footer-inner>img{width:185px}
  .footer-inner>p{margin:0;text-align:left;font-size:11px;line-height:1.65}
}

@media(max-width:640px){
  .header-inner{
    height:auto;
    min-height:58px;
    padding:calc(16px + env(safe-area-inset-top)) 0 12px;
  }
  #main-menu{top:100%}
  .hero.hero-mobile-stage{
    display:grid;
    grid-template-columns:minmax(0,56fr) minmax(0,44fr);
    column-gap:6px;
    align-items:start;
    position:relative;
    overflow:hidden;
  }
  .hero .hero-copy{
    display:contents;
    position:static;
  }
  .hero-mobile-copy{
    display:block;
    grid-column:1;
    grid-row:1;
    min-width:0;
  }
  .hero h1{
    max-width:none;
    margin-bottom:0;
    font-size:clamp(2rem,9.5vw,2.45rem);
    line-height:1.01;
    letter-spacing:-.06em;
  }
  .hero .hero-art{
    position:relative;
    z-index:1;
    grid-column:2;
    grid-row:1;
    align-self:start;
    justify-self:end;
    top:auto;
    right:auto;
    width:clamp(145px,40vw,240px);
    height:auto;
    min-height:0;
    aspect-ratio:620 / 520;
    margin:34px 0 0;
    overflow:visible;
  }
  .hero .lead{
    grid-column:1 / -1;
    grid-row:2;
    max-width:none;
    margin-top:15px;
  }
  .hero .hero-actions{
    grid-column:1 / -1;
    grid-row:3;
    width:100%;
  }
  .hero .hero-actions .button{width:100%}
  .hero .tagline{
    grid-column:1 / -1;
    grid-row:4;
  }
}

/* Keep the illustration clear of the fixed three-line H1 before the mobile layout takes over. */
@media(min-width:641px) and (max-width:860px){
  .hero-art{width:48%}
}

@media(max-width:375px){
  .about,.cred-box,.cards article{--cut:10px}
  .competences article{grid-template-columns:54px minmax(0,1fr);gap:10px}
  .competences svg{width:54px;height:54px}
}

@media(max-width:360px){
  .hero.hero-mobile-stage{
    grid-template-columns:minmax(0,59fr) minmax(0,41fr);
    column-gap:4px;
  }
  .hero h1{font-size:clamp(1.92rem,9.5vw,2.18rem)}
  .hero .hero-art{
    width:clamp(118px,38vw,140px);
    margin-top:32px;
  }
  .cred-box dl div{display:block;padding:7px 0 9px}
  .cred-box dt{margin-bottom:2px}
  .cred-box dd{overflow-wrap:anywhere}
}

/* Mobile-only finishing adjustments: shared icon fields and aligned registry panel. */
@media(max-width:640px){
  .cards svg{width:66px;height:66px}
  .cards article:nth-child(1) svg{transform:scale(1.01)}
  .cards article:nth-child(2) svg{transform:scale(.99)}
  .cards article:nth-child(3) svg{transform:scale(1.02)}
  .cards article:nth-child(4) svg{transform:scale(1.01)}
  .cred-box{margin-inline:0}
}

@media(max-width:375px){
  .cards svg{width:60px;height:60px}
}

@media(prefers-reduced-motion:reduce){
  .site-header,.hero-intro,.hero-detail,.hero-a-entry-layer,.scroll-reveal,.scroll-reveal.is-visible,.about.is-visible .about-copy,.about.is-visible .competences article,.areas.is-visible .cards article{animation:none!important;opacity:1!important;transform:none!important}
  .hero-a-entry-layer{opacity:var(--opacity)}
}

@keyframes hero-copy-enter-mobile{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
