/* =========================================================================
   AuraicPulse website designs gallery (served at /templates).
   Loads after the public site's stylesheet (/assets/css/site.css), which
   gives the tokens, fonts, nav, footer, buttons, phone tab bar and More
   sheet. Everything here is gallery only and prefixed g- so it never
   collides with site.css. The token block repeats the site's values so the
   page still reads right if site.css is missing (standalone dev server).
   ========================================================================= */
:root {
  --bg: #04050a;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --glass: rgba(255, 255, 255, 0.035);
  --glass-2: rgba(255, 255, 255, 0.06);
  --ink: #eef3fb;
  --muted: #9ba5b8;
  --cyan: #5ec8ff;
  --violet: #a78bfa;
  --grad: linear-gradient(100deg, #7dd3fc 0%, #5ec8ff 35%, #a78bfa 75%, #f0abfc 100%);
  --display: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --r: 20px;
  --ease: cubic-bezier(0.22, 0.7, 0.18, 1);
  /* Room the site's phone tab bar takes (site.css pads the body by 84px on phones). */
  --g-bar: 0px;
}
@media (max-width: 760px) { :root { --g-bar: calc(84px + env(safe-area-inset-bottom, 0px)); } }

.g-page { background: var(--bg); color: var(--ink); font-family: var(--sans); }
.g-page section { padding: 0; }
.g-page .wrap { max-width: 1240px; }
.g-page :where(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* ---------- Hero ---------- */
.g-hero { padding: 132px 0 28px !important; }
.g-hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2.5rem, 6.2vw, 4.6rem); line-height: 1.02; letter-spacing: -0.045em; margin: 0 0 18px; max-width: 14ch; }
.g-hero .lead { max-width: 640px; }
.g-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 32px; }
.g-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.g-steps li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)); font-size: 14px; color: var(--muted); line-height: 1.45; }
.g-steps b { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font: 600 13px/1 var(--mono); color: #03121c; background: linear-gradient(180deg, #8fdcff, #4fb8f0); }
.g-steps strong { color: var(--ink); font-weight: 600; }
.g-step-note { display: none; }
.g-library { margin-top: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(167, 139, 250, 0.45); background: rgba(167, 139, 250, 0.1); color: #e4dcff; font-size: 14px; }
.g-library[hidden] { display: none; }

/* ---------- Find: collections, search, filters ---------- */
.g-find { padding: 12px 0 8px !important; }
.g-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 10px; margin: 0 -2px; scroll-snap-type: x proximity; }
.g-tabs::-webkit-scrollbar { display: none; }
.g-tab { flex: none; scroll-snap-align: start; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 56px; padding: 9px 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--glass); color: var(--muted); text-align: left; transition: border-color 0.2s, background 0.2s, color 0.2s; }
.g-tab b { font-family: var(--display); font-size: 16px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.g-tab small { font-size: 12.5px; }
.g-tab:hover { border-color: var(--line-2); background: var(--glass-2); }
.g-tab.active { border-color: rgba(94, 200, 255, 0.6); background: linear-gradient(180deg, rgba(94, 200, 255, 0.16), rgba(167, 139, 250, 0.08)); color: #cfe6f5; box-shadow: 0 10px 30px -18px rgba(94, 200, 255, 0.9); }

.g-search { position: relative; margin: 10px 0 12px; }
.g-search svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.g-search input { width: 100%; height: 54px; padding: 0 18px 0 48px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(8, 10, 18, 0.7); color: var(--ink); font: 500 16px/1 var(--sans); outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.g-search input::placeholder { color: #8791a5; }
.g-search input:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(94, 200, 255, 0.15); }

.g-filters { border: 1px solid var(--line); border-radius: 18px; background: var(--glass); padding: 4px 14px 8px; }
.g-filters summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; font-size: 14.5px; }
.g-filters summary::-webkit-details-marker { display: none; }
.g-filters summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-3px); transition: transform 0.2s; }
.g-filters[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.g-filters summary small { font-weight: 500; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.g-chip-block { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.g-chip-label { flex: none; width: 88px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.g-chip-row { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.g-chip { min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: #c9d1de; font-size: 14px; font-weight: 500; transition: border-color 0.2s, background 0.2s, color 0.2s; }
.g-chip:hover { border-color: var(--line-2); color: var(--ink); }
.g-chip.active { border-color: transparent; background: linear-gradient(180deg, #8fdcff, #4fb8f0); color: #03121c; font-weight: 600; }

.g-result-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 2px 4px; color: var(--muted); font-size: 14px; }
.g-link { border: 0; background: none; padding: 10px 0; min-height: 44px; color: var(--cyan); font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(94, 200, 255, 0.4); }
.g-link:hover { color: #a6e4ff; }

/* ---------- Grid of designs ---------- */
.g-list { padding: 18px 0 40px !important; }
#templates, #find, .g-col { scroll-margin-top: 96px; }
.g-grid { display: grid; gap: 56px; }
.g-col-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 18px; }
.g-col-head h2 { font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.1; letter-spacing: -0.03em; margin: 0; }
.g-col-head span { font-family: var(--mono); font-size: 12px; color: var(--cyan); border: 1px solid rgba(94, 200, 255, 0.35); border-radius: 999px; padding: 2px 10px; }
.g-col-head p { flex-basis: 100%; color: var(--muted); max-width: 640px; font-size: 15px; margin: 0; }
.g-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; }

.g-card { position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: var(--r); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)); overflow: hidden; transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s; }
.g-card:hover { transform: translateY(-4px); border-color: rgba(94, 200, 255, 0.35); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(94, 200, 255, 0.12); }
.g-thumb { position: relative; display: block; aspect-ratio: 16 / 11; overflow: hidden; background: radial-gradient(90% 80% at 15% 0%, color-mix(in oklab, var(--card-accent, #5ec8ff) 22%, transparent), transparent 60%), linear-gradient(160deg, #10131d, #07080d); }
.g-desk, .g-phone { position: absolute; overflow: hidden; background: #0b0d14; }
.g-desk { left: 6%; top: 8%; width: 76%; bottom: 9%; z-index: 1; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 24px 50px -18px rgba(0, 0, 0, 0.8); display: flex; flex-direction: column; }
.g-bar { display: flex; align-items: center; gap: 6px; flex: none; padding: 8px 10px; background: #1a1d26; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.g-bar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); flex: none; }
.g-phone { right: 5%; bottom: 0; width: 25%; aspect-ratio: 9 / 17.5; z-index: 2; border-radius: 20px 20px 0 0; border: 4px solid #1b1e28; border-bottom: 0; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), -14px 0 40px -12px rgba(0, 0, 0, 0.8); transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
.g-screen { position: relative; flex: 1; overflow: hidden; height: 100%; container-type: size; }
.g-screen img { position: absolute; left: 0; top: 0; width: 100%; height: auto; transition: transform 5s cubic-bezier(0.45, 0, 0.35, 1); }
.g-card:hover .g-screen img, .g-thumb:focus-visible .g-screen img { transform: translateY(calc(-100% + 100cqh)); }
.g-card:hover .g-phone { transform: translateY(-6px); }
.g-body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 16px 16px 18px; }
.g-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.g-name { font-family: var(--display); font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-cat { flex: none; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: #b8c2d4; border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 10px; }
.g-style { margin: 0; font-size: 14.5px; color: var(--ink); }
.g-desc { margin: 0; flex: 1; font-size: 14px; color: var(--muted); line-height: 1.5; }
.g-actions { display: flex; gap: 8px; margin-top: 6px; }
.g-actions .btn { flex: 1; min-height: 46px; font-size: 14.5px; }

/* Heart on the card (drawn by ap-feedback.js, positioned here) */
.g-card .apf-heart { top: 12px; right: 12px; width: 44px; height: 44px; z-index: 5; }

/* Server-rendered list for search engines and no-JS visitors (replaced by the live grid) */
.g-seo { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; list-style: none; margin: 0; padding: 0; }
.g-seo li a { display: block; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--glass); }
.g-seo li b { display: block; font-family: var(--display); font-size: 17px; }
.g-seo li span { display: block; color: var(--muted); font-size: 14px; }

.g-empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.g-empty[hidden] { display: none; }
.g-empty p { margin: 0 0 14px; font-size: 16px; }

/* ---------- Closing call to action ---------- */
.g-close { padding: 24px 0 72px !important; }
.g-close-box { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: center; padding: 36px; border-radius: 26px; border: 1px solid var(--line-2); background: radial-gradient(120% 140% at 0% 0%, rgba(94, 200, 255, 0.14), transparent 55%), radial-gradient(120% 140% at 100% 100%, rgba(167, 139, 250, 0.14), transparent 55%), rgba(8, 10, 18, 0.7); }
.g-close-box h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 12px; }
.g-close-actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.g-close-actions .g-link { text-align: center; }
.g-note { margin: 18px 0 0; font-size: 13.5px; color: var(--muted); }

/* ---------- Floating "My picks" (above the site's phone tab bar) ---------- */
.g-fab { position: fixed; z-index: 880; right: 18px; bottom: calc(var(--g-bar) + 18px); display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(94, 200, 255, 0.5); background: rgba(8, 10, 18, 0.9); color: var(--ink); font-weight: 600; font-size: 14.5px; box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(94, 200, 255, 0.15); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity 0.25s, transform 0.25s; }
.g-fab.on { opacity: 1; transform: none; pointer-events: auto; }
.g-fab span { color: #ff8aa5; font-size: 17px; }
.g-page [data-apf-picks]:not(.g-fab) { position: relative; overflow: visible; }
.g-page [data-apf-picks] .apf-badge { top: -6px; right: -6px; }
body.sheet-open .g-fab,
body:has(.modal-overlay.active) .g-fab,
body:has(#apf-tray.on) .g-fab,
body:has(.g-modal:not([hidden])) .g-fab { opacity: 0; pointer-events: none; }

/* ---------- Personaliser ---------- */
.g-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; }
.g-modal[hidden] { display: none; }
.g-modal-backdrop { position: absolute; inset: 0; background: rgba(2, 4, 10, 0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.g-modal-card { position: relative; width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 28px; border-radius: 24px; border: 1px solid var(--line-2); background: #0b0e17; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.9); color-scheme: dark; }
.g-modal-card h2 { font-family: var(--display); font-size: 1.7rem; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 6px; }
.g-modal-card .kicker { margin-bottom: 10px; }
.g-modal-lead, .g-modal-hint { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.g-modal-hint { margin: 4px 0 18px; font-size: 13px; }
.g-modal-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--glass); color: var(--ink); font-size: 22px; line-height: 1; }
.g-modal-card form { display: grid; gap: 14px; }
.g-modal-card label { display: grid; gap: 6px; font-size: 13px; color: #c3cbd9; }
.g-modal-card label[hidden] { display: none; }
.g-modal-card input, .g-modal-card select { width: 100%; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.05); color: var(--ink); font: 500 16px/1.2 var(--sans); outline: none; }
.g-modal-card input:focus, .g-modal-card select:focus { border-color: var(--cyan); }
.g-modal-card select option { background: #14161f; color: var(--ink); }
.g-city-row { display: flex; gap: 8px; }
.g-city-row input { flex: 1; min-width: 0; }
.g-modal-actions { display: flex; gap: 10px; }
.g-modal-actions .btn { flex: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .g-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-close-box { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .g-page .wrap { padding: 0 16px; }
  .g-hero { padding: 96px 0 12px !important; }
  .g-hero-actions .btn { flex: 1 1 100%; }
  .g-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .g-steps li { flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; text-align: center; font-size: 13px; }
  .g-steps .g-step-more { display: none; }
  .g-step-note { display: block; margin: 12px 0 0; color: var(--muted); font-size: 13.5px; }
  .g-tab { min-height: 52px; padding: 8px 14px; }
  .g-tab small { display: none; }
  .g-chip-block { flex-direction: column; align-items: flex-start; gap: 6px; }
  .g-chip-label { width: auto; }
  .g-chip-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: calc(100% + 28px); margin: 0 -14px; padding: 2px 14px 4px; }
  .g-chip-row::-webkit-scrollbar { display: none; }
  .g-chip { flex: none; min-height: 44px; }
  .g-grid { gap: 40px; }
  .g-close-box { padding: 24px 18px; }
  .g-fab { right: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .g-screen img, .g-phone, .g-card, .g-fab { transition: none; }
}
html.is-hidden .g-page *, html.is-hidden .g-page *::before { animation-play-state: paused !important; }
.g-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
