/* ==========================================================================
   Concept pages – shared base
   Used by every page in /concepts. Each page sets its own palette and fonts
   with the --c-* tokens in its <style> block. Uses system fonts only, so
   nothing is loaded from other websites and the pages work offline.
   ========================================================================== */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--pw-bar-h) + var(--c-header-h, 64px) + 12px); }
body { margin: 0; min-height: 100vh; padding-top: var(--pw-bar-h); font-family: var(--c-font-body, system-ui, sans-serif); color: var(--c-text); background: var(--c-bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.15; font-family: var(--c-font-head, inherit); }
p { margin: 0 0 1em; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }

:root { --pw-bar-h: 48px; }

/* ---------- Accessibility helpers ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--c-focus, #2f7dff); outline-offset: 3px; }
.c-skip { position: fixed; left: -9999px; top: calc(var(--pw-bar-h) + 0.5rem); z-index: 200; padding: 0.6rem 1rem; background: var(--c-text); color: var(--c-bg); border-radius: 8px; }
.c-skip:focus { left: 1rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ==========================================================================
   Project Web preview bar (same on every concept, styled like the main site)
   ========================================================================== */
.pw-bar {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--pw-bar-h);
  display: flex; align-items: center; gap: 0.5rem; padding: 0 max(0.6rem, env(safe-area-inset-left));
  background: rgba(5, 7, 13, 0.96); border-bottom: 1px solid rgba(92, 225, 255, 0.35);
  color: #fff; font: 500 0.8rem/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  backdrop-filter: blur(10px);
}
.pw-bar-label { display: flex; align-items: center; gap: 0.3rem; margin: 0 auto 0 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #a9b3c8; }
.pw-bar-label strong { color: #5ce1ff; font-weight: 600; }
.pw-bar-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #5ce1ff; box-shadow: 0 0 10px #5ce1ff; }
.pw-btn {
  flex: none; display: inline-flex; align-items: center; gap: 0.35rem; height: 34px; padding: 0 0.8rem;
  border-radius: 999px; text-decoration: none; font-weight: 600; white-space: nowrap; color: #fff;
  border: 1px solid rgba(120, 170, 255, 0.35); background: rgba(255, 255, 255, 0.05); transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}
.pw-btn:hover { background: rgba(255, 255, 255, 0.12); }
.pw-btn-glow { border-color: transparent; background: linear-gradient(135deg, #1e6bff, #3d82ff); box-shadow: 0 0 0 1px rgba(92, 225, 255, 0.45), 0 0 18px rgba(30, 107, 255, 0.6); animation: pw-glow 2.6s ease-in-out infinite; }
.pw-btn-glow:hover { background: linear-gradient(135deg, #2f7dff, #5c97ff); transform: translateY(-1px); }
@keyframes pw-glow { 50% { box-shadow: 0 0 0 1px rgba(92, 225, 255, 0.7), 0 0 28px rgba(92, 225, 255, 0.55); } }
.pw-bar :focus-visible { outline: 2px solid #5ce1ff; outline-offset: 2px; }
/* Phones show short labels; wider screens show the full wording. */
@media (max-width: 399px) {
  .pw-bar { gap: 0.35rem; padding: 0 0.5rem; font-size: 0.72rem; }
  .pw-bar-dot { display: none; }
  .pw-btn { height: 32px; padding: 0 0.6rem; }
}
@media (max-width: 359px) { .pw-back-text { display: none; } }
.pw-long { display: none; }
@media (min-width: 400px) { .pw-bar-label .pw-long { display: inline; } .pw-bar-label .pw-short { display: none; } }
@media (min-width: 720px) { .pw-btn .pw-long { display: inline; } .pw-btn .pw-short { display: none; } .pw-bar { padding: 0 1rem; font-size: 0.85rem; } }

/* ==========================================================================
   Shared concept building blocks (each page restyles them with its tokens)
   ========================================================================== */
.c-wrap { width: min(100% - 2.5rem, 1140px); margin-inline: auto; }
.c-section { padding: clamp(3.5rem, 9vw, 6rem) 0; }
.c-eyebrow { display: inline-block; margin-bottom: 0.6rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c-accent); }

/* Sticky in-concept header + mobile menu */
.c-header { position: sticky; top: var(--pw-bar-h); z-index: 50; background: var(--c-header-bg, var(--c-bg)); border-bottom: 1px solid var(--c-line); }
.c-header-inner { display: flex; align-items: center; gap: 1rem; height: var(--c-header-h, 64px); }
.c-brand { display: flex; align-items: center; gap: 0.55rem; margin-right: auto; text-decoration: none; font-weight: 800; }
.c-menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--c-line); border-radius: 10px; background: transparent; }
.c-menu-btn svg { width: 22px; height: 22px; }
.c-nav { position: absolute; inset: 100% 0 auto 0; display: none; flex-direction: column; padding: 0.5rem 1.25rem 1rem; background: var(--c-header-bg, var(--c-bg)); border-bottom: 1px solid var(--c-line); }
.c-nav.open { display: flex; }
.c-nav a { padding: 0.75rem 0; text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--c-line); }
.c-nav a:last-child { border-bottom: 0; }
@media (min-width: 860px) {
  .c-menu-btn { display: none; }
  .c-nav { position: static; display: flex; flex-direction: row; align-items: center; gap: 1.6rem; padding: 0; background: none; border: 0; }
  .c-nav a { padding: 0.4rem 0; border: 0; }
}

/* Buttons */
.c-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 46px; padding: 0.7rem 1.4rem; border: 2px solid transparent; border-radius: var(--c-radius-btn, 10px); font-weight: 700; text-decoration: none; background: var(--c-accent); color: var(--c-on-accent); transition: transform 0.2s, filter 0.2s, background 0.2s; }
.c-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.c-btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.c-btn svg { width: 18px; height: 18px; }

/* Grids */
.c-grid { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .c-grid-2 { grid-template-columns: repeat(2, 1fr); } .c-grid-3, .c-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .c-grid-3 { grid-template-columns: repeat(3, 1fr); } .c-grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* Filter / tab buttons */
.c-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.5rem; }
.c-chip { min-height: 40px; padding: 0.45rem 1rem; border-radius: 999px; border: 1px solid var(--c-line-strong, var(--c-line)); background: transparent; font-weight: 600; font-size: 0.9rem; }
.c-chip[aria-pressed="true"], .c-chip[aria-selected="true"] { background: var(--c-accent); color: var(--c-on-accent); border-color: var(--c-accent); }
[data-cat][hidden], [role="tabpanel"][hidden] { display: none !important; }

/* Forms */
.c-form { display: grid; gap: 0.9rem; }
.c-field { display: grid; gap: 0.3rem; }
.c-field label, .c-legend { font-weight: 600; font-size: 0.92rem; }
.c-field input, .c-field select, .c-field textarea { width: 100%; min-height: 46px; padding: 0.65rem 0.85rem; border: 1px solid var(--c-line-strong, var(--c-line)); border-radius: var(--c-radius-input, 8px); background: var(--c-input-bg, #fff); color: var(--c-input-text, #111); }
.c-field textarea { min-height: 110px; resize: vertical; }
.c-field [aria-invalid="true"] { border-color: #d6293e; box-shadow: 0 0 0 2px rgba(214, 41, 62, 0.25); }
.c-form-row { display: grid; gap: 0.9rem; }
@media (min-width: 640px) { .c-form-row { grid-template-columns: 1fr 1fr; } }
.c-form-msg { margin: 0; padding: 0.85rem 1rem; border-radius: 8px; font-weight: 600; background: var(--c-msg-bg, #e8f6ee); color: var(--c-msg-text, #14532d); }
.c-form-msg.error { background: #fde8eb; color: #8a1027; }

/* Testimonials */
.c-quote { margin: 0; padding: 1.5rem; border-radius: var(--c-radius, 14px); background: var(--c-surface); border: 1px solid var(--c-line); }
.c-quote blockquote { margin: 0 0 1rem; font-size: 1.02rem; }
.c-quote figcaption { font-weight: 700; font-size: 0.92rem; }
.c-sample-tag { display: inline-block; margin-bottom: 0.8rem; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; border: 1px dashed currentColor; opacity: 0.75; }
.c-stars { color: var(--c-star, #f5b301); letter-spacing: 2px; margin-bottom: 0.5rem; }

/* Footer note */
.c-footer { padding: 3rem 0 2rem; }
.c-concept-note { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 1.5rem; padding: 0.35rem 0.8rem; border-radius: 999px; font-size: 0.8rem; font-weight: 600; border: 1px dashed currentColor; opacity: 0.85; }

/* Toast: "This is a concept preview, nothing was sent" */
.c-toast { position: fixed; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 300; width: min(100% - 2rem, 420px); padding: 0.9rem 1.1rem; border-radius: 12px; background: #111827; color: #fff; font: 600 0.92rem/1.4 system-ui, sans-serif; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35); transform: translate(-50%, 150%); transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.c-toast.show { transform: translate(-50%, 0); }

/* ==========================================================================
   Embedded preview (html.pw-embed is set when a page runs inside an iframe,
   i.e. the live card previews on the main site): show only the site itself.
   ========================================================================== */
.pw-embed { --pw-bar-h: 0px; overflow: hidden; scrollbar-width: none; }
.pw-embed::-webkit-scrollbar { display: none; }
.pw-embed .pw-bar, .pw-embed .c-skip, .pw-embed .c-toast { display: none !important; }
