/* ============================================================================
   Classic scrolling layout: no 3D stage. Loaded after styles.css, whose
   components (header, portfolio, reviews, FAQ, contact, dialogs) it reuses.
   ============================================================================ */

/* An ordinary page: selectable text, the system cursor, smooth anchor jumps. */
* { user-select: auto; }
body { cursor: auto; }
* { cursor: auto !important; }
a, button, summary, label, select, .tile-btn, [role="button"] { cursor: pointer !important; }
input, textarea { cursor: text !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
section[id] { scroll-margin-top: 70px; }

/* Ambient light: two soft glows drifting slowly behind the page (gradients only). */
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ambient::before, .ambient::after { content: ''; position: absolute; border-radius: 50%; }
.ambient::before {
    width: 90vmax; height: 90vmax; top: -45vmax; right: -35vmax;
    background: radial-gradient(circle, rgba(204, 18, 38, 0.24), rgba(204, 18, 38, 0) 62%);
    animation: ambient-a 40s ease-in-out infinite alternate;
}
.ambient::after {
    width: 80vmax; height: 80vmax; bottom: -45vmax; left: -35vmax;
    background: radial-gradient(circle, rgba(158, 171, 192, 0.09), rgba(158, 171, 192, 0) 62%);
    animation: ambient-b 52s ease-in-out infinite alternate;
}
@keyframes ambient-a { to { transform: translate(-14vmax, 16vmax) scale(1.08); } }
@keyframes ambient-b { to { transform: translate(16vmax, -12vmax) scale(0.94); } }
@media (prefers-reduced-motion: reduce) { .ambient::before, .ambient::after { animation: none; } }

/* Header fixed on top; its smoked backing appears once the page has moved. */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 50; padding: 0 60px; }
body.scrolled .main-header::before { opacity: 1; }
.header-progress { z-index: 51; }

/* Reveal: elements rise into place the first time their section comes into view. */
.reveal { opacity: 0; transform: translateY(22px);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1); }
.is-visible .reveal { opacity: 1; transform: none; }
.is-visible .reveal:nth-child(3) { transition-delay: 0.12s; }
.is-visible .reveal:nth-child(4) { transition-delay: 0.22s; }
.is-visible .reveal:nth-child(5) { transition-delay: 0.32s; }
.reveal-section.is-visible .contact-title .line-inner { transform: none; opacity: 1; filter: blur(0); }
.section.is-visible .slide-desc, .section.is-visible .benefit, .section.is-visible .client,
.section.is-visible .figure, .section.is-visible .slide-cta, .section.is-visible .figures-note { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal, .line-inner { transition: none !important; }
}

/* ---- Hero: the portrait on the right, who and what on the left ---- */
.hero {
    position: relative; z-index: 2; min-height: 100vh; min-height: 100svh;
    display: flex; align-items: center; padding: 120px 60px 70px;
}
.hero-inner {
    width: 100%; max-width: 1320px; margin: 0 auto;
    display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(40px, 6vw, 110px); align-items: center;
}
.hero-title { font-size: clamp(42px, 5vw, 80px); margin-bottom: 30px; }
.hero-lead { margin: 0 0 40px; max-width: 56ch; font-size: 18px; line-height: 1.7; font-weight: 300; color: #d1d5db; text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 30px; }
.hero-actions .pill-btn { text-decoration: none; }
.hero-link {
    padding-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff; text-decoration: none; font-size: 16px; transition: border-color 0.3s;
}
.hero-link:hover { border-color: #ffffff; }
.hero-rating {
    display: inline-flex; align-items: center; gap: 12px; margin-top: 46px;
    font-size: 14px; color: #aeb6c4; text-decoration: none;
}
.hero-rating[hidden] { display: none; }
.hero-rating .review-stars { font-size: 15px; }
.hero-rating strong { font-weight: 500; color: #f2f7ff; }
.hero-photo {
    position: relative; justify-self: end; width: 100%; max-width: 540px; margin: 0;
    aspect-ratio: 4 / 5; max-height: calc(100vh - 170px); border-radius: 26px; overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.10); background: #0b0f17;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55);
}
.hero-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }

/* ---- Ordinary sections ---- */
.section { position: relative; z-index: 2; padding: 120px 60px; }
.section-inner { width: 100%; max-width: 1320px; margin: 0 auto; }
.section .contact-title { font-size: clamp(38px, 4.4vw, 68px); margin-bottom: 28px; }
.section .slide-desc { max-width: 58ch; text-wrap: pretty; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 30px 80px; align-items: end; margin-bottom: 56px; }
.section-head .contact-title { margin-bottom: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 50px 90px; align-items: center; }

/* About: second portrait beside the text */
.about-inner { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(40px, 6vw, 110px); align-items: center; }
.about-photo {
    margin: 0; aspect-ratio: 4 / 5; border-radius: 26px; overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.10); background: #0b0f17;
}
.about-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 60% 30%; }

/* Services: four cards in a row */
.services .benefits { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; margin: 0; }
.services .benefit {
    flex-direction: column; gap: 22px; padding: 30px 28px 32px; border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.025);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s, background 0.3s;
}
.services .benefit:hover { border-color: rgba(201, 209, 220, 0.4); background: rgba(255, 255, 255, 0.045); }
.services .benefit-icon { width: 44px; height: 44px; flex-basis: 44px; border-radius: 12px; }
.services .benefit-icon svg { width: 20px; height: 20px; }
.services .benefit p { font-size: 16px; line-height: 1.6; }
.services .benefit strong { margin-bottom: 8px; font: 400 18px/1.3 var(--display); letter-spacing: -0.02em; }

/* How it works: the four steps in a row, a hairline running from each number to the next */
.process-section .process-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.process-section .process-steps li { display: flex; flex-direction: column; gap: 22px; padding: 0 12px 0 0; }
.process-section.is-visible .process-steps li { opacity: 1; transform: none; }
.process-section .process-steps li:not(:last-child)::before {
    left: 70px; right: 0; top: 26px; bottom: auto; width: auto; height: 1px;
    background: linear-gradient(90deg, rgba(201, 209, 220, 0.45), rgba(201, 209, 220, 0.06));
}
.process-section .process-num { width: 52px; height: 52px; font-size: 14px; }
.process-section .process-steps strong { margin: 0 0 10px; font-size: 19px; }
.process-section .process-steps p { font-size: 16px; max-width: 34ch; }
@media (max-width: 1100px) {
    .process-section .process-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 22px; }
    .process-section .process-steps li:nth-child(2n)::before { display: none; }
}
@media (max-width: 700px) {
    /* phones: back to a column, the hairline running down between the numbers */
    .process-section .process-steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .process-section .process-steps li { display: grid; grid-template-columns: 46px 1fr; gap: 0 18px; padding: 0 0 30px; }
    .process-section .process-steps li:last-child { padding-bottom: 0; }
    .process-section .process-steps li:nth-child(n)::before { display: block; }
    .process-section .process-steps li:last-child::before { display: none; }
    .process-section .process-steps li:not(:last-child)::before {
        left: 23px; right: auto; top: 54px; bottom: 6px; width: 1px; height: auto;
        background: linear-gradient(rgba(201, 209, 220, 0.45), rgba(201, 209, 220, 0.06));
    }
    .process-section .process-num { width: 46px; height: 46px; font-size: 13px; }
    .process-section .process-steps strong { margin: 6px 0 8px; font-size: 17px; }
}

/* References and results */
.references .clients { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; margin: 0; }
.references .client { padding: 26px 0; }
.references .client strong { font-size: 22px; }
.references .client span { font-size: 14px; }
.results .figures { margin: 0; gap: clamp(26px, 3.6vw, 60px); flex-wrap: wrap; }
.results .figure dt { font-size: clamp(48px, 4.6vw, 76px); }
.results .figure dd { font-size: 15px; }
.results .figures-note { margin-top: 34px; }

/* Reviews: one row that slides, 3 cards on a computer, 2 on a tablet, 1 and a peek on a phone */
.review-grid {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: calc((100% - 32px) / 3);
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.review-grid::-webkit-scrollbar { display: none; }
.review-grid > .review-card { scroll-snap-align: start; }
.reviews-actions { justify-content: space-between; }
.reviews-nav { display: flex; gap: 12px; margin-left: auto; }
.reviews-nav[hidden] { display: none; }
.reviews-nav button {
    display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.04);
    color: #ffffff; font-size: 19px; line-height: 1; transition: border-color 0.3s, background 0.3s, opacity 0.3s;
}
.reviews-nav button:hover:not(:disabled) { border-color: #c9d1dc; background: rgba(201, 209, 220, 0.12); }
.reviews-nav button:disabled { opacity: 0.28; cursor: default !important; }
@media (max-width: 1100px) {
    .review-grid { grid-auto-columns: calc((100% - 16px) / 2); }
}
@media (max-width: 700px) {
    .review-grid { grid-template-columns: none; grid-auto-columns: 86%; }
    .reviews-nav button { width: 46px; height: 46px; }
}

/* Contact: the third portrait behind the glass form */
.contact { overflow: hidden; }
.contact::before {
    content: ''; position: absolute; top: 0; bottom: 0; right: 0; width: 55%; z-index: 0; pointer-events: none;
    background: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0.55) 100%),
                url("../assets/moi/jawed-contact.jpg") 70% 30% / cover no-repeat;
    opacity: 0.55;
}
.contact-inner { position: relative; z-index: 1; }
.contact-footer { z-index: 1; }

/* ---- Phones and tablets ---- */
@media (max-width: 1100px) {
    .services .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .topbar { padding: 0 24px; }
    .hero { padding: 92px 24px 60px; min-height: 0; }
    .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 34px; }
    .hero-photo { order: -1; justify-self: stretch; max-width: none; max-height: 62vh; aspect-ratio: 4 / 5; }
    .hero-title { font-size: clamp(34px, 9.5vw, 56px); margin-bottom: 22px; }
    .hero-lead { font-size: 16.5px; margin-bottom: 30px; }
    .hero-rating { margin-top: 32px; }
    .section { padding: 90px 24px; }
    .section .contact-title { font-size: clamp(32px, 9vw, 52px); }
    .section-head, .split, .about-inner { grid-template-columns: minmax(0, 1fr); }
    .section-head { margin-bottom: 36px; }
    .about-photo { max-height: 70vh; }
    .services .benefits { grid-template-columns: 1fr; gap: 14px; }
    .services .benefit { flex-direction: row; gap: 18px; padding: 22px; }
    .references .clients { grid-template-columns: 1fr 1fr; gap: 0 18px; }
    .references .client strong { font-size: 16px; }
    .results .figures { gap: 20px; flex-wrap: nowrap; }
    .results .figure dt { font-size: clamp(32px, 10vw, 52px); }
    .contact::before { width: 100%; opacity: 0.25; background-position: 75% 20%; }
}
/* Header on phones: tighter spacing, so the Contact button keeps clear of the screen edge.
   When the row still does not fit, site.js marks it compact and the JA mark stands alone. */
@media (max-width: 520px) {
    .main-header { gap: 14px; }
    .header-actions { gap: 10px; }
    .lang-switch a { padding: 4px 7px; }
    .contact-btn { padding: 8px 12px; gap: 7px; }
}
@media (max-width: 360px) {
    .topbar { padding: 0 16px; }
    .social-links a { width: 28px; height: 28px; }
}
.main-header.is-compact .brand-text { display: none; }
.main-header.is-compact .brand-mark { width: 24px; height: 24px; flex-basis: 24px; }

/* ============================================================================
   Hover life: small, quick reactions everywhere a mouse goes (computers only).
   --accent is the touch of colour of these reactions.
   ============================================================================ */
:root { --accent: #e0192f; --accent-soft: rgba(224, 25, 47, 0.12); --ease-out: cubic-bezier(0.16, 1, 0.3, 1); }

/* Cards: a light follows the pointer inside (position set by site.js) */
.services .benefit, .review-card { position: relative; }
.services .benefit::after, .review-card::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.075), transparent 62%);
    opacity: 0; transition: opacity 0.35s;
}
/* reveal delays stay on opacity/transform only, so hovering answers at once */
.services .benefit {
    transition: opacity 1s var(--ease-out), transform 1s var(--ease-out), translate 0.45s var(--ease-out),
                border-color 0.3s, background 0.3s, box-shadow 0.45s;
    transition-delay: var(--d, 0s), var(--d, 0s), 0s, 0s, 0s, 0s;
}
.services .benefit:nth-child(1) { --d: 0.1s; }
.services .benefit:nth-child(2) { --d: 0.18s; }
.services .benefit:nth-child(3) { --d: 0.26s; }
.services .benefit:nth-child(4) { --d: 0.34s; }
.services .benefit-icon { transition: transform 0.5s var(--ease-out), border-color 0.3s, color 0.3s; }
.review-card { transition: translate 0.45s var(--ease-out), border-color 0.3s, box-shadow 0.45s; }
.references .client strong { display: inline-block; transition: translate 0.45s var(--ease-out), color 0.3s; }
.references .client { transition: opacity 1s var(--ease-out), transform 1s var(--ease-out), border-color 0.3s; }
.results .figure dt { transition: translate 0.45s var(--ease-out), color 0.3s; }
.process-section .process-num { transition: scale 0.45s var(--ease-out), border-color 0.3s, background 0.3s, color 0.3s; }
.process-section .process-steps strong { transition: translate 0.45s var(--ease-out); }
.tile-btn { transition: translate 0.45s var(--ease-out); }
.tile-media { transition: box-shadow 0.45s var(--ease-out); }
.pill-btn .arrow, .contact-btn .btn-arrow, .hero-link::after { display: inline-block; transition: transform 0.45s var(--ease-out); }
.pill-btn, .contact-btn, .reviews-nav button, .social-links a, .hero-link {
    transition-property: translate, transform, background, color, border-color, opacity, gap;
    transition-duration: 0.35s; transition-timing-function: var(--ease-out);
}
.social-links svg { transition: transform 0.45s var(--ease-out); }
.faq-item summary > span:first-child { transition: translate 0.45s var(--ease-out); }
.faq-icon { transition: transform 0.4s var(--ease-out), rotate 0.45s var(--ease-out), border-color 0.3s; }
.hero-photo, .about-photo { transition: opacity 0.9s var(--ease-out), transform 0.6s var(--ease-out); will-change: transform; }
.hero-photo img, .about-photo img {
    height: calc(100% + 40px); margin-top: -20px;           /* room for the scroll parallax */
    translate: 0 var(--py, 0px); scale: 1; transition: scale 0.9s var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .nav-link:hover::after { width: 100%; }
    .services .benefit:hover { translate: 0 -6px; border-color: rgba(255, 255, 255, 0.24); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); }
    .services .benefit:hover::after, .review-card:hover::after { opacity: 1; }
    .services .benefit:hover .benefit-icon { transform: translateY(-3px) rotate(-8deg) scale(1.08); border-color: var(--accent); color: var(--accent); }
    .review-card:hover { translate: 0 -4px; border-color: rgba(255, 255, 255, 0.22); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4); }
    .references .client:hover { border-color: rgba(255, 255, 255, 0.4); }
    .references .client:hover strong { translate: 10px 0; color: #ffffff; }
    .results .figure:hover dt { translate: 0 -4px; color: #ffffff; }
    .tile-btn:hover { translate: 0 -4px; }
    .tile-btn:hover .tile-media { box-shadow: 0 22px 50px rgba(0, 0, 0, 0.5); }
    .pill-btn:hover .arrow, .contact-btn:hover .btn-arrow { transform: translate(3px, -3px); }
    .hero-link:hover { border-color: var(--accent); }
    .social-links a:hover svg { transform: scale(1.12) rotate(-8deg); }
    .faq-item summary:hover > span:first-child { translate: 8px 0; }
    .faq-item summary:hover .faq-icon { rotate: 90deg; border-color: var(--accent); }
    .hero-photo:hover img, .about-photo:hover img { scale: 1.035; }
    .portfolio-filter:hover { translate: 0 -2px; }
    .portfolio-filter { transition: translate 0.35s var(--ease-out), border-color 0.3s, color 0.3s, background 0.3s; }
    .process-section .process-steps li:hover .process-num { scale: 1.1; border-color: var(--accent); background: var(--accent-soft); color: #ffffff; }
    .process-section .process-steps li:hover strong { translate: 6px 0; }
}
@media (prefers-reduced-motion: reduce) {
    .services .benefit:hover, .review-card:hover, .tile-btn:hover, .portfolio-filter:hover { translate: none; }
    .process-section .process-steps li:hover .process-num { scale: none; }
    .hero-photo img, .about-photo img { translate: none; }
}

/* ============================================================================
   Brand red: the touch of colour of the site (the stool and the hearts of the
   portraits). The review stars stay silver: red stars read as a warning.
   ============================================================================ */
.eyebrow-dot { background: var(--accent); }
.nav-link::after { background: var(--accent); }
.header-progress span { background: linear-gradient(90deg, rgba(224, 25, 47, 0.9), rgba(224, 25, 47, 0.2)); }
.portfolio-filter.is-active { border-color: var(--accent); background: var(--accent-soft); color: #ffffff; }
.slide-cta .arrow, .contact-mail .arrow, .card-head .arrow { color: var(--accent); }
.field-label em { color: var(--accent); }
.faq-item[open] .faq-icon { border-color: var(--accent); }
.faq-item[open] .faq-icon::before, .faq-item[open] .faq-icon::after { background: var(--accent); }
.tile-btn:focus-visible { outline-color: var(--accent); }
@media (hover: hover) and (pointer: fine) {
    .pill-btn:hover { background: var(--accent); border-color: var(--accent); color: #ffffff; }
    .contact-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
    .social-links a:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
    .reviews-nav button:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
    .lb-close:hover, .lb-prev:hover, .lb-next:hover { border-color: var(--accent); background: var(--accent-soft); }
    .slide-cta:hover, .contact-mail:hover { border-color: var(--accent); }
}

/* iPhones draw ↗ as a blue emoji square: keep every arrow a plain text glyph */
.arrow, .btn-arrow { font-variant-emoji: text; }
