/* Guiden: tre flikar (ägare, kund, personal), steg för steg, och en animerad scen per flik */

.g-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; padding-top: 32px; padding-bottom: 40px; max-width: 760px; }
.g-hero h1 { font-weight: 800; font-size: clamp(38px, 5.4vw, 60px); line-height: 1; letter-spacing: -0.025em; }
.g-hero h1 span { color: var(--tomato); }

/* Flikarna. Utan JavaScript göms de, och alla tre avsnitten visas efter varandra */
.g-tabs { display: none; }
.js .g-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.g-tab { font: inherit; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; border-radius: 24px; background: var(--paper); color: var(--ink); border: 2px solid var(--line); box-shadow: var(--shadow-card); transition: transform .2s ease, border-color .2s ease; }
.g-tab:hover { transform: translateY(-2px); }
.g-tab[aria-selected="true"] { border-color: var(--tomato-deep); }
.g-tab .step-num { width: 40px; height: 40px; font-size: 20px; flex: none; }
.g-tab .g-tab-text { display: flex; flex-direction: column; gap: 4px; }
.g-tab strong { font-family: var(--display); font-size: 22px; line-height: 26px; color: var(--ink); }
.g-tab span:last-child { font-size: 15px; line-height: 22px; color: var(--ink-muted); }
@media (max-width: 760px) {
  .js .g-tabs { grid-template-columns: 1fr; gap: 10px; }
  .g-tab { flex-direction: row; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 18px; }
  .g-tab strong { font-size: 19px; line-height: 24px; }
}

/* Ett avsnitt */
.g-panel { padding-top: 56px; display: flex; flex-direction: column; gap: 56px; scroll-margin-top: 16px; }
.g-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; align-items: center; }
@media (max-width: 900px) { .g-top { grid-template-columns: 1fr; gap: 28px; } }
.g-intro { display: flex; flex-direction: column; gap: 18px; }
.g-intro h2 { font-weight: 800; font-size: clamp(30px, 4vw, 44px); line-height: 1.05; letter-spacing: -0.02em; }
.g-need { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.g-need h3 { font-size: 18px; line-height: 24px; font-weight: 700; }
.g-need .checks li { font-size: 16px; }

/* Stegen */
.g-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; counter-reset: gstep; }
.g-step { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 20px; padding: 22px 24px; background: var(--paper); border-radius: 24px; box-shadow: var(--shadow-card); }
.g-step .g-ico { grid-row: 1 / span 3; width: 56px; height: 56px; border-radius: 18px; display: flex; align-items: center; justify-content: center; background: var(--blush); color: var(--tomato-deep); position: relative; }
.g-step .g-ico::after { counter-increment: gstep; content: counter(gstep); position: absolute; top: -8px; left: -8px; width: 26px; height: 26px; border-radius: 999px; background: var(--ink); color: var(--cream); font-family: var(--display); font-weight: 800; font-size: 14px; line-height: 26px; text-align: center; }
.g-step h3 { font-weight: 700; font-size: 22px; line-height: 28px; }
.g-step p { color: var(--ink); }
.g-note { margin-top: 8px; padding: 10px 14px; border-radius: 14px; background: #fff1d9; font-size: 15px; line-height: 22px; }
.g-note strong { font-weight: 700; }
@media (max-width: 600px) {
  .g-step { grid-template-columns: 44px minmax(0, 1fr); padding: 18px 16px; gap: 2px 14px; }
  .g-step .g-ico { width: 44px; height: 44px; border-radius: 14px; }
  .g-step h3 { font-size: 20px; }
}

.g-sub { display: flex; flex-direction: column; gap: 20px; }
.g-sub > h2 { font-weight: 700; font-size: 32px; line-height: 38px; letter-spacing: -0.01em; }
.g-sub > p { max-width: 640px; }

/* Inställningar och bonuskort */
.g-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .g-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .g-grid { grid-template-columns: 1fr; } }
.g-item { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.g-item strong { font-family: var(--display); font-size: 18px; line-height: 24px; }
.g-item span { font-size: 15px; line-height: 22px; color: var(--ink-muted); }
.g-bonus { background: var(--blush); border-radius: 32px; padding: 40px 32px; display: flex; flex-direction: column; gap: 24px; scroll-margin-top: 16px; }
@media (max-width: 600px) { .g-bonus { padding: 28px 18px; border-radius: 24px; } }
.g-bonus .card { flex: none; }
.g-bonus .card .g-ico { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--cream); color: var(--tomato-deep); }

/* Frågor och krångel */
.g-help { max-width: 760px; }

/* Avslut */
.g-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 28px 32px; border-radius: 28px; background: var(--tomato-deep); color: var(--cream); }
.g-end h2 { font-weight: 800; font-size: 30px; line-height: 34px; letter-spacing: -0.02em; }
.g-end .btn-primary { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.g-end .btn-primary:hover { background: var(--sun); color: var(--ink); }
.g-end .btn-secondary { color: var(--cream); border-color: var(--cream); }
.g-end .btn-secondary:hover { background: var(--cream); color: var(--ink); }

/* ---------- Scenerna ---------- */
.g-stage { position: relative; height: 320px; border-radius: 28px; overflow: hidden; border: 1px solid var(--line); background: radial-gradient(120% 90% at 50% 100%, #ffe2a6 0%, #fff1d9 45%, var(--cream) 80%); }
.g-stage.s-kund { background: radial-gradient(120% 90% at 50% 100%, #fbd0bd 0%, #fde6da 45%, var(--cream) 80%); }
.g-stage.s-personal { background: radial-gradient(120% 90% at 50% 100%, #e7d6c3 0%, #f3e8dc 45%, var(--cream) 80%); }
.g-scene { position: absolute; left: 50%; top: 0; width: 520px; height: 320px; margin-left: -260px; --d: 10s; }
.g-scene.d4 { --d: 13s; }
@media (max-width: 600px) {
  .g-stage { height: 206px; }
  .g-scene { transform: scale(.64); transform-origin: top center; }
}

/* Bildtexter som byter med scenen */
.g-cap { position: absolute; z-index: 5; left: 50%; top: 4px; transform: translateX(-50%); padding: 5px 14px; border-radius: 999px; background: var(--ink); color: var(--cream); font-size: 13px; line-height: 18px; font-weight: 700; white-space: nowrap; opacity: 0; }
.g-cap.g-static { opacity: 1; }

/* Skärmar som tonar över i varandra i telefonen */
.g-pane { position: absolute; inset: 0; display: flex; flex-direction: column; opacity: 0; }
.g-pane.g-static { opacity: 1; }
.g-pane .sheet-pass, .g-pane .sheet-btn { animation: none; }

.g3-1 { animation: g3a var(--d) ease-in-out infinite; }
.g3-2 { animation: g3b var(--d) ease-in-out infinite; }
.g3-3 { animation: g3c var(--d) ease-in-out infinite; }
.g4-1 { animation: g4a var(--d) ease-in-out infinite; }
.g4-2 { animation: g4b var(--d) ease-in-out infinite; }
.g4-3 { animation: g4c var(--d) ease-in-out infinite; }
.g4-4 { animation: g4d var(--d) ease-in-out infinite; }
@keyframes g3a { 0%, 29% { opacity: 1; } 33.3%, 96% { opacity: 0; } 100% { opacity: 1; } }
@keyframes g3b { 0%, 29% { opacity: 0; } 33.3%, 62% { opacity: 1; } 66.6%, 100% { opacity: 0; } }
@keyframes g3c { 0%, 62% { opacity: 0; } 66.6%, 95% { opacity: 1; } 100% { opacity: 0; } }
@keyframes g4a { 0%, 22% { opacity: 1; } 25%, 96% { opacity: 0; } 100% { opacity: 1; } }
@keyframes g4b { 0%, 22% { opacity: 0; } 25%, 47% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes g4c { 0%, 47% { opacity: 0; } 50%, 72% { opacity: 1; } 75%, 100% { opacity: 0; } }
@keyframes g4d { 0%, 72% { opacity: 0; } 75%, 96% { opacity: 1; } 100% { opacity: 0; } }

/* Skärmarna i telefonerna */
.g-form { background: #fffaf3; padding: 36px 12px 12px; gap: 8px; }
.gf-head { display: flex; align-items: center; gap: 6px; }
.gf-head img { width: 20px; height: 20px; }
.gf-head strong { font-family: var(--display); font-size: 13px; }
.g-form p { font-size: 9px; line-height: 12px; color: var(--ink-muted); }
.g-form label { font-size: 9px; font-weight: 700; margin-top: 4px; }
.gf-input { height: 28px; border-radius: 8px; border: 1.5px solid var(--line-strong); background: #fff; display: flex; align-items: center; padding: 0 8px; font-size: 11px; font-weight: 700; }
.gf-input b { display: inline-block; overflow: hidden; white-space: nowrap; width: 4ch; animation: g-type var(--d) steps(4) infinite; }
.gf-input::after { content: ""; width: 1.5px; height: 14px; margin-left: 2px; background: var(--tomato-deep); animation: g-blink 1s steps(2) infinite; }
.gf-btn { margin-top: auto; padding: 9px; border-radius: 10px; background: var(--tomato-deep); color: var(--cream); font-size: 10px; font-weight: 700; text-align: center; }
@keyframes g-type { 0%, 36% { width: 0; } 46%, 100% { width: 4ch; } }
@keyframes g-blink { 50% { opacity: 0; } }
.g-link { position: absolute; z-index: 3; left: 10px; right: 10px; bottom: 14px; padding: 7px 10px; border-radius: 999px; background: rgba(255, 253, 249, .96); font-size: 9px; font-weight: 700; text-align: center; color: var(--ink); }
.g-result { background: #fffdf9; padding: 40px 12px 12px; gap: 8px; align-items: center; text-align: center; }
.g-result .big-ok { width: 44px; height: 44px; border-radius: 999px; background: var(--leaf); color: #fff; display: flex; align-items: center; justify-content: center; }
.g-result strong { font-family: var(--display); font-size: 17px; line-height: 20px; }
.g-result > span { font-size: 10px; color: var(--ink-muted); }
.g-dots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin: 6px 0; }
.g-dots i { width: 17px; height: 17px; border-radius: 999px; background: var(--tomato-deep); }
.g-dots i.off { background: none; border: 1.5px dashed var(--line-strong); }
.g-result .gf-btn { width: 100%; }
.g-result .gf-btn.ghost { background: none; color: var(--ink-muted); border: 1.5px solid var(--line); }
.g-done { background: var(--sun); padding: 52px 12px 12px; gap: 8px; align-items: center; text-align: center; }
.g-done .big-ok { width: 52px; height: 52px; border-radius: 999px; background: var(--ink); color: var(--sun); display: flex; align-items: center; justify-content: center; }
.g-done strong { font-family: var(--display); font-size: 17px; line-height: 20px; }
.g-done span { font-size: 10px; font-weight: 700; }

/* Kundens scen */
.s-kund .tent { left: 34px; bottom: 30px; }
.g-chips { position: absolute; right: 12px; top: 120px; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.g-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: #fff; font-size: 13px; font-weight: 700; box-shadow: 0 10px 20px -12px rgba(43, 24, 16, .5); }
.g-chip svg { width: 20px; height: 20px; }
.g-chip:nth-child(2) { margin-right: 22px; }

/* Personalens scen */
.s-personal .setup-card { left: 34px; right: auto; top: 96px; transform: rotate(-5deg); animation: none; }
.s-personal .g-chips { top: 96px; }

/* Ägarens scen */
.o-panel { position: absolute; left: 26px; top: 34px; width: 236px; padding: 14px 16px; border-radius: 18px; background: #fff; box-shadow: 0 24px 36px -20px rgba(43, 24, 16, .5); display: flex; flex-direction: column; gap: 8px; }
.o-panel > strong { font-family: var(--display); font-size: 15px; }
.o-field { display: flex; flex-direction: column; gap: 3px; font-size: 10px; font-weight: 700; color: var(--ink-muted); }
.o-field em { display: flex; align-items: center; min-height: 26px; padding: 0 8px; border: 1.5px solid var(--line); border-radius: 8px; font-style: normal; font-size: 12px; color: var(--ink); background: var(--paper); }
.o-typed { display: inline-block; overflow: hidden; white-space: nowrap; width: 12ch; animation: o-type var(--d) steps(12) infinite; }
@keyframes o-type { 0% { width: 0; } 14%, 100% { width: 12ch; } }
.o-sw { display: flex; gap: 8px; }
.o-sw i { width: 22px; height: 22px; border-radius: 999px; }
.o-sw i:nth-child(1) { background: #2b1810; animation: o-ring1 var(--d) infinite; }
.o-sw i:nth-child(2) { background: #c2361d; animation: o-ring2 var(--d) infinite; box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--ink); }
.o-sw i:nth-child(3) { background: #2f7a5b; animation: o-ring3 var(--d) infinite; }
.o-sw i:nth-child(4) { background: #ffc145; }
@keyframes o-ring1 { 0%, 18% { box-shadow: none; } 22%, 44% { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--ink); } 48%, 100% { box-shadow: none; } }
@keyframes o-ring2 { 0%, 44% { box-shadow: none; } 48%, 66% { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--ink); } 70%, 100% { box-shadow: none; } }
@keyframes o-ring3 { 0%, 66% { box-shadow: none; } 70%, 92% { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--ink); } 96%, 100% { box-shadow: none; } }
.o-save { margin-top: 2px; padding: 8px; border-radius: 10px; background: var(--ink); color: var(--cream); font-size: 11px; font-weight: 700; text-align: center; animation: o-save var(--d) infinite; }
@keyframes o-save { 0%, 72% { background: var(--ink); } 76%, 90% { background: var(--leaf); } 96%, 100% { background: var(--ink); } }
.o-card { position: absolute; right: 36px; top: 44px; width: 214px; padding: 14px; border-radius: 18px; background: var(--tomato-deep); color: var(--cream); display: flex; flex-direction: column; gap: 10px; transform: rotate(4deg); box-shadow: 0 26px 36px -18px rgba(43, 24, 16, .6); animation: o-color var(--d) ease-in-out infinite; }
@keyframes o-color { 0%, 20% { background: #2b1810; } 28%, 44% { background: #2b1810; } 50%, 66% { background: #c2361d; } 72%, 100% { background: #2f7a5b; } }
.o-card .sc-dots { grid-template-columns: repeat(5, 1fr); }
.o-card .sc-dots i { width: 22px; height: 22px; }
.o-card > span { font-size: 11px; font-weight: 700; }
.o-sheet { position: absolute; left: 286px; top: 196px; width: 122px; padding: 10px 10px 12px; border-radius: 6px; background: #fff; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; box-shadow: 0 18px 26px -14px rgba(43, 24, 16, .6); transform: rotate(-5deg); animation: o-sheet var(--d) cubic-bezier(.2, .8, .2, 1) infinite; }
.o-sheet strong { font-family: var(--display); font-size: 10px; line-height: 12px; }
.o-sheet > span { font-size: 8px; line-height: 10px; color: var(--ink-muted); }
.o-sheet .tent-qr { box-shadow: 0 0 0 1.5px var(--tomato); }
@keyframes o-sheet { 0%, 74% { opacity: 0; transform: translateY(40px) rotate(-5deg); } 84%, 94% { opacity: 1; transform: rotate(-5deg); } 100% { opacity: 0; transform: rotate(-5deg); } }
