/* Plasttec – public site
   Tokens: brand orange from the Plasttec mark, graphite ink, cool polymer greys. */
:root {
  --orange: #E8531F;      /* brand mark, decorative */
  --orange-deep: #B83C10; /* buttons + links: passes AA with white / on white */
  --ink: #1E2328;
  --steel: #59636E;
  --line: #DFE3E8;
  --surface: #F1F3F5;
  --white: #FFFFFF;
  --font-display: "Archivo", "IBM Plex Sans Arabic", "Segoe UI", Arial, sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  --wrap: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.65;
}
[dir="rtl"] body { line-height: 1.85; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange-deep); text-underline-offset: .2em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 1rem; top: -100px; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { top: 1rem; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

h1, h2, h3 { font-family: var(--font-display); font-stretch: 112%; line-height: 1.08; margin: 0 0 .5em; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4.25rem); font-weight: 800; }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.75rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: 0; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { font-family: var(--font-body); font-weight: 700; letter-spacing: 0; line-height: 1.3; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--steel); max-width: 38em; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.5rem; border: 2px solid var(--orange-deep);
  background: var(--orange-deep); color: #fff; font: 600 1rem/1.2 var(--font-body);
  text-decoration: none; border-radius: 4px; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-small { min-height: 40px; padding: .45rem 1rem; font-size: .95rem; }
.btn[disabled] { opacity: .6; cursor: wait; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-row { display: flex; align-items: center; gap: 1.5rem; min-height: var(--header-h); }
.brand img { height: 38px; width: auto; }
.main-nav { margin-inline-start: auto; }
.main-nav ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.main-nav a { display: block; padding: .5rem .7rem; color: var(--ink); text-decoration: none; font-weight: 500; font-size: .98rem; border-radius: 4px; }
.main-nav a:hover, .main-nav a.is-current { color: var(--orange-deep); }
.main-nav a.is-current { box-shadow: inset 0 -2px 0 var(--orange); border-radius: 0; }
.header-actions { display: flex; align-items: center; gap: .75rem; }
.lang-switch { font-weight: 600; text-decoration: none; color: var(--ink); padding: .4rem .6rem; border: 1px solid var(--line); border-radius: 4px; font-size: .95rem; }
.lang-switch:hover { border-color: var(--ink); color: var(--ink); }
.lang-switch[lang="ar"] { font-family: "IBM Plex Sans Arabic", sans-serif; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); background: #fff; border-radius: 4px; cursor: pointer; position: relative; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 11px; right: 11px; height: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
.nav-toggle-bars { top: 21px; }
.nav-toggle-bars::before { left: 0; right: 0; top: -7px; }
.nav-toggle-bars::after { left: 0; right: 0; top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 6rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { max-width: 11em; }
.hero .lead { margin-bottom: 2rem; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-media { position: relative; height: clamp(300px, 46vw, 560px); clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%); background: var(--surface); }
[dir="rtl"] .hero-media { clip-path: polygon(0 0, 86% 0, 100% 100%, 0 100%); }
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s ease; }
.hero-media img.is-active { opacity: 1; }
.hero-stripe { position: absolute; inset: 0; background: var(--orange); clip-path: polygon(14% 0, 18.5% 0, 4.5% 100%, 0 100%); z-index: 2; }
[dir="rtl"] .hero-stripe { clip-path: polygon(86% 0, 81.5% 0, 95.5% 100%, 100% 100%); }

/* Page-load reveal: the one orchestrated motion on the page */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-copy > * { opacity: 0; transform: translateY(14px); animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards; }
  .js .hero-copy > :nth-child(2) { animation-delay: .12s; }
  .js .hero-copy > :nth-child(3) { animation-delay: .24s; }
  .js .hero-media { animation: wipe 1s cubic-bezier(.6,0,.2,1) .15s both; }
  [dir="rtl"].js .hero-media, .js[dir="rtl"] .hero-media { animation-name: wipe-rtl; }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes wipe { from { clip-path: polygon(100% 0, 100% 0, 100% 100%, 86% 100%); } to { clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%); } }
@keyframes wipe-rtl { from { clip-path: polygon(0 0, 0 0, 14% 100%, 0 100%); } to { clip-path: polygon(0 0, 86% 0, 100% 100%, 0 100%); } }

/* Sections */
.section { padding-block: clamp(4rem, 9vw, 7rem); }
.section-head { max-width: 40rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-head p { color: var(--steel); font-size: 1.125rem; margin: 0; }

/* About */
.about { background: var(--surface); }
.about-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 6rem); }
.vision { margin: 2rem 0 0; padding-inline-start: 1.5rem; border-inline-start: 4px solid var(--orange); }
.vision figcaption { font-weight: 600; color: var(--steel); margin-bottom: .5rem; }
.vision blockquote { margin: 0; }
.vision p { font-family: var(--font-display); font-stretch: 100%; font-size: clamp(1.3rem, 2.2vw, 1.65rem); line-height: 1.35; font-weight: 500; margin: 0; }
[dir="rtl"] .vision p { font-family: var(--font-body); line-height: 1.7; }
.about-body { max-width: 38em; }
.about-body h3 { margin-bottom: 1rem; }
.more summary { cursor: pointer; font-weight: 600; color: var(--orange-deep); list-style: none; display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: ""; width: .5em; height: .5em; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-.15em) rotate(45deg); transition: transform .2s; }
.more[open] summary::after { transform: translateY(.1em) rotate(-135deg); }
.more .when-open, .more[open] .when-closed { display: none; }
.more[open] .when-open { display: inline; }
.more[open] summary { order: 2; }
.more[open] { display: flex; flex-direction: column; }

/* Sectors: honeycomb around the Plasttec mark (signature element) */
.sectors-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.flower { position: relative; aspect-ratio: 3 / 2.8868; list-style: none; margin: 0; padding: 0; max-width: 620px; width: 100%; }
.flower > li { position: absolute; width: 33.333%; height: 40%; }
.flower > li:nth-child(1) { top: 0;   inset-inline-start: 16.667%; }
.flower > li:nth-child(2) { top: 0;   inset-inline-start: 50%; }
.flower > li:nth-child(3) { top: 30%; inset-inline-start: 0; }
.flower > li:nth-child(4) { top: 30%; inset-inline-start: 33.333%; }
.flower > li:nth-child(5) { top: 30%; inset-inline-start: 66.667%; }
.flower > li:nth-child(6) { top: 60%; inset-inline-start: 16.667%; }
.flower > li:nth-child(7) { top: 60%; inset-inline-start: 50%; }
.hex { position: absolute; inset: 3%; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--surface); overflow: hidden; }
.hex img { width: 100%; height: 100%; object-fit: cover; }
.hex-label { position: absolute; inset-inline: 0; bottom: 21%; text-align: center; z-index: 1; }
.hex-label span { display: inline-block; background: rgba(255,255,255,.94); color: var(--ink); font-weight: 600; font-size: clamp(.72rem, 1.4vw, .95rem); padding: .2em .7em; border-radius: 3px; }
.hex-mark { background: var(--orange); display: grid; place-items: center; }
.hex-mark img { width: 46%; height: auto; object-fit: contain; }
.hexgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 1rem; list-style: none; margin: 0; padding: 0; }
.hexgrid > li { position: relative; aspect-ratio: 1 / 1.1547; }
.sector-list { display: grid; gap: 1.25rem 2rem; grid-template-columns: 1fr 1fr; margin: 0; }
.sector-list div { border-top: 1px solid var(--line); padding-top: .9rem; }
.sector-list dt { font-weight: 700; margin-bottom: .2rem; }
.sector-list dd { margin: 0; color: var(--steel); font-size: .98rem; }

/* Products */
.products { background: var(--surface); }
.product-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); }
.product-img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--line); margin-bottom: 1.25rem; border-radius: 4px; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product h3 { font-size: 1.6rem; }
[dir="rtl"] .product h3 { font-size: 1.45rem; }
.product p { color: var(--steel); margin: 0; }

/* Technologies */
.tech { background: var(--ink); color: #E9ECEF; }
.tech h2 { color: #fff; }
.tech .section-head p { color: #AEB6BF; }
.tech-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.tech-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2.5rem; margin: 0; }
.tech-item { padding-block: 1.1rem; border-top: 1px solid rgba(255,255,255,.14); }
.tech-item dt { font-weight: 700; color: #fff; font-size: 1.08rem; display: flex; align-items: center; gap: .65rem; margin-bottom: .25rem; }
.tech-item dt::before { content: ""; flex: none; width: 12px; height: 14px; background: var(--orange); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.tech-item dd { margin: 0; color: #AEB6BF; font-size: .98rem; padding-inline-start: calc(12px + .65rem); }

/* Clients */
.logo-wall { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); border-top: 1px solid var(--line); border-inline-start: 1px solid var(--line); }
.logo-wall li { display: grid; place-items: center; aspect-ratio: 3 / 2; padding: 1.1rem; border-bottom: 1px solid var(--line); border-inline-end: 1px solid var(--line); background: #fff; }
.logo-wall img { max-height: 72px; width: auto; max-width: 100%; object-fit: contain; }

/* Contact */
.contact { background: var(--surface); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.contact-list { margin: 2rem 0; display: grid; gap: 1.1rem; }
.contact-list div { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.contact-list dt { font-weight: 600; color: var(--steel); }
.contact-list dd { margin: 0; }
.contact-list a { color: var(--ink); text-decoration-color: var(--orange); }
.map { aspect-ratio: 16 / 10; border-radius: 4px; overflow: hidden; background: var(--line); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.contact-form { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--orange); border-radius: 4px; padding: clamp(1.5rem, 3vw, 2.5rem); }
.contact-form h3 { margin-bottom: 1.25rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: block; margin-bottom: 1rem; }
.field span { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .35rem; }
.field em { color: var(--orange-deep); font-style: normal; }
.field input, .field textarea { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #C5CCD3; border-radius: 4px; padding: .7rem .85rem; min-height: 48px; }
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(232,83,31,.25); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #B42318; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.form-status { margin: 1rem 0 0; font-weight: 500; min-height: 1.5em; }
.form-status.is-ok { color: #146C43; }
.form-status.is-err { color: #B42318; }

/* Footer */
.site-footer { background: #fff; border-top: 1px solid var(--line); padding-block: 2rem; font-size: .95rem; color: var(--steel); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }
.footer-logo { height: 30px; width: auto; }
.site-footer p { margin: 0; }
.social { display: flex; flex-wrap: wrap; gap: 1.25rem; list-style: none; margin: 0 0 0 auto; padding: 0; }
[dir="rtl"] .social { margin: 0 auto 0 0; }
.social a { color: var(--ink); }

.whatsapp { position: fixed; inset-inline-end: 1.25rem; bottom: 1.25rem; z-index: 40; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #128C4A; color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.whatsapp:hover { color: #fff; background: #0E6E3A; }

/* Responsive */
@media (max-width: 1080px) {
  .header-cta { display: none; }
}
@media (max-width: 960px) {
  .nav-toggle { display: inline-block; }
  .main-nav { position: absolute; top: 100%; inset-inline: 0; background: #fff; border-bottom: 1px solid var(--line); display: none; margin: 0; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; padding: .5rem var(--gutter) 1rem; }
  .main-nav a { padding: .8rem 0; border-bottom: 1px solid var(--surface); }
  .main-nav a.is-current { box-shadow: none; }
  .header-actions { margin-inline-start: auto; }
  .hero-grid, .about-grid, .sectors-layout, .tech-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-media { height: clamp(240px, 60vw, 420px); }
  .flower { margin-inline: auto; }
}
@media (max-width: 620px) {
  body { font-size: 1rem; }
  .sector-list, .tech-list, .field-row { grid-template-columns: 1fr; }
  .contact-list div { grid-template-columns: 1fr; gap: .2rem; }
  .logo-wall { grid-template-columns: repeat(3, 1fr); }
  .logo-wall li { padding: .6rem; }
  .social { margin: 0; }
  .brand img { height: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-media img { transition: none; }
}

/* Hide the pre-built page briefly while the latest content loads (removed after at most 1.5 s) */
.pt-loading body { visibility: hidden; }
