/* PRO-ETUDES — immersive layer over theme.css: full-height hero, hexagon textures and warm glows on
   dark sections, glass cards, depth on hover and scroll-linked motion where the browser supports it.
   Every movement stops with prefers-reduced-motion or the pause button (body.motion-paused).
   Removing this file restores theme.css alone. */
:root {
  --hex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 1 55 16.5v31L28 63 1 47.5v-31Zm0 63v33M1 47.5 -26 63M55 47.5 82 63' fill='none' stroke='%23fff' stroke-opacity='.07'/%3E%3C/svg%3E");
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --glow: radial-gradient(circle, #f7761f33, transparent 62%);
}

/* Glass header that stays readable over the hero while scrolling. */
.site-header { background: #ffffffe6; backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom-color: #0a16281a; }

/* Hero: close to full height, larger type, hexagon texture and a warm halo. */
.hero { min-height: max(680px, calc(100svh - 140px)); display: flex; flex-direction: column; justify-content: flex-end; }
.hero-copy { padding-top: clamp(90px, 12vh, 150px); padding-bottom: clamp(120px, 16vh, 170px); margin-top: auto; }
.hero h1 { font-size: clamp(46px, 6.4vw, 92px); line-height: 1.02; letter-spacing: -.045em; }
.hero h1 em { background: linear-gradient(100deg, #ff9a4d, #f7761f 45%, #ffb36b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-intro { font-size: clamp(17px, 1.4vw, 20px); max-width: 560px; }
.hero-grid { opacity: 1; background-image: var(--hex); background-size: 56px 97px; mask-image: linear-gradient(100deg, transparent 35%, #000 75%); -webkit-mask-image: linear-gradient(100deg, transparent 35%, #000 75%); }
.hero-grid:after { width: 620px; height: 620px; right: -6%; top: -18%; border: 0; border-radius: 50%; background: var(--glow); box-shadow: none; }
.hero:after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: var(--grain); opacity: .06; mix-blend-mode: overlay; }
.hero-side-note { color: #ffffff80; }

/* Scroll cue under the hero copy. */
.hero-bottom { position: relative; }
.hero-bottom:before { content: ''; position: absolute; left: 50%; top: -58px; width: 1px; height: 40px; background: linear-gradient(#f7761f, transparent); }

/* Engineering poles as glass cards floating over the hero edge. */
.pole-strip { top: -56px; margin-bottom: -56px; gap: 14px; box-shadow: none; }
.pole-card { border: 1px solid #ffffff2e; border-top: 3px solid var(--accent); border-radius: 10px; background: #ffffffeb; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 24px 50px -18px #0a162859; transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), background .3s; }
.pole-card:hover { transform: translateY(-6px); box-shadow: 0 34px 60px -20px #0a16288c; }

/* Dark sections share the hexagon texture, grain and a warm glow. */
.why-section, .tools-section, .contact-teaser, .site-footer { position: relative; isolation: isolate; }
.tools-section:before, .contact-teaser:before, .site-footer:before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--hex); background-size: 56px 97px; mask-image: radial-gradient(ellipse at 100% 0%, #000, transparent 60%); -webkit-mask-image: radial-gradient(ellipse at 100% 0%, #000, transparent 60%); }
.why-section:after, .tools-section:after { content: ''; position: absolute; width: 560px; height: 560px; left: -180px; bottom: -280px; z-index: -1; pointer-events: none; background: var(--glow); }
.site-footer:before { mask-image: radial-gradient(ellipse at 100% 100%, #000, transparent 55%); -webkit-mask-image: radial-gradient(ellipse at 100% 100%, #000, transparent 55%); }
.footer-brand-band { position: relative; z-index: 1; }

/* Section titles: bigger and tighter. */
.section-heading h2, .about-copy h2, .project-heading h2, .tools-heading h2, .resources-section h2 { font-size: clamp(32px, 3.6vw, 52px); line-height: 1.1; letter-spacing: -.035em; }

/* Buttons: soft lift, arrow that moves, light sweep on the primary action. */
.button, .header-cta { position: relative; overflow: hidden; border-radius: 8px; transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), background .25s, border-color .25s; }
.button:hover, .header-cta:hover { transform: translateY(-2px); }
.button-blue:hover, .header-cta:hover { box-shadow: 0 14px 30px -10px #f7761fa6; }
.button [aria-hidden=true], .text-link [aria-hidden=true], .card-more [aria-hidden=true] { display: inline-block; transition: transform .35s var(--ease-out); }
.button:hover [aria-hidden=true], .text-link:hover [aria-hidden=true], .service-card:hover .card-more [aria-hidden=true] { transform: translate(3px, -3px); }
.button-blue:after, .header-cta:after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, #ffffff59 50%, transparent 70%); transform: translateX(-120%); pointer-events: none; }
.button-blue:hover:after, .header-cta:hover:after { transform: translateX(120%); transition: transform .8s var(--ease-out); }

/* Service cards and project cards: depth on hover. */
.service-grid { border: 0; gap: 16px; }
.service-card { border: 1px solid #e3e8ef; border-radius: 12px; background: #fff; transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), border-color .3s, background .3s; }
.service-card:hover { transform: translateY(-6px); border-color: #f7c9a6; box-shadow: 0 30px 50px -28px #0a16284d; }
.service-card .icon { border-radius: 12px; transition: transform .45s var(--ease-out); }
.service-card:hover .icon { transform: rotate(-6deg) scale(1.06); }

.project-card { border-radius: 12px; overflow: hidden; transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out); }
.project-card:hover { transform: translateY(-6px); box-shadow: 0 34px 60px -30px #0a162873; }
.project-photo:after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, #0a16288c, transparent 55%); opacity: 0; transition: opacity .45s; pointer-events: none; }
.project-card:hover .project-photo:after { opacity: 1; }
.project-photo>img { transition: transform 1.1s var(--ease-out), filter .5s; }
.project-card:hover .project-photo>img { transform: scale(1.08); }
.project-photo>span { border-radius: 50%; z-index: 1; }

/* Tool cards: glass panels with an accent edge that lights up. */
.tools-grid { gap: 16px; border: 0; }
.tool-card { border: 1px solid #ffffff1f !important; border-radius: 14px; background: linear-gradient(160deg, #ffffff12, #ffffff05); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  overflow: hidden; transition: transform .45s var(--ease-out), border-color .3s, background .3s; }
.tool-card:hover { transform: translateY(-6px); border-color: #f7761f80 !important; background: linear-gradient(160deg, #f7761f1f, #ffffff08); }
.tool-card:after { content: ''; position: absolute; width: 260px; height: 260px; right: -110px; top: -110px; background: var(--glow); opacity: 0; transition: opacity .45s; pointer-events: none; }
.tool-card:hover:after { opacity: 1; }

/* About image and brochure: rounded frames. */
.about-visual img, .about-image-note, .brochure-card, .share-card, .contact-form-card, .recruitment-card { border-radius: 12px; }
.about-visual img { box-shadow: 0 40px 80px -40px #0a162880; }
.about-image-frame { border-color: #f7761f66; border-radius: 14px; }

/* Partners: calm grayscale wall that comes to life on hover. */
.partner-item { border-radius: 12px; border-color: #e3e8ef; transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), border-color .3s; }
.partner-logo img { filter: grayscale(1); opacity: .72; transition: filter .45s, opacity .45s, transform .45s var(--ease-out); }
.partner-item:hover { transform: translateY(-4px); border-color: #f7c9a6; box-shadow: 0 24px 40px -26px #0a162859; }
.partner-item:hover .partner-logo img { filter: none; opacity: 1; transform: scale(1.04); }

/* Inner page mastheads: night-blue band like the hero. */
.page-masthead { position: relative; isolation: isolate; }

/* Reading progress bar, driven by the page scroll where supported. */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    body:not(.motion-paused):before { content: ''; position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; transform-origin: 0 50%;
      background: linear-gradient(90deg, #f7761f, #ffb36b); animation: pe-progress linear both; animation-timeline: scroll(root); }
    [dir=rtl] body:not(.motion-paused):before { transform-origin: 100% 50%; }
    /* Gentle parallax on large photographs. */
    body:not(.motion-paused) .why-section>img, body:not(.motion-paused) .project-photo>img { animation: pe-parallax linear both; animation-timeline: view(); animation-range: cover; }
    body:not(.motion-paused) .project-card:hover .project-photo>img { animation: none; }
  }
}
@keyframes pe-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pe-parallax { from { transform: translateY(-4%) scale(1.1); } to { transform: translateY(4%) scale(1.1); } }

/* Slow drift of the hero halo. */
@media (prefers-reduced-motion: no-preference) {
  body:not(.motion-paused) .hero-grid:after { animation: pe-halo 14s ease-in-out infinite alternate; }
  body:not(.motion-paused) .hero-bottom:before { animation: pe-cue 2.4s ease-in-out infinite; }
}
@keyframes pe-halo { to { transform: translate(-60px, 50px) scale(1.12); } }
@keyframes pe-cue { 0%, 100% { opacity: .2; transform: scaleY(.4); transform-origin: top; } 50% { opacity: 1; transform: scaleY(1); } }

@media (prefers-reduced-motion: reduce) {
  .pole-card, .service-card, .project-card, .tool-card, .partner-item, .button, .header-cta { transition: none; }
  .pole-card:hover, .service-card:hover, .project-card:hover, .tool-card:hover, .partner-item:hover, .button:hover, .header-cta:hover { transform: none; }
}

/* Small screens: keep the hero compact and the cards in one column flow. */
@media (max-width: 760px) {
  .hero { min-height: auto; }
  .hero h1 { font-size: clamp(40px, 11vw, 56px); }
  .hero-bottom:before { display: none; }
  .pole-strip { top: -32px; margin-bottom: -32px; gap: 10px; }
  .hero-grid:after { width: 380px; height: 380px; }
}
.why-grid h2 { font-size: clamp(30px, 2.8vw, 42px); line-height: 1.15; letter-spacing: -.03em; }

/* ===== Spectacular hero: the logo building, drawn as a plan then built floor by floor ===== */
/* Logo blue joins night blue and the warm accent; photographs stay as a dimmed backdrop. */
.hero { background: radial-gradient(ellipse at 72% 45%, #1e53a559, transparent 55%), var(--night); }
.hero-media { opacity: .42; filter: saturate(.7); }
.hero-shade { background: radial-gradient(circle at 74% 40%, #f7761f1f, transparent 30%),
  linear-gradient(90deg, #0a1628f5 0%, #0a1628d9 40%, #0a162899 70%, #0a162866), linear-gradient(0deg, #0a1628e6, transparent 45%); }
.hero-grid { background-image: linear-gradient(#3b7bf026 1px, transparent 1px), linear-gradient(90deg, #3b7bf026 1px, transparent 1px),
  linear-gradient(#3b7bf00f 1px, transparent 1px), linear-gradient(90deg, #3b7bf00f 1px, transparent 1px);
  background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px; background-position: center; }
.hero h1 { font-size: clamp(44px, 5.6vw, 84px); }
.hero-copy { position: relative; z-index: 2; }

.hero-emblem { position: absolute; z-index: 1; right: max(2vw, calc((100vw - 1260px) / 2 - 40px)); top: 50%; width: min(52vw, 760px); transform: translateY(-54%); pointer-events: none; }
[dir=rtl] .hero-emblem { right: auto; left: max(2vw, calc((100vw - 1260px) / 2 - 40px)); }
.hero-emblem:before { content: ''; position: absolute; inset: 8% 10% 22%; border-radius: 50%; background: radial-gradient(circle, #3b7bf04d, transparent 65%); filter: blur(20px); }
.hero-emblem svg { position: relative; display: block; width: 100%; height: auto; overflow: visible; }
.pe-face { fill: url(#pe-face-grad); }
.pe-side { fill: url(#pe-side-grad); }
.pe-line { fill: none; stroke: #8fb6ff; stroke-width: .7; stroke-linejoin: round; opacity: .55; }
.pe-guide { fill: none; stroke: #8fb6ff; stroke-width: .5; opacity: .45; }
.pe-guides .g1 { stroke: var(--accent); opacity: .7; stroke-width: .8; }
.pe-reflect { opacity: .9; }
.pe-scan { opacity: 0; }
.pe-floor { filter: drop-shadow(0 6px 10px #0a162880); }

@media (prefers-reduced-motion: no-preference) {
  /* 1. The plan is drawn. */
  .pe-guide, .pe-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: pe-draw 1.1s cubic-bezier(.65, 0, .35, 1) forwards; }
  .pe-guides .g1 { animation-delay: .1s; } .pe-guides .g2 { animation-delay: .35s; } .pe-guides .g3 { animation-delay: .5s; } .pe-guides .g4 { animation-delay: .65s; }
  .pe-line.l1 { animation-delay: .3s; } .pe-line.l2 { animation-delay: .45s; } .pe-line.l3 { animation-delay: .6s; }
  .pe-line.l4 { animation-delay: .75s; } .pe-line.l5 { animation-delay: .9s; } .pe-line.l6 { animation-delay: 1.05s; }
  /* 2. The building rises, floor by floor. */
  .pe-floor { opacity: 0; transform-box: fill-box; transform-origin: 50% 100%; animation: pe-rise .9s var(--ease-out) forwards; }
  .pe-floor.f1 { animation-delay: 1.5s; } .pe-floor.f2 { animation-delay: 1.68s; } .pe-floor.f3 { animation-delay: 1.86s; }
  .pe-floor.f4 { animation-delay: 2.04s; } .pe-floor.f5 { animation-delay: 2.22s; } .pe-floor.f6 { animation-delay: 2.4s; }
  /* 3. A warm scan validates the work, then the building breathes. */
  .pe-scan { animation: pe-scan 1.6s cubic-bezier(.65, 0, .35, 1) 3s forwards; }
  .pe-plan { animation: pe-plan-fade 1s ease 2.8s forwards; }
  body:not(.motion-paused) .hero-emblem svg { animation: pe-float 7s ease-in-out 4.6s infinite alternate; }
  body:not(.motion-paused) .hero-emblem:before { animation: pe-pulse 5s ease-in-out 3s infinite alternate; }
  body.motion-paused .pe-guide, body.motion-paused .pe-line, body.motion-paused .pe-floor, body.motion-paused .pe-scan, body.motion-paused .pe-plan { animation-duration: .01s; animation-delay: 0s; }
}
@keyframes pe-draw { to { stroke-dashoffset: 0; } }
@keyframes pe-rise { from { opacity: 0; transform: translateY(26px) scaleY(.6); } to { opacity: 1; transform: none; } }
@keyframes pe-scan { 0% { opacity: 0; transform: translateY(130px); } 15% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(-4px); } }
@keyframes pe-plan-fade { to { opacity: .35; } }
@keyframes pe-float { from { transform: translateY(0); } to { transform: translateY(-10px); } }
@keyframes pe-pulse { from { opacity: .7; transform: scale(.96); } to { opacity: 1; transform: scale(1.06); } }

@media (max-width: 1080px) { .hero-emblem { width: min(44vw, 520px); opacity: .9; } }
@media (max-width: 760px) {
  .hero-emblem { top: 20px; right: -14vw; width: 96vw; transform: none; opacity: .4; }
  [dir=rtl] .hero-emblem { left: -12vw; }
  .hero-emblem:before { display: none; }
}
