/* ==========================================================
   base.css  -  reset, layout helpers, shared components
   Theme colours and fonts live in the theme section below.
   ========================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.container { width: min(100% - 2.5rem, var(--maxw, 1180px)); margin-inline: auto; }
.section { padding-block: clamp(4rem, 9vw, 7.5rem); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .85rem 1.5rem;
  border: 1.5px solid transparent;
  border-radius: var(--btn-radius, 999px);
  font-weight: 600; font-size: .95rem;
  transition: transform .25s ease, background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { box-shadow: 0 10px 26px -10px var(--accent); }
.btn-ghost { border-color: var(--line-strong, var(--line)); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset-inline: 0; top: 0; z-index: 50;
  transition: background .3s ease, box-shadow .3s ease, padding .3s ease;
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  min-height: 78px; transition: min-height .3s ease;
}
.site-header.is-stuck .bar { min-height: 62px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; letter-spacing: -.01em; font-size: 1.25rem; }
.nav ul { display: flex; gap: 2rem; }
.nav a { font-size: .93rem; font-weight: 500; opacity: .85; position: relative; padding-block: .3rem; }
.nav a::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
[dir="rtl"] .nav a::after { transform-origin: right; }
.nav a:hover { opacity: 1; }
.nav a:hover::after { transform: scaleX(1); }
.tools { display: flex; align-items: center; gap: .8rem; }
.lang-select {
  appearance: none; background: transparent; border: 1px solid var(--line);
  border-radius: 999px; padding: .4rem .9rem; font-size: .85rem; cursor: pointer;
}
.lang-select option { color: #111; }
.nav-toggle { display: none; background: none; border: 0; width: 42px; height: 42px; position: relative; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 10px; right: 10px; height: 2px; background: currentColor; transition: transform .3s ease, opacity .3s ease;
}
.nav-toggle span { top: 20px; }
.nav-toggle span::before { left: 0; right: 0; top: -7px; }
.nav-toggle span::after { left: 0; right: 0; top: 7px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .tools .btn { display: none; }
  .nav {
    position: fixed; inset: 0; padding: 6rem 2rem 2rem; background: var(--nav-bg, var(--bg));
    transform: translateY(-100%); visibility: hidden; z-index: -1;
    transition: transform .45s cubic-bezier(.7, 0, .2, 1), visibility 0s linear .45s;
  }
  /* a blurred header would trap the fixed menu inside its own box, so drop the blur here */
  .site-header.is-stuck { backdrop-filter: none !important; }
  .nav ul { flex-direction: column; gap: 1.2rem; }
  .nav a { font-size: 1.6rem; }
  .nav-open .nav { transform: none; visibility: visible; transition-delay: 0s; }
  .nav-open { overflow: hidden; }
}

/* ---------- reveal on scroll ---------- */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0ms); }
[data-reveal="left"] { transform: translateX(-34px); }
[data-reveal="right"] { transform: translateX(34px); }
[dir="rtl"] [data-reveal="left"] { transform: translateX(34px); }
[dir="rtl"] [data-reveal="right"] { transform: translateX(-34px); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- preloader shell ---------- */
#preloader {
  position: fixed; inset: 0; z-index: 999; display: grid; place-items: center;
  background: var(--pre-bg, var(--bg)); color: var(--pre-fg, var(--fg));
}
body.is-loading { overflow: hidden; }

/* ---------- forms ---------- */
.field { display: grid; gap: .4rem; }
.field label { font-size: .82rem; font-weight: 600; opacity: .8; }
.field input, .field textarea, .field select {
  width: 100%; padding: .85rem 1rem; border-radius: var(--field-radius, 12px);
  border: 1px solid var(--line); background: var(--field-bg, transparent);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.form-note { font-size: .9rem; color: var(--accent); min-height: 1.4em; }

/* ---------- misc ---------- */
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
[dir="rtl"] .eyebrow { letter-spacing: 0; }
.flip { display: inline-block; }
[dir="rtl"] .flip { transform: scaleX(-1); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ==========================================================
   Theme: Flowkindle (SaaS)
   ========================================================== */
:root {
  --bg: #faf6ef;
  --fg: #1b1633;
  --muted: #655f7a;
  --accent: #5b3df5;
  --on-accent: #fff;
  --lime: #d6ff5c;
  --ink: #1b1633;
  --surface: #ffffff;
  --line: #e6dfd2;
  --line-strong: #cfc6b4;
  --maxw: 1140px;
  --btn-radius: 14px;
  --field-radius: 14px;
  --font: "Avenir Next", "Segoe UI", "Trebuchet MS", system-ui, "Noto Sans Arabic", "PingFang SC", "Microsoft YaHei", sans-serif;
}
h1, h2, h3 { letter-spacing: -.03em; line-height: 1.08; }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: .8rem; }
h3 { font-size: 1.25rem; margin-bottom: .4rem; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; line-height: 1.3; }
.center { text-align: center; margin-inline: auto; }
.narrow { max-width: 760px; }
.section-head { max-width: 40rem; margin-bottom: 3.2rem; }
.section-head p:not(.eyebrow) { color: var(--muted); }

.site-header { --nav-bg: var(--bg); }
.site-header.is-stuck { background: rgba(250, 246, 239, .88); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.btn-lime { background: var(--lime); color: var(--ink); }
.btn-lime:hover { box-shadow: 0 12px 28px -10px #d6ff5c; }

/* ---------- preloader: curtain ---------- */
#preloader { --pre-bg: transparent; background: transparent; }
.curtain { position: absolute; inset-inline: 0; height: 50.5%; background: var(--accent); transition: transform .9s cubic-bezier(.76, 0, .24, 1); }
.c-top { top: 0; } .c-bottom { bottom: 0; }
#preloader.is-leaving .c-top { transform: translateY(-101%); }
#preloader.is-leaving .c-bottom { transform: translateY(101%); }
.pre-mark { position: relative; z-index: 2; text-align: center; color: #fff; transition: opacity .3s ease; }
#preloader.is-leaving .pre-mark { opacity: 0; }
.pre-mark .b { display: inline-block; border-radius: 50%; animation: pop .9s cubic-bezier(.3, 1.6, .5, 1) both; }
.b1 { width: 54px; height: 54px; background: var(--lime); margin-inline-end: -14px; }
.b2 { width: 70px; height: 70px; background: #fff; animation-delay: .18s !important; }
@keyframes pop { from { transform: scale(0); } }
.pre-word { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin-top: 1rem; }
.pre-bar { width: 160px; height: 4px; background: #ffffff35; border-radius: 4px; margin: 1rem auto 0; overflow: hidden; }
.pre-bar i { display: block; height: 100%; width: calc(var(--p, 0) * 1%); background: var(--lime); transition: width .15s linear; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 9.5rem 0 4rem; text-align: center; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; z-index: 0; animation: drift 14s ease-in-out infinite alternate; }
.blob-a { width: 420px; height: 420px; background: #c9bcff; top: -80px; inset-inline-start: -80px; }
.blob-b { width: 380px; height: 380px; background: #e9ffa8; top: 120px; inset-inline-end: -100px; animation-delay: -6s; }
@keyframes drift { to { transform: translate(40px, 30px) scale(1.12); } }
.hero-in { position: relative; z-index: 1; }
.badge { display: inline-flex; align-items: center; gap: .6rem; background: #fff; border: 1px solid var(--line); padding: .4rem 1rem; border-radius: 999px; font-size: .85rem; font-weight: 600; margin-bottom: 1.6rem; }
.spark { width: 8px; height: 8px; border-radius: 50%; background: #38d27a; box-shadow: 0 0 0 0 #38d27a99; animation: beat 1.8s infinite; }
@keyframes beat { to { box-shadow: 0 0 0 9px #38d27a00; } }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); max-width: 16ch; margin: 0 auto 1.3rem; }
.hero mark { background: linear-gradient(transparent 58%, var(--lime) 58%); color: inherit; padding: 0 .1em; }
.lead { max-width: 36rem; margin: 0 auto 2rem; font-size: 1.15rem; color: var(--muted); }
.hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: .9rem; }
.note { margin-top: 1rem; font-size: .85rem; color: var(--muted); }

.dash-wrap { position: relative; max-width: 860px; margin: 3.6rem auto 0; }
.dash { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 50px 80px -40px rgba(27, 22, 51, .45); text-align: start; transition: transform .25s ease-out; transform-style: preserve-3d; overflow: hidden; }
.dash-top { display: flex; gap: 6px; padding: .8rem 1rem; border-bottom: 1px solid var(--line); background: #fbf9f4; }
.dash-top i { width: 10px; height: 10px; border-radius: 50%; background: #ddd5c4; }
.dash-body { display: grid; grid-template-columns: 64px 1fr; min-height: 300px; }
.dash-side { border-inline-end: 1px solid var(--line); padding: 1.2rem .9rem; display: grid; align-content: start; gap: .9rem; }
.dash-side span { height: 34px; border-radius: 10px; background: #f0ebe0; }
.dash-side .on { background: var(--accent); }
.dash-main { padding: 1.4rem; display: grid; gap: 1.4rem; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; }
.kpi { background: #faf6ef; border-radius: 14px; padding: .9rem 1rem; display: grid; }
.kpi small { color: var(--muted); font-size: .76rem; }
.kpi b { font-size: 1.5rem; letter-spacing: -.02em; direction: ltr; text-align: start; }
.kpi em { font-style: normal; font-size: .78rem; font-weight: 700; direction: ltr; text-align: start; }
.up { color: #1c9a5a; } .down { color: #d6453d; }
.chart { display: flex; align-items: flex-end; gap: 12px; height: 130px; padding-top: .4rem; }
.chart span { flex: 1; height: var(--h); background: linear-gradient(180deg, var(--accent), #8a74ff); border-radius: 8px 8px 3px 3px; transform-origin: bottom; animation: rise 1.2s cubic-bezier(.2, .8, .2, 1) both; }
.chart span:nth-child(odd) { background: linear-gradient(180deg, #b9a9ff, #d8cfff); }
.chart span:nth-child(2) { animation-delay: .08s; } .chart span:nth-child(3) { animation-delay: .16s; } .chart span:nth-child(4) { animation-delay: .24s; }
.chart span:nth-child(5) { animation-delay: .32s; } .chart span:nth-child(6) { animation-delay: .4s; } .chart span:nth-child(7) { animation-delay: .48s; } .chart span:nth-child(8) { animation-delay: .56s; }
@keyframes rise { from { transform: scaleY(0); } }
.float { position: absolute; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .7rem 1rem; font-weight: 800; box-shadow: 0 18px 30px -16px rgba(27, 22, 51, .4); animation: bob 5s ease-in-out infinite; }
.f1 { top: 18%; inset-inline-start: -28px; color: #1c9a5a; font-size: 1.3rem; }
.f2 { bottom: 14%; inset-inline-end: -24px; background: var(--lime); animation-delay: -2.4s; direction: ltr; }
@keyframes bob { 50% { transform: translateY(-12px); } }
@media (max-width: 700px) {
  .dash-body { grid-template-columns: 1fr; }
  .dash-side { display: none; }
  .kpis { grid-template-columns: 1fr 1fr 1fr; gap: .5rem; }
  .kpi { padding: .6rem; } .kpi b { font-size: 1.1rem; }
  .float { display: none; }
}

/* ---------- logos ---------- */
.logos { padding: 2.5rem 0 1rem; text-align: center; }
.logos-t { font-size: .85rem; color: var(--muted); margin-bottom: 1.2rem; }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); direction: ltr; }
.track { display: flex; width: max-content; gap: 3.5rem; animation: slide 32s linear infinite; }
.track span { font-weight: 800; font-size: 1.3rem; color: #b3aabd; letter-spacing: -.02em; white-space: nowrap; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- bento ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.1rem; }
.tile { grid-column: span 2; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 1.8rem; min-height: 280px; display: flex; flex-direction: column; justify-content: flex-end; transition: transform .3s ease; overflow: hidden; position: relative; }
.tile:hover { transform: translateY(-5px) rotate(-.4deg); }
.t-wide { grid-column: span 4; }
.tile p { color: var(--muted); max-width: 30rem; }
.t-lime { background: var(--lime); border-color: transparent; } .t-lime p { color: #3c4a10; }
.t-dark { background: var(--ink); border-color: transparent; color: #fff; } .t-dark p { color: #bcb6d1; }
.t-violet { background: var(--accent); border-color: transparent; color: #fff; } .t-violet p { color: #ddd5ff; }
.mini-chart { position: absolute; top: 1.6rem; inset-inline: 1.8rem; height: 110px; display: flex; align-items: flex-end; gap: 10px; }
.mini-chart i { flex: 1; background: #ece6ff; border-radius: 6px; height: 30%; animation: wave 3.4s ease-in-out infinite; }
.mini-chart i:nth-child(2) { height: 55%; animation-delay: .2s; } .mini-chart i:nth-child(3) { height: 42%; animation-delay: .4s; }
.mini-chart i:nth-child(4) { height: 80%; animation-delay: .6s; background: var(--accent); } .mini-chart i:nth-child(5) { height: 62%; animation-delay: .8s; }
.mini-chart i:nth-child(6) { height: 90%; animation-delay: 1s; } .mini-chart i:nth-child(7) { height: 70%; animation-delay: 1.2s; }
@keyframes wave { 50% { transform: scaleY(.7); } }
.mail { position: absolute; top: 1.6rem; inset-inline-start: 1.8rem; display: grid; gap: 7px; width: 120px; }
.mail span { height: 12px; border-radius: 6px; background: #1b163322; }
.mail span:nth-child(1) { width: 100%; } .mail span:nth-child(2) { width: 72%; } .mail span:nth-child(3) { width: 88%; }
.bell { position: absolute; top: 1.4rem; inset-inline-start: 1.8rem; animation: ring 2.6s ease-in-out infinite; transform-origin: top center; }
@keyframes ring { 0%, 60%, 100% { transform: rotate(0); } 10% { transform: rotate(14deg); } 20% { transform: rotate(-12deg); } 30% { transform: rotate(8deg); } 40% { transform: rotate(-5deg); } }
.share { position: absolute; top: 1.6rem; inset-inline-start: 1.8rem; display: flex; gap: .6rem; }
.share span { background: #ffffff26; border: 1px solid #ffffff40; border-radius: 10px; padding: .45rem .9rem; font-weight: 700; font-size: .85rem; }
@media (max-width: 900px) { .bento { grid-template-columns: 1fr 1fr; } .tile, .t-wide { grid-column: span 2; } }
@media (min-width: 560px) and (max-width: 900px) { .tile:not(.t-wide) { grid-column: span 1; } }

/* ---------- pricing ---------- */
.switch { display: inline-flex; align-items: center; gap: .8rem; margin-top: 1.6rem; font-weight: 600; font-size: .95rem; }
.switch .lab { cursor: pointer; color: var(--muted); } .switch .lab.on { color: var(--fg); }
.knob { width: 52px; height: 30px; border-radius: 99px; border: 0; background: var(--ink); position: relative; padding: 0; }
.knob i { position: absolute; top: 4px; inset-inline-start: 4px; width: 22px; height: 22px; border-radius: 50%; background: var(--lime); transition: transform .3s cubic-bezier(.3, 1.4, .5, 1); }
.knob.on i { transform: translateX(22px); }
[dir="rtl"] .knob.on i { transform: translateX(-22px); }
.save { font-style: normal; font-size: .75rem; background: var(--lime); padding: .2rem .6rem; border-radius: 99px; font-weight: 800; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; align-items: stretch; }
.plan { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 2rem; position: relative; display: flex; flex-direction: column; gap: 1rem; }
.plan.hot { background: var(--ink); color: #fff; border-color: var(--ink); transform: translateY(-12px); box-shadow: 0 40px 60px -34px rgba(91, 61, 245, .7); }
.plan .pd { color: var(--muted); font-size: .94rem; } .plan.hot .pd { color: #bcb6d1; }
.pop { position: absolute; top: -13px; inset-inline-start: 2rem; background: var(--lime); color: var(--ink); font-size: .75rem; font-weight: 800; padding: .25rem .8rem; border-radius: 99px; }
.price { display: flex; align-items: baseline; gap: .3rem; direction: ltr; }
[dir="rtl"] .price { justify-content: flex-end; }
.price::before { content: "$"; font-size: 1.4rem; font-weight: 700; }
.price b { font-size: 3.2rem; letter-spacing: -.04em; line-height: 1; }
.price span { color: var(--muted); font-size: .9rem; } .plan.hot .price span { color: #bcb6d1; }
.plan ul { display: grid; gap: .6rem; flex: 1; margin-bottom: .6rem; }
.plan li { padding-inline-start: 1.7rem; position: relative; font-size: .95rem; }
.plan li::before { content: ""; position: absolute; inset-inline-start: 0; top: .3em; width: 1.05rem; height: 1.05rem; border-radius: 50%; background: #ece6ff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' stroke='%235b3df5' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center/80% no-repeat; }
.plan.hot .btn-primary { background: var(--lime); color: var(--ink); }
.plan .btn { width: 100%; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } .plan.hot { transform: none; } }

/* ---------- faq ---------- */
.faq { margin-top: 2.5rem; display: grid; gap: .8rem; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1.2rem 1.5rem; transition: border-color .2s ease; }
.faq details[open] { border-color: var(--accent); }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--accent); transition: transform .3s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin-top: .8rem; animation: fade .4s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- cta + footer ---------- */
.cta { padding-bottom: 5rem; }
.cta-box { background: var(--accent); color: #fff; border-radius: 32px; padding: clamp(2.5rem, 6vw, 4.5rem); text-align: center; position: relative; overflow: hidden; }
.cta-box::before, .cta-box::after { content: ""; position: absolute; border-radius: 50%; background: #ffffff14; }
.cta-box::before { width: 300px; height: 300px; top: -120px; inset-inline-start: -80px; }
.cta-box::after { width: 220px; height: 220px; bottom: -100px; inset-inline-end: -40px; }
.cta-box > * { position: relative; }
.cta-box h2 { max-width: 20ch; margin-inline: auto; }
.cta-box p { color: #ddd5ff; margin-bottom: 1.8rem; }
.site-footer { border-top: 1px solid var(--line); padding: 2.5rem 0; color: var(--muted); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1.2rem; }
.site-footer .brand { color: var(--fg); margin-bottom: .3rem; }
.copy { font-size: .88rem; }

/* ---------- photography ---------- */
.hero { position: relative; isolation: isolate; }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; opacity: .16; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent); mask-image: linear-gradient(to bottom, #000 55%, transparent);
  animation: photoDrift 24s ease-in-out infinite alternate; }
@keyframes photoDrift { from { transform: scale(1.04); } to { transform: scale(1.12) translateY(-1.5%); } }
.photo-band { padding: clamp(3rem, 7vw, 6rem) 0; }
.pb-grid { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: 1fr 1fr; gap: 1rem; height: clamp(320px, 46vw, 560px); }
.pb-grid figure { margin: 0; overflow: hidden; border-radius: 18px; position: relative; }
.pb-grid figure:first-child { grid-row: span 2; }
.pb-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.pb-grid figure:hover img { transform: scale(1.06); }
@media (max-width: 700px) { .pb-grid { grid-template-columns: 1fr; grid-template-rows: none; height: auto; } .pb-grid figure, .pb-grid figure:first-child { grid-row: auto; aspect-ratio: 16 / 10; } }
@media (prefers-reduced-motion: reduce) { .hero-photo { animation: none; } }

/* ---------- form status (mailer.js) ---------- */
.mail-status { margin: .8rem 0 0; min-height: 1.4em; font-size: .95rem; font-weight: 500; }
.mail-status[data-state="ok"] { color: #1d8a4f; }
.mail-status[data-state="bad"] { color: #c0392b; }
.mail-status[data-state="busy"] { opacity: .7; }
form [aria-invalid="true"] { border-color: #c0392b !important; outline: 0; box-shadow: 0 0 0 3px #c0392b33; }
button[disabled] { opacity: .65; cursor: progress; }

/* ---------- inner pages (about, services, contact, 404) ---------- */
.inner .page-hero { min-height: 0 !important; height: auto !important; padding: 9.5rem 0 4.5rem !important; display: block !important; }
.inner .page-hero-copy { position: relative; max-width: 780px; }
.inner .page-hero h1 { margin: .8rem 0 1rem; }
.pg { background: var(--bg); color: var(--fg); --pg-r: min(18px, var(--btn-radius, 14px)); }
.pg-alt { background: color-mix(in srgb, var(--fg) 4%, var(--bg)); }
.pg-h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.15; margin-bottom: 1.2rem; font-family: var(--pg-head, inherit); font-weight: 700; }
.pg p { color: var(--muted); }
.pg-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.pg-split p { font-size: 1.08rem; max-width: 52ch; }
.pg-fig { margin: 0; border-radius: var(--pg-r); overflow: hidden; aspect-ratio: 4 / 3; background: var(--line); }
.pg-fig img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.pg-fig:hover img { transform: scale(1.05); }
.pg-duo { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1rem; margin-top: 2.5rem; }
.pg-duo .pg-fig { aspect-ratio: 16 / 11; }
.pg-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; margin-top: 2rem; }
.pg-card { background: var(--surface, color-mix(in srgb, var(--bg) 93%, var(--fg))); border: 1px solid var(--line); border-radius: var(--pg-r); padding: 1.7rem; transition: transform .35s ease, box-shadow .35s ease; }
.pg-card:hover { transform: translateY(-5px); box-shadow: 0 18px 40px -22px color-mix(in srgb, var(--fg) 45%, transparent); }
.pg-card .num { display: inline-grid; place-items: center; min-width: 2.4rem; height: 2.4rem; padding-inline: .5rem; border-radius: min(50%, var(--pg-r)); background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: .9rem; margin-bottom: 1rem; }
.pg-card h3 { font-size: 1.2rem; margin-bottom: .45rem; color: var(--fg); font-family: var(--pg-head, inherit); }
.pg-card a.more { display: inline-block; margin-top: 1rem; font-weight: 600; color: var(--accent); font-size: .92rem; }
.pg-card a.more:hover { text-decoration: underline; }
.pg-team { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem; margin-top: 2rem; text-align: center; }
.pg-team figure { margin: 0; }
.pg-team svg { width: 96px; height: 96px; margin: 0 auto 1rem; transition: transform .4s ease; }
.pg-team figure:hover svg { transform: rotate(-6deg) scale(1.06); }
.pg-team b { display: block; color: var(--fg); }
.pg-team span { color: var(--muted); font-size: .92rem; }
.pg-cta { background: var(--accent); color: var(--on-accent); text-align: center; padding: clamp(3rem, 7vw, 5rem) 0; }
.pg-cta h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); margin-bottom: 1.4rem; font-family: var(--pg-head, inherit); }
.pg-cta .btn { background: var(--on-accent); color: var(--accent); border-color: var(--on-accent); }
.pg-contact { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.pg-info { display: grid; gap: 1rem; }
.pg-info .pg-card { padding: 1.2rem 1.4rem; }
.pg-info small { display: block; text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; color: var(--accent); font-weight: 700; margin-bottom: .25rem; }
.pg-info p { color: var(--fg); font-weight: 500; margin: 0; }
.pg-form { background: var(--surface, color-mix(in srgb, var(--bg) 93%, var(--fg))); border: 1px solid var(--line); border-radius: var(--pg-r); padding: clamp(1.4rem, 3vw, 2.2rem); display: grid; gap: 1rem; }
.pg-form h2 { font-size: 1.5rem; font-family: var(--pg-head, inherit); }
.pg-form label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .35rem; color: var(--fg); }
.pg-form input, .pg-form textarea { width: 100%; padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: min(var(--field-radius, 12px), 14px); background: var(--bg); color: var(--fg); transition: border-color .2s, box-shadow .2s; }
.pg-form input:focus, .pg-form textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.pg-form .btn { justify-self: start; }
.pg-map { margin-top: clamp(2rem, 5vw, 3.5rem); border-radius: var(--pg-r); border: 1px solid var(--line); min-height: 260px; display: grid; place-items: center; text-align: center; padding: 2rem;
  background: repeating-linear-gradient(0deg, transparent 0 39px, var(--line) 39px 40px), repeating-linear-gradient(90deg, transparent 0 39px, var(--line) 39px 40px), color-mix(in srgb, var(--fg) 3%, var(--bg)); }
.pg-map svg { width: 44px; height: 44px; margin: 0 auto .8rem; color: var(--accent); animation: pgPin 2.4s ease-in-out infinite; }
@keyframes pgPin { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.pg-faq { max-width: 820px; margin-top: 1.5rem; display: grid; gap: .8rem; }
.pg-faq details { border: 1px solid var(--line); border-radius: var(--pg-r); background: var(--surface, color-mix(in srgb, var(--bg) 93%, var(--fg))); padding: 1rem 1.3rem; }
.pg-faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; color: var(--fg); }
.pg-faq summary::-webkit-details-marker { display: none; }
.pg-faq summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; line-height: 1; transition: transform .3s; }
.pg-faq details[open] summary::after { transform: rotate(45deg); }
.pg-faq details p { margin-top: .7rem; }
.pg-404 { text-align: center; }
.pg-404 .big { font-size: clamp(6rem, 22vw, 13rem); line-height: 1; font-weight: 800; color: transparent; -webkit-text-stroke: 2px var(--accent); letter-spacing: -.04em; animation: pgFloat 4s ease-in-out infinite; }
@keyframes pgFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.pg-foot { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; padding-block: 0 1.6rem; font-size: .9rem; }
.pg-foot a { opacity: .75; transition: opacity .2s; }
.pg-foot a:hover, .pg-foot a[aria-current] { opacity: 1; text-decoration: underline; }
.nav a[aria-current="page"] { opacity: 1; }
@media (max-width: 820px) { .pg-split, .pg-contact, .pg-duo { grid-template-columns: 1fr; } .inner .page-hero { padding-top: 8rem !important; } }
@media (prefers-reduced-motion: reduce) { .pg-map svg, .pg-404 .big { animation: none; } }

/* mobile overflow guards */
.hero{overflow:hidden;overflow:clip}
.pg-form,.pg-form input,.pg-form select,.pg-form textarea{min-width:0;max-width:100%}
.pg-form{box-sizing:border-box}
html,body{overflow-x:hidden;overflow-x:clip}

/* prevent sideways scroll on phones (scroll-reveal offsets) */
html, body { overflow-x: clip; }
