/* ==========================================================================
   Omar Duale portfolio · style.css
   Layout inspired by the Picto template, rebuilt in plain CSS (no build step).

   Contents
   1.  Fonts
   2.  Design tokens (colours, type, spacing): edit here to re-theme
   3.  Base / reset
   4.  Utilities & buttons
   5.  Header & navigation
   6.  Hero
   7.  Section headings (shared)
   8.  About
   9.  Process
   10. Portfolio (filters, cards, dialog)
   11. CTA band
   12. Experience timeline
   13. Services
   14. Clients marquee
   15. Contact
   16. Footer & back-to-top
   17. Scroll reveal animation
   18. Responsive breakpoints
   19. Reduced motion & print
   ========================================================================== */

/* 1. Fonts ---------------------------------------------------------------- */
@font-face {
  font-family: "Work Sans";
  src: url("../assets/fonts/work-sans-latin.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Work Sans";
  src: url("../assets/fonts/work-sans-latin-ext.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* 2. Design tokens -------------------------------------------------------- */
:root {
  /* Midnight blue palette (brand) */
  --midnight-900: #0F0E47;  /* deepest: headings, footer, primary hover */
  --midnight-700: #272757;  /* primary: buttons, CTA band */
  --midnight-500: #505081;  /* secondary: links, icons, small accent text */
  --midnight-300: #8686AC;  /* soft accent: highlights, borders on dark */
  --midnight-100: #E6E6F1;  /* tints: chips, icon tiles */
  --midnight-50:  #F4F4FA;  /* soft section background */

  /* Semantic colours */
  --bg: #FFFFFF;
  --bg-soft: var(--midnight-50);
  --text: #3B3B63;          /* body copy, 9.6:1 on white */
  --text-muted: #5C5C84;    /* secondary copy, 6.1:1 on white */
  --heading: var(--midnight-900);
  --primary: var(--midnight-700);
  --primary-hover: var(--midnight-900);
  --accent: var(--midnight-500);
  --border: #DCDCEA;
  --success: #1E7A55;
  --danger: #B42335;
  --focus: #5B5BD6;

  /* Type */
  --font: "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lead: clamp(1.05rem, 0.98rem + 0.35vw, 1.2rem);
  --fs-h3: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem);
  --fs-h2: clamp(2rem, 1.5rem + 2.2vw, 3rem);
  --fs-h1: clamp(2.6rem, 1.6rem + 4.4vw, 4.4rem);

  /* Layout */
  --container: 1320px;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2rem);
  --section-y: clamp(4.5rem, 3rem + 6vw, 8.5rem);
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 24px;
  --header-h: 80px;

  /* Effects */
  --shadow-sm: 0 2px 10px rgba(15, 14, 71, 0.06);
  --shadow: 0 18px 50px -12px rgba(15, 14, 71, 0.18);
  --shadow-lg: 0 30px 90px -10px rgba(15, 14, 71, 0.22);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* 3. Base / reset --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--primary-hover); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { color: var(--heading); line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; }
p + p { margin-top: 1rem; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--midnight-900); color: #fff; padding: 0.75rem 1.25rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; color: #fff; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.15em; height: 1.15em; flex: none; }

/* 4. Utilities & buttons -------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 0.8rem 1.5rem; border-radius: var(--radius-sm); border: 2px solid transparent;
  font-weight: 600; font-size: 1rem; line-height: 1.2; white-space: nowrap;
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease), gap .35s var(--ease), box-shadow .35s var(--ease);
}
.btn:hover { transform: translateY(-2px); gap: 0.9rem; }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 0.6rem 1.15rem; font-size: 0.95rem; }
.btn-lg { padding: 1rem 1.75rem; font-size: 1.05rem; }

.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 10px 24px -10px rgba(39, 39, 87, .7); }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-ghost { background: #fff; color: var(--heading); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-light { background: #fff; color: var(--midnight-900); }
.btn-light:hover { background: var(--midnight-100); color: var(--midnight-900); }
.btn[disabled] { opacity: .65; pointer-events: none; }

.text-link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--primary); border-bottom: 2px solid var(--midnight-300); }
.text-link:hover { border-color: var(--primary); }

/* 5. Header & navigation -------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: background-color .5s var(--ease), border-color .5s var(--ease), box-shadow .5s var(--ease);
}
.site-header.is-scrolled { background: rgba(244, 244, 250, 0.94); border-color: var(--border); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: .75rem; font-size: 1.5rem; font-weight: 700; color: var(--heading); letter-spacing: -0.02em; }
.brand:hover { color: var(--heading); }
.brand img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; }
.brand-light, .brand-light:hover { color: #fff; }

.site-nav ul { display: flex; gap: .25rem; }
.site-nav a {
  display: block; padding: .6rem 1rem; border-radius: var(--radius-sm);
  color: var(--text); font-weight: 500;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.site-nav a:hover { color: var(--primary); background: var(--midnight-100); }
.site-nav a.is-active { background: var(--primary); color: #fff; }

.header-actions { display: flex; align-items: center; gap: .75rem; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--heading); border-radius: 2px; transition: transform .3s var(--ease), opacity .3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 6. Hero ----------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  padding-block: clamp(3rem, 2rem + 5vw, 7rem) clamp(4rem, 3rem + 5vw, 7rem);
  background:
    radial-gradient(circle at 8% 100%, rgba(134, 134, 172, .35) 0, transparent 22%),
    radial-gradient(circle at 96% -10%, rgba(80, 80, 129, .30) 0, transparent 32%),
    radial-gradient(circle at 100% 60%, rgba(134, 134, 172, .22) 0, transparent 34%),
    var(--bg);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 1rem + 5vw, 7rem); align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem; padding: .4rem .9rem; margin-bottom: 1.5rem;
  border-radius: 999px; background: var(--midnight-100); color: var(--primary); font-size: var(--fs-sm); font-weight: 600;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #2FB67C; box-shadow: 0 0 0 4px rgba(47, 182, 124, .2); }

.hero h1 { font-size: var(--fs-h1); font-weight: 600; letter-spacing: -0.035em; }
.hero-name { display: block; color: var(--primary); }

.hero-lead { margin-block: 1.75rem 2.25rem; font-size: var(--fs-lead); max-width: 38rem; }
mark {
  color: var(--heading); font-weight: 500; padding-inline: 2px;
  background: linear-gradient(to top, rgba(134, 134, 172, .45) 38%, transparent 38%);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin-top: 3rem; max-width: 34rem; }
.stat { display: flex; flex-direction: column-reverse; background: var(--midnight-100); padding: 1.1rem 1rem; text-align: center; }
.stat:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.stat:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.stat dd { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); font-weight: 600; color: var(--heading); line-height: 1.1; }
.stat dt { font-size: var(--fs-sm); color: var(--text-muted); }

.hero-media { position: relative; max-width: 500px; justify-self: end; width: 100%; }
.hero-media img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-lg);
  background: var(--midnight-900); box-shadow: var(--shadow-lg);
}
.hero-media::before {
  content: ""; position: absolute; inset: 1.5rem -1.5rem -1.5rem 1.5rem; z-index: -1;
  border-radius: var(--radius-lg); border: 2px solid var(--midnight-300);
}
.hero-badge {
  position: absolute; left: -2rem; bottom: 2rem; display: flex; align-items: center; gap: .85rem;
  padding: .9rem 1.2rem; max-width: 270px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  font-size: var(--fs-sm); line-height: 1.35; color: var(--text-muted);
}
.hero-badge .icon { width: 2.4rem; height: 2.4rem; padding: .5rem; border-radius: 10px; background: var(--primary); color: #fff; }
.hero-badge strong { display: block; color: var(--heading); font-size: .95rem; }

/* 7. Section headings ----------------------------------------------------- */
.section-kicker {
  display: inline-block; margin-bottom: .9rem; font-size: var(--fs-sm); font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
}
.section-title { font-size: var(--fs-h2); }
.section-head { max-width: 46rem; margin: 0 auto clamp(2.5rem, 2rem + 2vw, 4rem); text-align: center; }
.section-head > p:last-child { margin-top: 1.25rem; font-size: var(--fs-lead); color: var(--text-muted); }

/* 8. About ---------------------------------------------------------------- */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 1rem + 5vw, 6rem); align-items: start; }
.about-copy .section-title { margin-bottom: 1.5rem; }
.about-copy p { font-size: 1.05rem; }
.about-copy .btn { margin-top: 2rem; }

.about-facts { display: grid; gap: 1rem; }
.fact-card {
  padding: 1.5rem; background: var(--bg-soft); border-radius: var(--radius); border: 1px solid transparent;
  transition: border-color .4s var(--ease), box-shadow .4s var(--ease), background-color .4s var(--ease);
}
.fact-card:hover { background: #fff; border-color: var(--border); box-shadow: var(--shadow); }
.fact-card h3 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: .75rem; }
.fact-card p strong { color: var(--heading); }

.lang-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: .4rem; }
.lang-list li + li { border-top: 1px solid var(--border); }
.lang-list li > span:first-child { font-weight: 500; color: var(--heading); }
.level { font-size: var(--fs-sm); color: var(--text-muted); }

.chip-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip-list li { padding: .3rem .75rem; border-radius: 999px; background: #fff; border: 1px solid var(--border); font-size: var(--fs-sm); color: var(--heading); }

/* 9. Process -------------------------------------------------------------- */
.process { background: var(--bg-soft); }
.process-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 1rem + 5vw, 7rem); align-items: center; }
.process-intro .section-title { margin-bottom: 1.5rem; }
.process-intro p { font-size: var(--fs-lead); color: var(--text-muted); }

.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.step {
  padding: 2rem; background: #fff; border-radius: var(--radius);
  transition: box-shadow .6s var(--ease), transform .6s var(--ease);
}
.step:nth-child(even) { transform: translateY(1.75rem); }
.step:hover { box-shadow: var(--shadow-lg); }
.step-icon {
  display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 1.75rem; border-radius: 10px;
  background: var(--midnight-100); color: var(--primary);
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
.step-icon .icon { width: 30px; height: 30px; }
.step:hover .step-icon { background: var(--primary); color: #fff; }
.step h3 { font-size: var(--fs-h3); margin-bottom: .6rem; }
.step h3 span { color: var(--midnight-300); }
.step p { color: var(--text-muted); font-size: .97rem; }

/* 10. Portfolio ----------------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-bottom: 2.5rem; }
.filter {
  padding: .55rem 1.15rem; border-radius: 999px; border: 1px solid var(--border); background: #fff;
  font-weight: 500; font-size: .95rem; color: var(--text);
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.filter:hover { border-color: var(--primary); color: var(--primary); }
.filter.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }

.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.project-card {
  display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; overflow: hidden;
  transition: box-shadow .4s var(--ease), transform .4s var(--ease), opacity .3s;
}
.project-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.project-card.is-hidden { display: none; }

.project-cover {
  position: relative; display: flex; align-items: flex-end; justify-content: space-between;
  aspect-ratio: 16 / 9; padding: 1.5rem; color: #fff; overflow: hidden;
}
/* Generated cover art: swap for an image with  background: url(...) center/cover;  */
.project-cover::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px);
  background-size: 18px 18px; mask-image: linear-gradient(to bottom left, #000, transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom left, #000, transparent 70%);
}
.cover-1 { background: linear-gradient(135deg, var(--midnight-900), var(--midnight-700) 60%, var(--midnight-500)); }
.cover-2 { background: linear-gradient(135deg, var(--midnight-700), var(--midnight-500) 70%, var(--midnight-300)); }
.cover-3 { background: linear-gradient(160deg, #1A1960, var(--midnight-900) 55%, #05051f); }
.cover-4 { background: linear-gradient(135deg, var(--midnight-500), var(--midnight-700) 55%, var(--midnight-900)); }
.project-cover .icon {
  position: absolute; top: 1.4rem; right: 1.4rem; width: 4.5rem; height: 4.5rem; opacity: .9;
  transition: transform .6s var(--ease);
}
.project-card:hover .project-cover .icon { transform: scale(1.08) rotate(-4deg); }
.cover-stat { position: relative; z-index: 1; font-size: 2.4rem; font-weight: 600; line-height: 1; letter-spacing: -0.03em; }
.cover-stat small { display: block; margin-top: .4rem; font-size: .8rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .78); }

.project-body { display: flex; flex-direction: column; flex: 1; padding: 1.75rem; }
.project-meta { font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.project-body h3 { font-size: var(--fs-h3); margin-block: .4rem .75rem; }
.project-body > p:not(.project-meta) { font-size: .95rem; color: var(--text-muted); }

.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-block: 1.25rem 1.5rem; }
.tags li { padding: .2rem .65rem; border-radius: var(--radius-sm); background: var(--midnight-100); color: var(--primary); font-size: .78rem; font-weight: 600; }

.project-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: auto; }
.proof-link { font-size: .92rem; font-weight: 600; color: var(--accent); border-bottom: 1px dashed var(--midnight-300); }
.proof-link:hover { color: var(--primary-hover); border-bottom-style: solid; }

.filter-empty { text-align: center; color: var(--text-muted); }

/* Project dialog */
.project-dialog {
  width: min(720px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); margin: auto; padding: 0;
  border: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); color: var(--text);
}
.project-dialog::backdrop { background: rgba(15, 14, 71, .6); backdrop-filter: blur(4px); }
.project-dialog[open] { animation: dialog-in .45s var(--ease); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.dialog-inner { position: relative; padding: clamp(1.5rem, 1rem + 3vw, 3rem); }
.dialog-inner h3 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); margin-block: .5rem 1.5rem; padding-right: 2.5rem; }
.dialog-inner ul { display: grid; gap: .75rem; margin-bottom: 1.5rem; }
.dialog-inner li { position: relative; padding-left: 1.75rem; }
.dialog-inner li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: .7rem; height: .7rem; border-radius: 3px;
  background: var(--midnight-300); transform: rotate(45deg);
}
.dialog-inner li strong { color: var(--heading); }
.evidence { padding: 1rem 1.25rem; margin-bottom: 1.75rem; background: var(--bg-soft); border-left: 4px solid var(--primary); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.evidence strong { color: var(--heading); }
.dialog-close {
  position: absolute; top: 1rem; right: 1rem; display: grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: var(--bg-soft); color: var(--heading);
}
.dialog-close:hover { background: var(--primary); color: #fff; }
body.dialog-open { overflow: hidden; }

/* 11. CTA band ------------------------------------------------------------ */
.cta-band {
  padding-block: clamp(4rem, 3rem + 4vw, 6.5rem); color: var(--midnight-100); text-align: center;
  background:
    radial-gradient(circle at 10% 0%, rgba(134, 134, 172, .25), transparent 35%),
    radial-gradient(circle at 90% 100%, rgba(80, 80, 129, .45), transparent 40%),
    var(--midnight-900);
}
.cta-inner { max-width: 52rem; }
.cta-band h2 { color: #fff; font-size: clamp(1.75rem, 1.2rem + 2.4vw, 3rem); margin-bottom: 1.5rem; }
.cta-band p { color: #C9C9E0; font-size: var(--fs-lead); margin-bottom: 2.25rem; }

/* 12. Experience timeline ------------------------------------------------- */
.timeline { position: relative; max-width: 60rem; margin-inline: auto; }
.timeline::before { content: ""; position: absolute; left: 13.5rem; top: .5rem; bottom: .5rem; width: 2px; background: var(--border); }
.tl-item { position: relative; display: grid; grid-template-columns: 12rem 1fr; gap: 3rem; padding-block: 1.25rem; }
.tl-item::before {
  content: ""; position: absolute; left: calc(13.5rem - 6px); top: 1.75rem; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 3px solid var(--midnight-300); transition: border-color .3s, background-color .3s;
}
.tl-item:hover::before { background: var(--primary); border-color: var(--primary); }
.tl-item time { padding-top: 1rem; text-align: right; font-size: var(--fs-sm); font-weight: 600; color: var(--accent); }
.tl-item > div {
  padding: 1rem 1.5rem; border-radius: var(--radius); transition: background-color .3s var(--ease), box-shadow .3s var(--ease);
}
.tl-item:hover > div { background: #fff; box-shadow: var(--shadow); }
.tl-item h3 { font-size: 1.15rem; }
.tl-org { font-weight: 500; color: var(--primary); margin-block: .15rem .4rem; }
.tl-item p:last-child { color: var(--text-muted); font-size: .95rem; margin-top: 0; }

/* 13. Services ------------------------------------------------------------ */
.services { background: var(--bg-soft); }
.services-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 1rem + 5vw, 7rem); align-items: center; }
.services-intro .section-title { margin-bottom: 1.5rem; }
.services-intro p { font-size: var(--fs-lead); color: var(--text-muted); }
.services-intro .btn { margin-top: 2.25rem; }
.service-list { display: grid; gap: 1.25rem; }
.service {
  position: relative; padding: 1.75rem 2rem; background: #fff; border-radius: var(--radius); overflow: hidden;
  transition: box-shadow .6s var(--ease);
}
.service::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--primary); transition: width .3s var(--ease); }
.service:hover { box-shadow: var(--shadow); }
.service:hover::before { width: 5px; }
.service h3 { font-size: var(--fs-h3); margin-bottom: .5rem; }
.service p { color: var(--text-muted); }

/* 14. Clients marquee ----------------------------------------------------- */
.clients { padding-block: clamp(3.5rem, 2.5rem + 3vw, 5.5rem) clamp(7rem, 6rem + 4vw, 9rem); }
.clients-title { text-align: center; font-size: var(--fs-sm); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 2rem; }
.marquee {
  display: flex; overflow: hidden; user-select: none;
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; flex: none; gap: 3.5rem; padding-right: 3.5rem; animation: marquee 45s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track li { white-space: nowrap; font-size: clamp(1.15rem, 1rem + .8vw, 1.6rem); font-weight: 600; color: var(--midnight-300); transition: color .3s; }
.marquee-track li:hover { color: var(--primary); }
@keyframes marquee { to { transform: translateX(-100%); } }

/* 15. Contact ------------------------------------------------------------- */
.contact-wrap { position: relative; z-index: 2; margin-bottom: -6rem; }
.contact-card {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 1rem + 4vw, 5rem);
  padding: clamp(1.5rem, 1rem + 4vw, 5rem); background: #fff; border-radius: var(--radius-lg);
  box-shadow: 0 0 90px 9px rgba(15, 14, 71, .1);
}
.contact-info h2 { font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.5rem); margin-bottom: 1rem; }
.contact-info > p { color: var(--text-muted); font-size: 1.05rem; }

.contact-items { display: grid; gap: .5rem; margin-block: 2rem; }
.contact-items li {
  display: flex; align-items: center; gap: 1rem; padding: .85rem 1rem; border-radius: var(--radius);
  transition: box-shadow .4s var(--ease);
}
.contact-items li:hover { box-shadow: 0 0 37px 5px rgba(15, 14, 71, .08); }
.ci-icon {
  display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: var(--radius-sm);
  background: var(--midnight-100); color: var(--primary); transition: background-color .3s, color .3s;
}
.contact-items li:hover .ci-icon { background: var(--primary); color: #fff; }
.ci-icon .icon { width: 22px; height: 22px; }
.contact-items small { display: block; font-size: var(--fs-sm); color: var(--text-muted); }
.contact-items li > span:last-child { color: var(--heading); font-weight: 500; }
.contact-items a { color: var(--heading); }
.contact-items a:hover { color: var(--accent); text-decoration: underline; }

.qr-card {
  display: flex; align-items: center; gap: 1.25rem; padding: 1.25rem; border-radius: var(--radius);
  background: var(--midnight-900); color: #C9C9E0;
}
.qr-card img { width: 132px; height: 132px; flex: none; padding: 6px; border-radius: var(--radius-sm); background: #fff; }
.qr-card h3 { color: #fff; font-size: 1.1rem; margin-bottom: .35rem; }
.qr-card p { font-size: var(--fs-sm); margin-bottom: .75rem; }
.qr-card .text-link { color: #fff; border-color: var(--midnight-300); font-size: .95rem; }

.contact-form { display: grid; gap: 1.25rem; align-content: start; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.field label { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--heading); margin-bottom: .35rem; }
.field label span { color: var(--danger); }
.field input, .field textarea {
  width: 100%; padding: .75rem 0; border: 0; border-bottom: 2px solid var(--border); border-radius: 0; background: transparent;
  font-size: 1.05rem; color: var(--heading); transition: border-color .3s var(--ease);
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--primary); }
.field input:focus-visible, .field textarea:focus-visible { box-shadow: 0 2px 0 0 var(--primary); }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.field-error { min-height: 1.2em; margin-top: .3rem; font-size: var(--fs-sm); color: var(--danger); }
.field-error:empty { min-height: 0; margin: 0; }

.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.contact-form .btn { justify-self: start; margin-top: .5rem; }
.form-status { font-weight: 500; }
.form-status:empty { display: none; }
.form-status.is-success { color: var(--success); }
.form-status.is-error { color: var(--danger); }
.form-note { font-size: var(--fs-sm); color: var(--text-muted); margin-top: 0; }

/* 16. Footer & back-to-top ------------------------------------------------ */
.site-footer { padding-top: 10rem; background: var(--midnight-900); color: #C9C9E0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; padding-bottom: 2.5rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; }
.footer-nav a { position: relative; color: #C9C9E0; }
.footer-nav a::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 0; height: 2px; background: var(--midnight-300); transition: width .3s var(--ease); }
.footer-nav a:hover { color: #fff; }
.footer-nav a:hover::after { width: 100%; }
.footer-social { display: flex; gap: .75rem; }
.footer-social a {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--midnight-700); color: #fff; font-weight: 700; transition: background-color .3s, transform .3s var(--ease);
}
.footer-social a:hover { background: var(--midnight-500); transform: translateY(-3px); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 1.5rem 2rem; border-top: 1px solid var(--midnight-700); font-size: var(--fs-sm); }
.footer-bottom p { margin: 0; }

.to-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 90; display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: #fff; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .4s, transform .4s var(--ease), visibility .4s, background-color .3s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--primary-hover); color: #fff; }

/* 17. Entrance animations ------------------------------------------------- */
/* Hero: pure CSS, runs on load, no JS needed */
.rise { animation: rise .9s var(--ease) both; }
.hero-copy .rise:nth-child(2) { animation-delay: .08s; }
.hero-copy .rise:nth-child(3) { animation-delay: .16s; }
.hero-copy .rise:nth-child(4) { animation-delay: .24s; }
.hero-copy .rise:nth-child(5) { animation-delay: .32s; }
.hero-copy .rise:nth-child(6) { animation-delay: .4s; }
.hero-media.rise { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } }

/* Below the fold: main.js adds .reveal to off-screen blocks, then .is-visible on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* 18. Responsive ---------------------------------------------------------- */
@media (max-width: 1180px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-nav a { padding-inline: .7rem; }
}

@media (max-width: 1024px) {
  :root { --header-h: 72px; }
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0; padding: .75rem var(--gutter) 1.25rem;
    background: #fff; border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .3s, transform .3s var(--ease), visibility .3s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: .85rem 1rem; font-size: 1.05rem; }

  .hero-grid, .about-grid, .process-grid, .services-grid, .contact-card { grid-template-columns: 1fr; }
  .hero-grid { text-align: center; }
  .hero-copy { order: 2; }
  .hero-lead { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .stats { margin-inline: auto; }
  .hero-media { justify-self: center; max-width: 420px; }
  .hero-media::before { inset: 1rem -.75rem -.75rem 1rem; }
  .hero-badge { left: 50%; transform: translateX(-50%); bottom: -1.5rem; width: max-content; max-width: calc(100% - 1rem); text-align: left; }
  .process-intro, .services-intro { text-align: center; }
  .about-copy { text-align: left; }
}

@media (max-width: 760px) {
  .project-grid, .steps { grid-template-columns: 1fr; }
  .step:nth-child(even) { transform: none; }
  .field-row { grid-template-columns: 1fr; }
  .timeline::before { left: 7px; }
  .tl-item { grid-template-columns: 1fr; gap: .25rem; padding-left: 2rem; }
  .tl-item::before { left: 1px; top: 1.6rem; }
  .tl-item time { text-align: left; padding-top: 1.25rem; }
  .tl-item > div { padding: .25rem 0 .5rem; }
  .tl-item:hover > div { background: none; box-shadow: none; }
  .qr-card { flex-direction: column; text-align: center; }
  .footer-inner, .footer-bottom { justify-content: center; text-align: center; }
  .footer-nav { justify-content: center; }
}

@media (max-width: 420px) {
  .brand span { font-size: 1.25rem; }
  .header-actions .btn { display: none; }
  .hero-actions .btn { width: 100%; }
  .stat { padding: .9rem .4rem; }
  .project-actions { flex-direction: column; align-items: stretch; text-align: center; }
  .contact-form .btn { justify-self: stretch; }
}

/* 19. Reduced motion & print --------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .marquee { flex-wrap: wrap; justify-content: center; mask-image: none; -webkit-mask-image: none; }
  .marquee-track { flex-wrap: wrap; justify-content: center; gap: 1rem 2rem; padding: 0 var(--gutter); }
  .marquee-track[aria-hidden="true"] { display: none; }
}

@media print {
  .site-header, .to-top, .filters, .project-actions, .contact-form, .marquee-track[aria-hidden="true"], .cta-band .btn { display: none !important; }
  .project-details[hidden] { display: block !important; }
  .contact-wrap { margin: 0; }
  .site-footer { padding-top: 2rem; }
  body { color: #000; }
}

/* 404 page ---------------------------------------------------------------- */
.error-page {
  display: grid; place-items: center; min-height: 100vh; text-align: center; padding-block: 4rem;
  background:
    radial-gradient(circle at 10% 90%, rgba(134, 134, 172, .3), transparent 30%),
    radial-gradient(circle at 90% 10%, rgba(80, 80, 129, .25), transparent 35%);
}
.error-code { font-size: clamp(5rem, 3rem + 10vw, 10rem); font-weight: 700; line-height: 1; color: var(--midnight-100); -webkit-text-stroke: 2px var(--midnight-300); }
.error-page h1 { font-size: var(--fs-h2); margin-block: 1rem; }
.error-page p:not(.error-code) { max-width: 32rem; margin: 0 auto 2rem; color: var(--text-muted); }

/* Official email & anti-impersonation notice ------------------------------ */
.hero-email { display: flex; align-items: center; gap: .5rem; margin-top: 1.5rem; font-size: .95rem; color: var(--text-muted); }
.hero-email .icon { color: var(--accent); }
.hero-email a { font-weight: 600; color: var(--primary); border-bottom: 1px solid var(--midnight-300); }
.official-notice {
  display: flex; gap: .85rem; align-items: flex-start; padding: 1rem 1.15rem; margin-bottom: 1.5rem;
  border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: var(--radius-sm); background: var(--bg-soft);
  font-size: var(--fs-sm); line-height: 1.55;
}
.official-notice .icon { width: 1.4rem; height: 1.4rem; margin-top: .1rem; color: var(--primary); }
.official-notice strong { color: var(--heading); }
.official-notice a { font-weight: 600; color: var(--primary); text-decoration: underline; }
.footer-bottom a { color: #fff; text-decoration: underline; text-decoration-color: var(--midnight-300); }
.footer-bottom a:hover { color: var(--midnight-100); }
.error-page .error-email { margin-top: 1.75rem; font-size: .95rem; }
@media (max-width: 1024px) { .hero-email { justify-content: center; flex-wrap: wrap; } }
