/*
Theme Name: Ahan Folad Forge
Version: 1.3.7
Description: پوسته فارسی سینمایی آهن و فولاد با صحنه سه‌بعدی وابسته به اسکرول.
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: ahan-folad-forge
*/
:root{color-scheme:dark;--ground:#0b1428;--ink:#ffffff;--muted:#dce3ef;--burgundy:#922749;--burgundy-deep:#731d39;--accent:#ffc1d2;--line:#dce3ef47;--gutter:clamp(1.2rem,6vw,7rem)}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--ground);color:var(--ink);font:400 1rem/1.8 Tahoma,Arial,sans-serif}
a{color:inherit} img{max-width:100%;height:auto}
:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.skip-link{position:fixed;z-index:8;top:.5rem;right:.5rem;padding:.5rem 1rem;background:#fff;color:#000;transform:translateY(-150%)}
.skip-link:focus{transform:none}
.site-header{z-index:5;background:#0b1428;border-bottom:1px solid var(--line)}
.home .site-header{position:fixed;inset:0 0 auto;background:linear-gradient(#0b1428f5,#0b1428e6);backdrop-filter:blur(12px)}
.admin-bar.home .site-header{top:32px}
.header-inner{min-height:72px;margin:0 var(--gutter);display:flex;justify-content:space-between;align-items:center;gap:1rem}
.brand,.pill{display:inline-flex;align-items:center;gap:.65rem;text-decoration:none}
.brand{font-weight:800;gap:.7rem}
.brand-name{font-size:1.1rem;white-space:nowrap}
.brand-mark{position:relative;display:grid;place-items:center;flex:none;width:44px;height:44px;overflow:hidden;background:linear-gradient(145deg,#a83458,#5e1733);border:1px solid #ffcad455;border-radius:11px;box-shadow:inset 0 1px #ffffff22}
.brand-mark::before,.brand-mark i{width:21px;height:24px;clip-path:polygon(0 0,100% 0,100% 23%,65% 23%,65% 77%,100% 77%,100% 100%,0 100%,0 77%,35% 77%,35% 23%,0 23%);transform:rotate(-24deg)}
.brand-mark::before{content:"";position:absolute;background:#401025;translate:3px 2px}
.brand-mark i{position:relative;background:linear-gradient(135deg,#fff 25%,#f4dce6 67%,#bda9bd)}
.nav ul{list-style:none;display:flex;flex-wrap:wrap;justify-content:center;gap:clamp(.6rem,2vw,2rem);margin:0;padding:0}
.nav a{display:block;text-decoration:none;font-size:.88rem;color:var(--muted)}
.nav a:hover,.nav .current-menu-item>a{color:var(--accent)}
.pill{border:1px solid var(--line);border-radius:99px;padding:.55rem 1rem;transition:background .25s,color .25s}
.pill:hover,.pill.primary{background:var(--burgundy);color:var(--ink);border-color:var(--accent)}
.pill.primary:hover{background:var(--burgundy-deep)}
.pill span{font-family:Arial,sans-serif}
.forge-story{position:relative;isolation:isolate}
.forge-stage{position:sticky;top:0;height:100svh;margin-bottom:-100svh;pointer-events:none;z-index:-1;overflow:hidden;background:radial-gradient(ellipse at 42% 50%,#69213c,#17233d 48%,#0b1428 82%)}
.forge-stage::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent 35%,#0b14286b 68%,#0b1428e6),radial-gradient(ellipse at 50% 50%,transparent 42%,#0b1428a1);pointer-events:none}
.forge-canvas,.forge-grid{position:absolute;inset:0;width:100%;height:100%}
.forge-grid{display:grid;grid-template-columns:repeat(5,1fr);padding-inline:var(--gutter);opacity:.55}
.forge-grid i{position:relative;border-inline-start:1px solid #dce3ef20}
.forge-grid i::before{content:"";position:absolute;top:var(--dot-y,45%);inset-inline-start:-2px;width:4px;height:4px;border-radius:50%;background:var(--accent);box-shadow:0 0 8px var(--accent)}
.forge-fallback{position:absolute;left:40%;top:49%;width:min(32vw,420px);height:min(29vw,340px);background:linear-gradient(125deg,#29354b,#dce3ef 28%,#626d84 48%,#ffffff 66%,#3f4c65);clip-path:polygon(0 0,100% 0,100% 19%,60% 19%,60% 81%,100% 81%,100% 100%,0 100%,0 81%,40% 81%,40% 19%,0 19%);transform:translate(-50%,-50%) rotate(-28deg)}
.has-forge-renderer .forge-fallback{display:none}
.forge-progress{position:sticky;top:83px;z-index:3;margin:0 var(--gutter) -16px;display:grid;grid-template-columns:repeat(6,1fr);gap:8px}
.admin-bar .forge-progress{top:115px}
.forge-progress a{display:flex;height:16px;align-items:center;background:linear-gradient(#ffffff38,#ffffff38) center/100% 2px no-repeat}
.forge-progress i{height:2px;width:100%;transform:scaleX(var(--progress,0));transform-origin:right center;background:var(--accent);pointer-events:none}
.forge-progress a[aria-current]{background-image:linear-gradient(var(--burgundy),var(--burgundy))}
.forge-chapter{min-height:100svh;display:flex;align-items:center;position:relative;padding:8rem var(--gutter) 5rem;scroll-margin-top:0}
.chapter-copy{max-width:min(43%,620px);text-shadow:0 2px 14px #000b}
.chapter-about .chapter-copy,.chapter-rebar .chapter-copy,.chapter-contact .chapter-copy{margin-inline-start:auto}
.chapter-copy h1,.chapter-copy h2{margin:0;font-size:clamp(2.2rem,5.5vw,6.9rem);letter-spacing:-.065em;font-weight:800;line-height:1.2;text-wrap:balance}
.chapter-copy h1 em{display:block;margin-top:.12em;color:var(--accent);font-style:normal}
.chapter-copy p:not(.chapter-kicker){color:var(--muted);max-width:42ch;margin:1.35rem 0}
.chapter-kicker{margin:0 0 1.1rem;text-align:right;font:500 .74rem/1.5 Georgia,serif;letter-spacing:.18em;color:var(--accent)}
.chapter-scroll{display:table;margin-block-start:1rem;text-decoration:underline;text-underline-offset:.25em;font-size:.86rem;color:var(--muted)}
.chapter-scroll span{margin-inline-start:.6rem}
.forge-products{margin:1.5rem 0 0}
.forge-products>div{padding:.63rem 0;border-top:1px solid var(--line);display:grid;grid-template-columns:1fr 1.65fr;gap:1rem}
.forge-products dt{font-weight:700}
.forge-products dd{margin:0;color:var(--muted);font-size:.88rem}
.contact-actions{display:flex;flex-wrap:wrap;gap:.6rem}

.reading{width:min(90%,900px);margin:auto;padding:4rem 0;overflow-wrap:anywhere}
.entry+.entry{border-top:1px solid var(--line);margin-top:2rem;padding-top:2rem}
.entry a,.reading nav a{color:var(--accent)}
@media(max-width:782px){.admin-bar.home .site-header{top:46px}.admin-bar .forge-progress{top:129px}}
@media(max-width:650px){
  .header-inner{min-height:98px;flex-wrap:wrap;gap:.25rem .7rem;padding:.45rem 0}
  .header-quote,.nav a{font-size:.75rem}
  .nav{order:3;width:100%;padding-bottom:.25rem}
  .forge-progress{top:102px}.admin-bar .forge-progress{top:148px}
  .forge-chapter{min-height:100svh;align-items:flex-end;padding:7rem var(--gutter) 9svh}
  .chapter-copy{max-width:100%;width:100%;padding:1.05rem;background:linear-gradient(140deg,#0b1428fa,#15223be8);border-top:1px solid var(--line)}
  .chapter-copy h1,.chapter-copy h2{font-size:clamp(2rem,10vw,3.7rem)}
  .forge-fallback{top:37%;left:50%;width:53vw;height:40vw}
}
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}.pill{transition:none}
  .forge-chapter{min-height:95svh}
}

.forge-facts{display:flex;flex-wrap:wrap;gap:1.25rem;margin:1.5rem 0}
.forge-facts div{border-inline-start:2px solid var(--burgundy);padding-inline-start:.75rem}
.forge-facts dt{font-size:1.45rem;font-weight:bold;color:var(--accent)}
.forge-facts dd{margin:0;color:var(--muted);font-size:.87rem}
.chapter-source{font-size:.84rem;color:var(--accent);text-underline-offset:.24em}
.chapter-about h2{font-size:clamp(2rem,4.4vw,5.5rem)}
.chapter-copy p.chapter-manager{border-inline-start:2px solid var(--burgundy);padding-inline-start:.65rem;color:var(--ink);font-size:.95rem}
.chapter-manager strong{color:var(--accent);margin-inline-start:.2em}
@media(max-width:650px){.forge-facts{margin:.85rem 0}.forge-chapter{padding-bottom:5svh}.chapter-copy p:not(.chapter-kicker){margin:.8rem 0}.chapter-about .chapter-copy{margin-top:25svh}}
@media(max-width:650px){.brand-mark{width:36px;height:36px}.brand-name{font-size:1rem}}

/* Shared visual treatment for the company profile and product chapters. */
:root{--ground:#0a1222;--muted:#d0d7e3;--burgundy:#832541;--accent:#f2ccda;--line:#dce3ef36}
.site-header,.home .site-header{background:#0c1629;border-bottom:1px solid #dce3ef30;backdrop-filter:none}
.header-inner{min-height:78px}
.brand-mark{border-radius:6px;background:linear-gradient(145deg,#90304f,#53192f);box-shadow:none}
.brand-name{font-weight:800}
.nav a{padding:.35rem .15rem;font-weight:600}
.pill{min-height:44px;border-radius:5px;padding:.5rem 1rem;font-weight:700}
.pill.primary,.pill:hover{border-color:#c97e98}
.chapter-scroll,.chapter-source{display:table;width:fit-content;min-height:28px;color:var(--accent);text-underline-offset:.27em}
.chapter-scroll:hover,.chapter-source:hover{color:var(--ink)}
.forge-stage{background:radial-gradient(ellipse at 47% 46%,#492138 0%,#16223a 43%,#0a1222 79%)}
.forge-stage::after{background:radial-gradient(ellipse at 50% 50%,transparent 29%,#0a1222a1 87%)}
.forge-grid{opacity:.25}
.forge-progress{top:87px;gap:12px}
.admin-bar .forge-progress{top:119px}
.forge-chapter{padding-block:7.5rem 4rem}
.chapter-copy{
  width:min(46%,39rem);
  max-width:none;
  padding:clamp(1.35rem,3vw,2.8rem);
  border:1px solid var(--line);
  border-block-start:2px solid #a54866;
  border-radius:6px;
  background:linear-gradient(145deg,#101b30f5,#0d172bed);
  box-shadow:0 18px 44px #0002;
  text-shadow:none;
}
.chapter-copy h1,.chapter-copy h2{font-size:clamp(1.9rem,3.7vw,4.25rem);line-height:1.32;letter-spacing:-.035em}
.chapter-copy h1 em{margin-block-start:.55rem;font-size:.56em;color:#e7b2c4;letter-spacing:0;line-height:1.5}
.chapter-copy p:not(.chapter-kicker){max-width:56ch;margin:.85rem 0;line-height:1.95}
.chapter-intro .pill{margin-block-start:.25rem}
.forge-facts{display:grid;grid-template-columns:1fr 1fr;gap:1px;margin:1.15rem 0;background:var(--line);border:1px solid var(--line);border-radius:4px;overflow:hidden}
.forge-facts div{background:#121f35;border:0;padding:.7rem .85rem}
.forge-facts dt{font-size:1.55rem;line-height:1.35;font-variant-numeric:tabular-nums}
.forge-facts dd{margin-block-start:.25rem;line-height:1.55}
.contact-actions{margin-block-start:1.15rem}
.site-footer{border-top:1px solid var(--line);background:#0d172a}
.footer-inner{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:1.25rem;margin-inline:var(--gutter);padding-block:1.75rem}
.footer-brand,.footer-inner nav{display:flex;align-items:center;gap:1rem}
.footer-brand strong,.footer-brand span:not(.brand-mark){display:block}
.footer-brand span:not(.brand-mark),.footer-inner nav{font-size:.85rem;color:var(--muted)}
.footer-inner nav{flex-wrap:wrap}
.footer-inner nav a{text-underline-offset:.28em}
.hero-actions,.product-index{display:flex;flex-wrap:wrap;gap:.6rem}
.hero-actions .pill{margin-block-start:0}
.product-index{margin-block-start:1.2rem;padding-block-start:.85rem;border-block-start:1px solid var(--line)}
.product-index a{padding:.25rem .55rem;min-height:32px;color:var(--muted);font-size:.87rem;text-underline-offset:.25em}
.product-index a:hover{color:var(--ink)}
.product-details,.order-steps{margin:1rem 0 1.15rem;padding:0;border-block-start:1px solid var(--line)}
.product-details>div,.order-steps>li{display:grid;grid-template-columns:minmax(6rem,.72fr) minmax(0,1.35fr);gap:.7rem;padding:.66rem 0;border-block-end:1px solid var(--line);font-size:.88rem;line-height:1.72}
.product-details dt,.order-steps strong{font-weight:700;color:var(--ink)}
.product-details dd,.order-steps span{margin:0;color:var(--muted)}
.chapter-source span{margin-inline-start:.3rem}
@media(max-width:782px){.admin-bar .forge-progress{top:133px}}
@media(max-width:760px){
  .header-inner{min-height:98px;flex-wrap:wrap;gap:.25rem .7rem;padding:.45rem 0}
  .header-quote,.nav a{font-size:.78rem}
  .nav{order:3;width:100%;padding-bottom:.15rem}
  .forge-progress{top:103px;gap:7px}
  .admin-bar .forge-progress{top:149px}
  .forge-chapter{align-items:flex-end;padding-block:38svh 5svh}
  .chapter-copy{width:100%;padding:1.15rem}
  .chapter-copy h1,.chapter-copy h2{font-size:clamp(1.85rem,7.6vw,2.8rem)}
  .chapter-about .chapter-copy{margin-top:0}
  .forge-fallback{top:29%;left:50%;width:53vw;height:40vw}
}

:root{--ground:#09090d;--muted:#d5d7e2;--burgundy:#b21735;--accent:#ffb9c3;--line:#dce3ef38;--signal:#ff3552}
.site-header,.home .site-header,.site-footer{background:#0b0b10}
.brand-mark{background:#181117;border-color:#d3455c}
.brand-mark::before{background:#711021}
.brand-mark i{background:linear-gradient(145deg,#fff 25%,#ffd5dc 72%,#df7183)}
.nav a:hover,.nav .current-menu-item>a{color:var(--accent)}
.pill.primary{background:#c51134;border-color:#ef5168;color:#fff}
.pill.primary:hover{background:#a8102d;border-color:var(--signal)}
.pill:not(.primary):hover{border-color:var(--signal)}
:focus-visible{outline-color:var(--signal)}
.forge-stage{background:radial-gradient(ellipse at 33% 45%,#551d2c 0%,#171c2e 35%,#09090d 78%)}
.forge-stage::after{background:radial-gradient(ellipse at 50% 50%,transparent 32%,#09090dc4 92%)}
.forge-progress i{background:var(--signal)}
.forge-progress a[aria-current]{background-image:linear-gradient(#86172b,#86172b)}
.chapter-copy{background:linear-gradient(145deg,#13151ff7,#10121aed);border-block-start-color:var(--signal)}
.chapter-copy h1 em{color:#ffc5ce}
.forge-facts div{background:#171a26}
.chapter-copy p.chapter-manager{border-inline-start-color:var(--signal)}
.chapter-source:hover,.chapter-scroll:hover{color:#fff}

@media(max-width:760px){
  :root{--gutter:clamp(.85rem,4vw,1.45rem)}
  .header-inner{min-height:98px;padding-block:.35rem}
  .nav{padding:0}
  .nav ul{gap:.1rem .6rem}
  .nav a{display:grid;min-height:40px;place-items:center;padding-inline:.3rem}
  .forge-progress{gap:6px;margin-bottom:-20px}
  .forge-progress a{height:20px}
  .forge-chapter{min-height:100svh;align-items:flex-start;padding-block:clamp(17rem,44svh,24rem) 2rem}
  .chapter-copy{padding:clamp(1rem,4.3vw,1.5rem);overflow-wrap:anywhere;background:#11131cf8}
  .chapter-copy h1,.chapter-copy h2{font-size:clamp(1.65rem,7.2vw,2.7rem)}
  .chapter-copy p:not(.chapter-kicker){line-height:1.9}
  .forge-fallback{top:clamp(11rem,28svh,15rem);width:42vw;height:32vw}
  .product-index a,.footer-inner nav a{display:inline-flex;align-items:center;min-height:44px}
}
@media(max-width:430px){
  .header-quote{padding-inline:.6rem}
  .brand,.footer-brand{gap:.5rem}
  .brand-name{font-size:.94rem}
  .hero-actions>.pill,.contact-actions>.pill{flex:1 1 100%;justify-content:center;text-align:center}
  .product-index{justify-content:space-between;gap:.15rem}
  .product-index a{padding-inline:.2rem}
  .product-details>div,.order-steps>li{grid-template-columns:1fr;gap:.2rem}
  .footer-inner{padding-block:1.25rem;gap:.9rem}
}
@media(max-width:600px){#wpadminbar{position:fixed}}
@media(max-width:760px) and (max-height:480px){
  .forge-chapter{padding-block-start:13rem}
  .forge-fallback{top:9.75rem;width:24vw;height:18vw}
}

@media(max-width:760px){
  .header-inner{display:grid;grid-template-columns:minmax(0,1fr) auto;min-height:0;gap:0 .5rem;padding-block:.38rem 0}
  .header-quote{justify-self:end;min-height:40px;padding:.35rem .7rem}
  .nav{grid-column:1/-1;border-block-start:1px solid #dce3ef24;margin-block-start:.35rem}
  .nav ul{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;justify-content:stretch}
  .nav a{min-height:38px;padding-inline:.12rem;white-space:nowrap}
  .forge-progress{top:92px;margin-bottom:-16px}
  .admin-bar .forge-progress{top:138px}
  .forge-progress a{height:16px}
  .forge-chapter{padding-block-start:clamp(14.75rem,36svh,20rem)}
  .chapter-copy p:not(.chapter-kicker){margin:.65rem 0}
  .hero-actions{margin-block-start:.75rem}
  .product-index{margin-block-start:.65rem;padding-block-start:.3rem}
  .product-index a{text-align:center}
  .forge-fallback{top:clamp(9.75rem,24svh,13rem)}
}
@media(max-width:430px){
  .hero-actions{display:grid;grid-template-columns:1fr}
  .hero-actions .pill{width:100%}
  .hero-actions .pill:not(.primary){min-height:40px}
}
@media(max-width:760px) and (max-height:480px){
  .forge-chapter{padding-block-start:13rem}
  .forge-fallback{top:9.75rem}
}
@media(max-width:760px){
  .forge-stage{
    top:108px;
    height:clamp(8rem,27svh,14rem);
    margin-bottom:0;
    z-index:2;
    border-bottom:1px solid var(--line);
    background:radial-gradient(ellipse at 50% 54%,#512033,#181a2a 55%,#0d0e16 95%);
  }
  .admin-bar .forge-stage{top:154px}
  .forge-stage::after{background:none}
  .forge-fallback{top:50%;width:min(38vw,8rem);height:65%}
  .forge-progress{z-index:3}
  .forge-chapter{
    min-height:0;
    padding-block:1rem 1.5rem;
    scroll-margin-top:calc(108px + clamp(8rem,27svh,14rem));
  }
  .admin-bar .forge-chapter{scroll-margin-top:calc(154px + clamp(8rem,27svh,14rem))}
}
.forge-mobile-model{display:none}
@media(max-width:760px){
  .forge-stage{display:none}
  .forge-story{padding-block-start:108px}
  .admin-bar .forge-story{padding-block-start:154px}
  .forge-chapter,.admin-bar .forge-chapter{scroll-margin-top:110px}
  .admin-bar .forge-chapter{scroll-margin-top:156px}
  .forge-mobile-model{display:block;position:relative;height:clamp(10rem,48vw,15rem);margin-block-end:1rem;overflow:hidden;border-radius:.7rem;background:radial-gradient(ellipse at center,#4c2439,#171a29 65%,#11131c)}
  .forge-mobile-model canvas{display:block;width:100%;height:100%}
  .forge-mobile-model:not(.has-model) canvas{visibility:hidden}
}