/* Iron Fox Universe — page-specific 3D design layer */
:root{--if-orange:#ff641e;--if-amber:#ff9a52;--if-void:#07090d;--if-panel:rgba(18,22,29,.78);--if-line:rgba(255,112,48,.24)}
html{background:var(--if-void);scroll-behavior:smooth}body{position:relative;isolation:isolate;overflow-x:hidden;background:radial-gradient(ellipse at 50% -15%,rgba(255,100,30,.16),transparent 44%),radial-gradient(ellipse at 90% 55%,rgba(65,76,100,.13),transparent 36%),#07090d!important;color:#f5f5f6!important}body:before{content:"";position:fixed;inset:0;z-index:-2;pointer-events:none;background-image:linear-gradient(rgba(255,255,255,.018) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.018) 1px,transparent 1px);background-size:54px 54px;mask-image:linear-gradient(to bottom,black,transparent 85%)}body:after{content:"";position:fixed;z-index:-1;pointer-events:none;width:38vw;height:38vw;min-width:280px;min-height:280px;right:-13vw;top:20vh;border:1px solid rgba(255,100,30,.12);border-radius:50%;box-shadow:0 0 0 42px rgba(255,100,30,.025),0 0 0 90px rgba(255,100,30,.018),inset 0 0 90px rgba(255,100,30,.035);animation:if-orbit 42s linear infinite}
@keyframes if-orbit{to{transform:rotate(360deg)}}
header{background:rgba(7,9,13,.78)!important;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);border-bottom:1px solid rgba(255,255,255,.08)!important;box-shadow:0 12px 40px rgba(0,0,0,.2)}header nav{max-width:1320px!important;gap:18px}header .logo,.logo,.brand{letter-spacing:.04em}header .menu a,nav .menu a{position:relative;transition:color .25s ease,text-shadow .25s ease}header .menu a:hover,nav .menu a:hover{color:var(--if-orange)!important;text-shadow:0 0 18px rgba(255,100,30,.4)}header .menu a:after,nav .menu a:after{content:"";position:absolute;left:0;right:100%;bottom:-8px;height:2px;background:var(--if-orange);transition:right .25s ease}header .menu a:hover:after,nav .menu a:hover:after{right:0}
.hero,.games-container,.about,.contacts,.timeline,.game-page,.profile-page{position:relative;z-index:1}.hero{padding-top:clamp(70px,10vw,140px)!important;padding-bottom:clamp(50px,8vw,100px)!important}.hero h1,.hero h2,.section-heading h2,.games-container h2,.contacts h2,.about h2{letter-spacing:-.045em;text-wrap:balance}.hero h1 em,.hero h2 em,.section-heading em{color:var(--if-orange);font-style:normal;text-shadow:0 0 34px rgba(255,100,30,.15)}
.games{padding:clamp(30px,6vw,82px) 0!important}.games-container,.project,.contact-card,.profile-panel,.game-card,.card{background:linear-gradient(145deg,rgba(31,35,43,.9),rgba(11,13,18,.9))!important;border:1px solid rgba(255,255,255,.1)!important;box-shadow:0 20px 70px rgba(0,0,0,.28),inset 0 1px rgba(255,255,255,.045)!important;backdrop-filter:blur(14px)}.games-container{max-width:1240px!important;width:min(92%,1240px)!important;border-radius:26px!important;padding:clamp(18px,4vw,48px)!important;position:relative;overflow:hidden}.games-container:before,.project:before,.contact-card:before{content:"";position:absolute;top:0;left:8%;right:8%;height:1px;background:linear-gradient(90deg,transparent,rgba(255,100,30,.65),transparent)}.games-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(14px,2.2vw,28px)!important}.game-card{display:block!important;position:relative;width:auto!important;min-width:0;border-radius:20px!important;overflow:hidden;text-decoration:none;color:#fff!important;transform-style:preserve-3d;transition:transform .35s ease,border-color .35s ease,box-shadow .35s ease!important}.game-card:hover{transform:translateY(-8px) perspective(900px) rotateX(2deg)!important;border-color:rgba(255,100,30,.55)!important;box-shadow:0 24px 60px rgba(0,0,0,.5),0 0 35px rgba(255,100,30,.09)!important}.game-card img{display:block;width:100%;height:clamp(160px,20vw,270px);object-fit:cover;transition:transform .6s ease,filter .4s ease;filter:saturate(.86)}.game-card:hover img{transform:scale(1.045);filter:saturate(1.08)}.game-card h3{padding:18px 18px 4px;color:#fff!important;font-size:clamp(18px,2vw,23px)}.game-card p{padding:0 18px 20px;color:#aeb4c0!important}.game-card-link:focus-visible,a:focus-visible,button:focus-visible{outline:2px solid var(--if-orange);outline-offset:4px}
.about,.contacts{max-width:1180px!important;width:calc(100% - 40px);margin:clamp(32px,6vw,90px) auto!important;padding:clamp(22px,5vw,64px)!important;border:1px solid rgba(255,255,255,.1);border-radius:28px;background:linear-gradient(145deg,rgba(22,26,33,.88),rgba(8,10,14,.8))!important;box-shadow:0 25px 90px rgba(0,0,0,.28),inset 0 1px rgba(255,255,255,.04);overflow:hidden}.about{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:clamp(24px,5vw,70px)}.about-image{width:100%;max-height:540px;object-fit:cover;border-radius:20px;border:1px solid rgba(255,100,30,.25);box-shadow:0 20px 70px rgba(0,0,0,.4);transform:perspective(1000px) rotateY(-3deg);transition:transform .5s ease}.about-image:hover{transform:perspective(1000px) rotateY(0) translateY(-4px)}.about h2{font-size:clamp(20px,2.4vw,32px)!important;line-height:1.55!important;font-weight:500}.contacts h2{text-align:center;font-size:clamp(36px,6vw,66px)!important;margin-bottom:clamp(24px,4vw,48px)!important}.contact-container{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}.contact-card{position:relative;padding:clamp(22px,4vw,38px)!important;border-radius:20px!important;overflow:hidden;transition:transform .3s ease,border-color .3s ease}.contact-card:hover{transform:translateY(-5px);border-color:rgba(255,100,30,.45)!important}.contact-card h3{font-size:23px;margin-bottom:14px}.contact-card p{color:#b7bdc8;margin-bottom:22px;overflow-wrap:anywhere}.contact-btn,.btn,.back,.button{background:linear-gradient(135deg,#ff7a32,#e94b12)!important;color:#fff!important;border:1px solid rgba(255,255,255,.16)!important;border-radius:12px!important;box-shadow:0 8px 28px rgba(255,86,25,.16);transition:transform .25s ease,filter .25s ease,box-shadow .25s ease}.contact-btn:hover,.btn:hover,.back:hover,.button:hover{transform:translateY(-2px);filter:brightness(1.08);box-shadow:0 12px 34px rgba(255,86,25,.25)}
.timeline{width:min(1100px,calc(100% - 36px))!important}.project{position:relative;overflow:hidden;border-radius:24px!important;padding:clamp(20px,4vw,38px)!important}.project h2{color:var(--if-orange)!important}.gallery img{border:1px solid rgba(255,255,255,.12);box-shadow:0 12px 34px rgba(0,0,0,.24)}.status{background:rgba(255,100,30,.14)!important;border:1px solid rgba(255,100,30,.4);color:#ffb184}.progress-bar{background:#252932!important}.progress-fill{background:linear-gradient(90deg,#ff641e,#ffb16e)!important;box-shadow:0 0 18px rgba(255,100,30,.4)}footer{position:relative;z-index:1;border-top:1px solid rgba(255,255,255,.08);background:rgba(5,7,10,.45);color:#858b97!important}footer a{color:var(--if-orange)}
/* Project details and account pages */.game-page,.profile-page{width:min(1180px,calc(100% - 36px));margin:36px auto}.game-page h1,.profile-page h1{letter-spacing:-.05em}.download,.profile-panel{border-radius:24px!important}.download-btn{background:linear-gradient(135deg,#ff7a32,#e94b12)!important;border-radius:12px!important}
.if-page-intro{position:relative;z-index:1;max-width:1180px;margin:clamp(44px,8vw,100px) auto 12px;padding:0 24px}.if-page-intro .if-kicker{display:inline-flex;align-items:center;gap:10px;color:#ff9a69;font:700 11px/1.4 ui-monospace,monospace;letter-spacing:.2em;text-transform:uppercase}.if-page-intro .if-kicker:before{content:"";width:26px;height:1px;background:var(--if-orange)}.if-page-intro h1{font-size:clamp(44px,8vw,100px);line-height:.98;letter-spacing:-.065em;margin:18px 0;color:#f7f7f8}.if-page-intro h1 span{color:var(--if-orange);text-shadow:0 0 35px rgba(255,100,30,.18)}.if-page-intro p{max-width:620px;color:#aeb4c0;font-size:clamp(15px,1.6vw,19px);line-height:1.7}.if-scene-tag{position:absolute;right:24px;top:15px;color:rgba(255,255,255,.35);font:10px ui-monospace,monospace;letter-spacing:.18em}
@media(max-width:760px){body:after{width:75vw;height:75vw;right:-35vw;top:32vh}.games-grid{grid-template-columns:1fr!important}.game-card img{height:clamp(190px,58vw,330px)}.about{grid-template-columns:1fr!important}.about-image{max-height:340px;transform:none}.contact-container{grid-template-columns:1fr}.if-page-intro{margin-top:48px}.if-scene-tag{display:none}header nav{flex-wrap:wrap;padding:12px 16px!important}header .menu,nav .menu{margin-left:0!important;gap:14px!important;flex-wrap:wrap;justify-content:center}header .logo,.logo{font-size:20px!important}.games-container{width:calc(100% - 24px)!important;padding:16px!important}.project .gallery{flex-wrap:wrap}.project .gallery img{width:100%;height:220px}.contacts,.about{width:calc(100% - 24px);padding:22px!important;border-radius:20px!important}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

/* Mobile-first finishing pass: safe spacing, readable headings, touch targets and lighter 3D decoration. */
html { -webkit-text-size-adjust: 100%; }
body { width: 100%; max-width: 100%; overflow-x: clip; }
img, video, canvas, svg { max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
a, button, input, select, textarea { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--orange, #ff5a1f); outline-offset: 3px; }

@media (max-width: 760px) {
  .site-header, header { max-width: 100%; }
  .nav-links { max-width: 100vw; }
  .section-heading { min-width: 0; }
  .section-heading h1, .section-heading h2, .hero h1,
  .page-hero h1, .universe-hero h1, .if-hero h1 {
    overflow-wrap: anywhere;
    hyphens: auto;
  }
  .project-grid, .capability-grid, .game-grid, .cards-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .project-card, .project-card:last-child {
    grid-column: auto !important;
    min-width: 0;
  }
  .button, .nav-cta, .round-arrow, .menu-toggle {
    min-height: 44px;
  }
  .hero-actions { max-width: 100%; }
  .hero-actions > * { max-width: 100%; }
  .section-wrap, main, .page-content { min-width: 0; }
  .if-3d-ambient, .portal-ring, .portal-orbit { pointer-events: none; }
}
@media (max-width: 480px) {
  .site-header { padding-left: 14px; padding-right: 14px; }
  .brand { gap: 8px; letter-spacing: .14em; }
  .brand small { letter-spacing: .28em; }
  .section-wrap { padding-left: 16px; padding-right: 16px; }
  .section-heading h1, .section-heading h2 { font-size: clamp(2.25rem, 12vw, 3.6rem); }
  .project-card, .project-card:last-child { min-height: 330px; }
  .project-info { padding: 18px; }
  .project-info h3 { font-size: clamp(1.8rem, 9vw, 2.3rem); }
  .project-info p { max-width: 100%; }
  footer { padding-left: 16px; padding-right: 16px; overflow-wrap: anywhere; }
  .nav-links { padding-left: 16px; padding-right: 16px; }
}
@media (hover: none) and (pointer: coarse) {
  .project-card:hover img, .button:hover { transform: none; }
}
@media (max-width: 760px), (prefers-reduced-motion: reduce) {
  .if-3d-ambient { opacity: .55; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
