/* ============================================================================
   Byggas — public (pre-Flutter) website
   Shared stylesheet. Tokens mirrored from byggas_vibe_flutter byggs_colours.dart
   + docs/design/brand-bible.md. This site is intentionally independent of the
   Flutter app: a light, fast, static marketing/legal surface. The app is a
   destination within it ("Kom igång i appen", CTA → /app). See site/README.md.
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --ink: #1A1A1A;
  --paper: #FFFFFF;
  --mist: #F4F4F2;
  --stone: #8A8A85;
  --clay: #C4622D;
  --slate: #2B4C7E;
  --border: rgba(138, 138, 133, 0.3);
  --border-strong: #8A8A85;
  --border-inverse: rgba(255, 255, 255, 0.12);
  --border-inverse-strong: rgba(255, 255, 255, 0.22);

  --font: "Plus Jakarta Sans", -apple-system, system-ui, sans-serif;
  --maxw: 1100px;
  --header-h: 68px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { -webkit-tap-highlight-color: transparent; color: inherit; }
img { max-width: 100%; display: block; }

/* ── Typography scale ─────────────────────────────────────────────────────── */
.t-display { font-size: 56px; font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; }
.t-h1 { font-size: 40px; font-weight: 600; line-height: 1.1; letter-spacing: -0.025em; }
.t-h2 { font-size: 32px; font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; }
.t-h3 { font-size: 24px; font-weight: 500; line-height: 1.25; letter-spacing: -0.015em; }
.t-h4 { font-size: 20px; font-weight: 500; line-height: 1.3; letter-spacing: -0.01em; }
.t-body-lg { font-size: 18px; font-weight: 400; line-height: 1.65; }
.t-body { font-size: 16px; font-weight: 400; line-height: 1.65; }
.t-body-sm { font-size: 14px; font-weight: 400; line-height: 1.55; }
.t-label { font-size: 13px; font-weight: 500; line-height: 1.4; letter-spacing: 0.01em; }
.t-caption { font-size: 12px; font-weight: 400; line-height: 1.5; }
.t-overline { font-size: 11px; font-weight: 500; line-height: 1.35; letter-spacing: 0.08em; text-transform: uppercase; }

h1, h2, h3, h4, p { margin: 0; }
.muted { color: var(--stone); }
.clay { color: var(--clay); }
.slate { color: var(--slate); }

/* ── Header ───────────────────────────────────────────────────────────────── */
.byg-header {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 80px);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.byg-wordmark { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.byg-wordmark-dot { width: 17px; height: 17px; background: var(--clay); flex-shrink: 0; }
.byg-wordmark-text { font-weight: 600; font-size: 19px; letter-spacing: -0.02em; color: var(--ink); }

.byg-desk-nav { display: flex; align-items: center; gap: 28px; }
.byg-nav-link {
  font-size: 15px; font-weight: 400; color: var(--stone); text-decoration: none;
  border-bottom: 2px solid transparent; padding-bottom: 2px;
}
.byg-nav-link:hover { color: var(--ink); }
.byg-nav-link[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--clay); }
.byg-nav-divider { width: 1px; height: 18px; background: var(--border); }

.byg-lang { display: inline-flex; align-items: center; gap: 0; }
.byg-lang button {
  border: none; background: none; cursor: pointer; padding: 2px 6px;
  font-family: var(--font); font-size: 13px; font-weight: 400; color: var(--stone); letter-spacing: 0.01em;
}
.byg-lang button.is-active { color: var(--ink); font-weight: 600; }
.byg-lang .sep { color: var(--border); }

.byg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--ink); color: var(--paper); text-decoration: none;
  font-weight: 500; font-size: 15px; padding: 11px 22px; letter-spacing: 0.01em;
  border: none; cursor: pointer;
}
.byg-btn--sm { font-size: 14px; padding: 9px 16px; }
.byg-btn--clay { background: var(--clay); }

.byg-burger {
  display: none; border: none; background: none; cursor: pointer; padding: 6px;
  flex-direction: column; gap: 5px;
}
.byg-burger span { width: 22px; height: 2px; background: var(--ink); display: block; }

/* ── Mobile menu (full-screen sheet) ──────────────────────────────────────── */
.byg-mobile-menu { position: fixed; inset: 0; z-index: 100; background: var(--paper); display: none; flex-direction: column; }
.byg-mobile-menu.is-open { display: flex; }
.byg-mobile-menu-bar {
  height: var(--header-h); display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; border-bottom: 1px solid var(--border);
}
.byg-mobile-menu-close { border: none; background: none; cursor: pointer; font-size: 26px; color: var(--ink); line-height: 1; padding: 6px; }
.byg-mobile-menu-body { flex: 1; overflow-y: auto; padding: 8px 24px 32px; }
.byg-mobile-section { color: var(--stone); margin: 28px 0 4px; }
.byg-mobile-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0; border-bottom: 1px solid var(--border); text-decoration: none;
  font-size: 19px; font-weight: 400; color: var(--ink);
}
.byg-mobile-row .arrow { color: var(--stone); font-size: 16px; }
.byg-mobile-foot { margin-top: 32px; display: flex; align-items: center; justify-content: space-between; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.byg-footer { background: var(--ink); color: var(--paper); padding: clamp(40px, 6vw, 72px) clamp(20px, 5vw, 80px) 40px; }
.byg-foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; max-width: var(--maxw); }
.byg-foot-tagline { color: rgba(255, 255, 255, 0.7); margin-top: 14px; max-width: 280px; }
.byg-foot-pilot { color: var(--clay); margin-top: 16px; }
.byg-foot-coltitle { color: rgba(255, 255, 255, 0.5); margin-bottom: 14px; }
.byg-foot-link { font-size: 15px; color: rgba(255, 255, 255, 0.8); text-decoration: none; display: block; margin-bottom: 10px; }
.byg-foot-link:hover { color: var(--paper); }
.byg-foot-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15); margin-top: 40px; padding-top: 22px;
  display: flex; justify-content: space-between; align-items: center; max-width: var(--maxw);
}
.byg-footer .byg-lang button { color: rgba(255, 255, 255, 0.6); }
.byg-footer .byg-lang button.is-active { color: var(--paper); }
.byg-foot-rights { color: rgba(255, 255, 255, 0.5); }

/* ── Page / content layout ────────────────────────────────────────────────── */
.byg-page { padding: clamp(48px, 7vw, 96px) clamp(20px, 5vw, 80px); }
.byg-prose { max-width: 720px; }
.byg-prose h2 { margin: 40px 0 12px; }
.byg-prose h3 { margin: 28px 0 8px; }
.byg-prose p { color: #333; margin-bottom: 14px; }
.byg-prose ul { color: #333; padding-left: 20px; margin: 0 0 14px; }
.byg-prose li { margin-bottom: 6px; }
.byg-prose a { color: var(--slate); }
.byg-overline-clay { color: var(--clay); }

.byg-notice {
  border: 1px solid var(--border); border-left: 3px solid var(--clay);
  background: var(--mist); padding: 16px 20px; margin: 24px 0;
}

.byg-deftable { border-top: 1px solid var(--border); margin: 20px 0; max-width: 520px; }
.byg-deftable > div { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.byg-deftable dt { width: 190px; color: var(--stone); flex-shrink: 0; margin: 0; }
.byg-deftable dd { margin: 0; color: var(--ink); }

.byg-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 28px 0; }
.byg-step { border-top: 2px solid var(--clay); padding-top: 16px; }
.byg-step-n { color: var(--clay); margin-bottom: 8px; }

.byg-audience { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 28px 0; }
.byg-audience-card { border: 1px solid var(--border); padding: 24px; }

/* ── Landing (front door) ─────────────────────────────────────────────────── */
.byg-signin { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: calc(100vh - var(--header-h)); }
.byg-signin > * { min-width: 0; }
.byg-signin-col { display: flex; flex-direction: column; justify-content: center; padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 72px); }
.byg-signin-inner { max-width: 380px; width: 100%; margin: 0 auto; }
.byg-signin-cta {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 17px 24px; font-size: 16px; font-weight: 600; text-decoration: none;
  background: var(--clay); color: var(--paper); border: none; cursor: pointer;
}
.byg-crafter-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--slate); text-decoration: none; }
.byg-signin-preview { position: relative; overflow: hidden; display: flex; }

/* ── Slideshow (product preview) ──────────────────────────────────────────── */
.byg-slideshow { flex: 1; position: relative; background: var(--ink); overflow: hidden; min-height: 520px; }
.byg-slideshow-bars { position: absolute; top: 0; left: 0; right: 0; display: flex; gap: 8px; padding: 20px clamp(24px, 5vw, 80px) 0; z-index: 30; }
.byg-bar { flex: 1; height: 2px; background: rgba(255, 255, 255, 0.15); position: relative; overflow: hidden; }
.byg-bar-fill { position: absolute; inset: 0; background: var(--paper); transform-origin: left; transform: scaleX(0); }
.byg-bar.is-done .byg-bar-fill { transform: scaleX(1); }
.byg-bar.is-active .byg-bar-fill { animation: progress var(--slide-ms, 6000ms) linear forwards; }

.byg-slide { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.byg-slide.is-active { opacity: 1; pointer-events: auto; animation: fadeUp 250ms ease-out; }
.byg-panel { height: 100%; background: var(--ink); color: var(--paper); padding: 64px clamp(28px, 5vw, 80px); display: flex; flex-direction: column; position: relative; overflow: hidden; }
.byg-panel-label { color: rgba(255, 255, 255, 0.5); margin-bottom: 24px; display: flex; align-items: center; gap: 10px; }
.byg-card { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-inverse); padding: 28px 32px; flex: 1; display: flex; flex-direction: column; }
.byg-card-row { display: flex; gap: 16px; padding: 13px 0; border-top: 1px solid var(--border-inverse); }
.byg-card-row .k { width: 120px; color: rgba(255, 255, 255, 0.4); }
.byg-card-row .v { flex: 1; color: var(--paper); display: flex; align-items: center; gap: 10px; }
.byg-flag { font-size: 10px; font-weight: 500; padding: 2px 8px; color: rgba(255, 255, 255, 0.6); box-shadow: inset 0 0 0 1px var(--border-inverse-strong); }
.byg-spec-cost { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--border-inverse); }

/* before/after */
.byg-ba { flex: 1; position: relative; overflow: hidden; border: 1px solid var(--border-inverse); }
.byg-ba-after, .byg-ba-before { position: absolute; inset: 0; }
.byg-ba-after { background-image: repeating-linear-gradient(135deg, #D8A98B 0 18px, #CFA07F 18px 36px); }
.byg-ba-before-clip { position: absolute; top: 0; left: 0; bottom: 0; width: 50%; overflow: hidden; animation: ba-clip 6s ease-in-out infinite alternate; }
.byg-ba-before { background-image: repeating-linear-gradient(135deg, #EAE4D8 0 18px, #E2DBCB 18px 36px); width: 200%; }
.byg-ba-divider { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--paper); left: 50%; animation: ba-sweep-line 6s ease-in-out infinite alternate; box-shadow: 0 0 24px rgba(0,0,0,0.4); }
.byg-ba-tag { position: absolute; top: 20px; color: rgba(255,255,255,0.85); background: rgba(0,0,0,0.4); padding: 6px 10px; }

/* conversation */
.byg-chat { background: rgba(255,255,255,0.04); border: 1px solid var(--border-inverse); padding: 24px 28px; flex: 1; display: flex; flex-direction: column; gap: 14px; justify-content: flex-end; }
.byg-bubble { max-width: 80%; padding: 12px 16px; font-size: 15px; line-height: 1.55; }
.byg-bubble--ai { background: rgba(255,255,255,0.08); color: var(--paper); align-self: flex-start; }
.byg-bubble--user { background: var(--paper); color: var(--ink); align-self: flex-end; }
.byg-act { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.55); font-size: 12px; }

/* ── About page (homer / crafter perspective branch) ──────────────────────── */
.byg-about { --accent: var(--ink); --accent-tint: var(--mist); }
.byg-about[data-perspective="home"] { --accent: var(--clay); --accent-tint: rgba(196, 98, 45, 0.05); }
.byg-about[data-perspective="craft"] { --accent: var(--slate); --accent-tint: rgba(43, 76, 126, 0.05); }
.byg-ic { display: block; width: 24px; height: 24px; }

/* Sticky switcher (after a choice) */
.byg-switcher {
  position: sticky; top: var(--header-h); z-index: 30;
  background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(8px);
  border-top: 3px solid var(--accent); border-bottom: 1px solid var(--border);
  padding: 12px clamp(20px, 5vw, 80px);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.byg-switcher-label { font-size: 13px; font-weight: 600; color: var(--ink); letter-spacing: 0.01em; }
.byg-switcher-tabs { display: flex; gap: 8px; }
.byg-switcher-tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; cursor: pointer;
  border: none; white-space: nowrap; font-family: var(--font); font-size: 14px; font-weight: 500;
  background: var(--paper); color: var(--stone); box-shadow: inset 0 0 0 1px var(--border);
}
.byg-switcher-tab .byg-ic { width: 16px; height: 16px; }
.byg-switcher-tab.is-active { color: var(--paper); box-shadow: none; }
.byg-switcher-tab.is-active[data-perspective="home"] { background: var(--clay); }
.byg-switcher-tab.is-active[data-perspective="craft"] { background: var(--slate); }

/* Hero */
.byg-about-hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px);
  align-items: center; padding: clamp(40px, 6vw, 72px) clamp(20px, 5vw, 80px);
}
.byg-about-hero-copy > * { min-width: 0; }
.byg-hero-h { margin: 18px 0 22px; text-wrap: balance; }
.byg-hero-p { max-width: 480px; text-wrap: pretty; }

/* Chooser (forced choice) */
.byg-chooser { background: var(--mist); padding: clamp(20px, 3vw, 28px); box-shadow: inset 0 0 0 1px var(--border); }
.byg-chooser-h { margin: 4px 0 6px; }
.byg-chooser-p { margin-bottom: 20px; }
.byg-chooser-opts { display: flex; flex-direction: column; gap: 12px; }
.byg-chooser-opt {
  width: 100%; text-align: left; border: none; cursor: pointer; font-family: var(--font);
  display: flex; align-items: center; gap: 16px; padding: 16px 18px;
  background: var(--paper); box-shadow: inset 0 0 0 1px var(--border);
}
.byg-chooser-opt:hover { box-shadow: inset 0 0 0 1px var(--border-strong); }
.byg-chooser-opt-ic { width: 46px; height: 46px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--paper); }
.byg-chooser-opt-ic .byg-ic { width: 23px; height: 23px; }
.byg-chooser-opt--home .byg-chooser-opt-ic { background: var(--clay); }
.byg-chooser-opt--craft .byg-chooser-opt-ic { background: var(--slate); }
.byg-chooser-opt-body { flex: 1; min-width: 0; }
.byg-chooser-opt-title { color: var(--ink); margin-bottom: 2px; }
.byg-chooser-opt-sub { color: var(--stone); }
.byg-chooser-opt--home .byg-chooser-opt-arrow { color: var(--clay); }
.byg-chooser-opt--craft .byg-chooser-opt-arrow { color: var(--slate); }
.byg-chooser-opt-arrow .byg-ic { width: 20px; height: 20px; }

/* Photo placeholder (striped swatch) */
.byg-photo {
  position: relative; overflow: hidden; min-height: 200px; height: 100%; width: 100%;
  background-color: #B8A99A;
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 14px, transparent 14px 28px);
}
.byg-photo--tall { min-height: 320px; }
.byg-photo--clay { background-color: var(--clay); }
.byg-photo--slate { background-color: var(--slate); }
.byg-photo-label { position: absolute; left: 16px; bottom: 14px; color: rgba(255, 255, 255, 0.85); }

/* Journey */
.byg-journey { padding: clamp(40px, 6vw, 64px) clamp(20px, 5vw, 80px); background: var(--accent-tint); }
.byg-journey-over { color: var(--accent); }
.byg-journey-h { margin: 10px 0 28px; }
.byg-journey-banner { margin-bottom: 40px; }
.byg-journey-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(24px, 3vw, 32px); }
.byg-journey-step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.byg-journey-step-n {
  width: 36px; height: 36px; flex-shrink: 0; background: var(--accent); color: var(--paper);
  display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px;
}
.byg-journey-step-rule { flex: 1; height: 1px; background: var(--border); }
.byg-journey-step-title { margin-bottom: 8px; }
.byg-journey-step-desc { text-wrap: pretty; }

/* Trust strip */
.byg-trust-sec { padding: clamp(40px, 6vw, 64px) clamp(20px, 5vw, 80px); }
.byg-trust-sec > .t-overline { color: var(--stone); }
.byg-trust { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--border); margin-top: 28px; }
.byg-trust-cell { padding: 30px 30px 8px 0; }
.byg-trust-cell + .byg-trust-cell { border-left: 1px solid var(--border); padding-left: 30px; }
.byg-trust-ic { width: 48px; height: 48px; background: var(--mist); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; color: var(--ink); }
.byg-trust-title { margin-bottom: 8px; }

/* FAQ */
.byg-faq-sec { padding: clamp(40px, 6vw, 64px) clamp(20px, 5vw, 80px); }
.byg-faq-sec > .t-overline { color: var(--stone); }
.byg-faq { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); margin-top: 20px; }
.byg-faq-row { border-top: 1px solid var(--border); }
.byg-faq-q {
  width: 100%; text-align: left; border: none; background: none; cursor: pointer;
  display: flex; align-items: flex-start; gap: 16px; padding: 20px 0; font-family: var(--font);
}
.byg-faq-qt { flex: 1; font-size: 18px; font-weight: 500; line-height: 1.3; letter-spacing: -0.01em; color: var(--ink); text-wrap: pretty; }
.byg-faq-chev { margin-top: 2px; flex-shrink: 0; color: var(--stone); display: flex; transition: transform 0.2s; }
.byg-faq-chev .byg-ic { width: 20px; height: 20px; }
.byg-faq-q[aria-expanded="true"] .byg-faq-chev { transform: rotate(180deg); }
.byg-faq-a { padding: 0 36px 20px 0; margin-top: -4px; text-wrap: pretty; }

/* CTA band */
.byg-ctaband {
  background: var(--ink); padding: clamp(36px, 5vw, 56px) clamp(20px, 5vw, 80px);
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.byg-ctaband-h { color: var(--paper); text-wrap: balance; max-width: 560px; }
.byg-ctaband-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.byg-ctaband-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px;
  font-family: var(--font); font-weight: 500; font-size: 15px; text-decoration: none; color: var(--paper);
  border: none; cursor: pointer;
}
.byg-ctaband-btn--clay { background: var(--clay); }
.byg-ctaband-btn--accent { background: var(--accent); }
.byg-ctaband-btn--outline { background: transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35); }
.byg-ctaband-btn:hover { opacity: 0.92; }

/* ── Keyframes ────────────────────────────────────────────────────────────── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ba-clip { 0% { width: 25%; } 100% { width: 75%; } }
@keyframes ba-sweep-line { 0% { left: 25%; } 100% { left: 75%; } }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .byg-journey-steps { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .byg-desk-nav { display: none; }
  .byg-burger { display: flex; }
  .byg-foot-grid { grid-template-columns: 1fr; gap: 32px; }
  .byg-signin { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .byg-signin-preview { min-height: 0; }
  .byg-slideshow { min-height: 440px; }
  .byg-panel { padding: 28px 20px; }
  .byg-steps { grid-template-columns: 1fr; }
  .byg-audience { grid-template-columns: 1fr; }
  .byg-about-hero { grid-template-columns: 1fr; }
  .byg-journey-steps { grid-template-columns: 1fr; }
  .byg-trust { grid-template-columns: 1fr; }
  .byg-trust-cell { padding: 26px 0 8px; }
  .byg-trust-cell + .byg-trust-cell { border-left: none; border-top: 1px solid var(--border); padding-left: 0; }
  .byg-faq { grid-template-columns: 1fr; gap: 0; }
  .byg-photo--tall { min-height: 240px; }
  .byg-ctaband { gap: 24px; }
  .t-h1 { font-size: 32px; }
  .t-display { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .byg-bar.is-active .byg-bar-fill,
  .byg-ba-before-clip, .byg-ba-divider { animation: none; }
}
