/* Glid – felles designsystem.
   Fargene er de samme som i Android-appen (ui/theme/Color.kt). */

:root {
  --bg:            #F2F5F1;
  --ink:           #12211D;
  --brand:         #175247;
  --orange:        #FF6B35;
  --orange-cta:    #FF5B24;
  --orange-light:  #FF8A5C;
  --success:       #1E7A5F;
  --tint:          #E8F3EE;
  --badge-bg:      #FDEBE7;
  --badge-text:    #C2542E;
  --hairline:      #E3E9E5;
  --handle:        #D8E0DC;
  --dashed:        #B9C8C2;
  --chip-neutral:  #F0F2F0;
  --muted:         #7C8A85;
  --secondary:     #5C6B66;
  --body-alt:      #3C4A45;
  --on-dark-muted: #9DB3AC;
  --live:          #4ADE80;
  --chart-fill:    #CBE5DA;

  --shell: 1120px;
  --radius-card: 28px;
  --section-pad: clamp(48px, 7vw, 88px);
  --panel-pad: clamp(28px, 4vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }

/* Flere komponenter her setter display, som ellers ville overstyrt [hidden]. */
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; background: var(--bg); }

body {
  font-family: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); }
a:hover { color: var(--orange); }

h1, h2, h3 { margin: 0; font-weight: 800; text-wrap: pretty; }

img, svg { max-width: 100%; }

.shell { max-width: var(--shell); margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* ---------- Toppfelt ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 18px 24px;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand__name { font-weight: 800; font-size: 22px; color: var(--ink); }

.site-nav { display: flex; align-items: center; gap: 22px; font-weight: 500; font-size: 14px; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a strong { color: var(--ink); font-weight: 800; }
.site-nav a:hover, .site-nav a:hover strong { color: var(--orange); }

.btn-cta {
  background: var(--orange-cta);
  color: #fff;
  text-decoration: none;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13.5px;
  white-space: nowrap;
}
.btn-cta:hover { color: #fff; background: var(--orange); }

/* ---------- Hero ---------- */

.hero {
  background: var(--brand);
  border-radius: var(--radius-card);
  max-width: var(--shell);
  margin: 8px auto 0;
  padding: clamp(36px, 6vw, 72px) clamp(24px, 5vw, 64px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px;
}

.hero__copy { flex: 1 1 380px; min-width: 0; }

.hero h1 {
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(38px, 5.2vw, 60px);
  line-height: 1.05;
}

.steps { display: flex; flex-direction: column; gap: 12px; margin: 0 0 30px; }
.step { display: flex; align-items: center; gap: 12px; }
.step__num {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; flex-shrink: 0;
}
.step__text { color: #fff; font-size: 16.5px; }
.step__text strong { font-weight: 700; }
.step__text span { color: var(--on-dark-muted); }

.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: flex; align-items: center; gap: 10px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  border-radius: 14px;
  padding: 10px 18px;
}
.store:hover { color: #fff; background: #1b2f29; }
.store__lines { display: flex; flex-direction: column; line-height: 1.15; }
.store__kicker { font-size: 10.5px; color: var(--on-dark-muted); }
.store__name { font-weight: 700; font-size: 16px; }

/* ---------- Telefonmockup ---------- */

.hero__phone { flex: 0 1 300px; margin: 0 auto; }

.phone {
  width: min(300px, 100%);
  background: var(--ink);
  border-radius: 44px;
  padding: 10px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}
.phone__screen { border-radius: 36px; overflow: hidden; background: var(--bg); }
.phone__screen img { display: block; width: 100%; height: auto; }

.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); }
.dot--pulse { animation: pulseDot 2s infinite; }

.handle { width: 40px; height: 4px; border-radius: 2px; background: var(--handle); margin: 0 auto 16px; }

/* ---------- Statistikk ---------- */

.stat__value { font-weight: 800; font-size: 26px; }
.stat__label { font-size: 10.5px; letter-spacing: 0.8px; color: var(--muted); }

/* ---------- Seksjoner ---------- */

.section { max-width: var(--shell); margin: 0 auto; padding: var(--section-pad) 24px 0; }
.section--intro { padding-bottom: 8px; }
.section--last { padding-bottom: var(--section-pad); }

.kicker { font-size: 12px; font-weight: 600; letter-spacing: 1.2px; color: var(--muted); margin-bottom: 10px; }
.section h2 { font-size: clamp(26px, 3.4vw, 38px); }

/* Overskrift over hver funksjonsseksjon, i samme stil som menyen:
   verbet i full farge, resten dempet. */
.section__title { margin: 0 0 22px; color: var(--muted); font-weight: 600; }
.section .section__title { font-size: clamp(30px, 4.4vw, 50px); }
.section__title strong { color: var(--ink); font-weight: 800; }

.panel {
  background: #fff;
  border-radius: var(--radius-card);
  border: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  padding: var(--panel-pad);
}
.panel__copy { flex: 1 1 340px; min-width: 0; }
.panel__demo { flex: 1 1 300px; min-width: 0; }
.feature__visual .phone { margin: 0 auto; }
.panel__copy h3 { margin: 0 0 14px; font-size: clamp(24px, 3vw, 34px); }
.panel__copy p { margin: 0 0 24px; color: var(--body-alt); font-size: 15.5px; line-height: 1.6; max-width: 52ch; }
.panel__copy p:last-child { margin-bottom: 0; }

.btn-brand {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 700;
  font-size: 14px;
}
.btn-brand:hover { background: #103F36; color: #fff; }

.demo { background: var(--bg); border-radius: 22px; padding: 18px; max-width: 420px; margin: 0 auto; }

.card { background: #fff; border-radius: 16px; padding: 14px 16px; }

/* ---------- Bla mellom funksjoner ---------- */

/* Uten JS vises alle funksjonene under hverandre. landing.js legger på
   .feature--on, lager pillene og viser én funksjon om gangen. Sidene og
   bildene ligger stablet i samme rutenettcelle, så seksjonen holder
   høyden til den høyeste og siden under ikke hopper når man blar. */

.feature__tabs {
  display: flex;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  padding: 4px;
  margin-bottom: 24px;
  background: var(--chip-neutral);
  border-radius: 999px;
  overflow-x: auto;
  scrollbar-width: none;
}
.feature__tabs::-webkit-scrollbar { display: none; }
.feature__tab {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: var(--secondary);
  border-radius: 999px;
  padding: 8px 16px;
  font-family: inherit;
  font-weight: 700;
  font-size: 13.5px;
  white-space: nowrap;
  cursor: pointer;
}
.feature__tab:hover { color: var(--ink); }
.feature__tab:focus { outline: none; }
.feature__tab:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.feature__tab[aria-selected="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(18, 33, 29, 0.12);
}

/* Funksjoner som krever Glid Pro får et lite merke i pillen. */
.feature__pro {
  display: inline-block;
  margin-left: 2px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  vertical-align: 1px;
}

/* Pillene og toppen av bildet står på samme linje. */
.feature { align-items: flex-start; }

.feature:not(.feature--on) .feature__slide + .feature__slide { margin-top: 36px; }
.feature:not(.feature--on) .feature__visual ~ .feature__visual { display: none; }

.feature--on .feature__slides,
.feature--on .feature__visuals { display: grid; }
.feature--on .feature__slide,
.feature--on .feature__visual {
  grid-area: 1 / 1;
  align-self: start;
  transition: opacity 0.25s, visibility 0.25s;
}
.feature--on .feature__slide:not(.is-active),
.feature--on .feature__visual:not(.is-active) { opacity: 0; visibility: hidden; }

/* ---------- Planlegging ---------- */

.field-label { font-size: 12px; font-weight: 600; letter-spacing: 1px; color: var(--muted); margin-bottom: 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.chip {
  border: 1px solid var(--handle);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 20px;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }

.suggestions { display: flex; flex-direction: column; gap: 10px; }
.suggestion {
  display: flex; align-items: center; gap: 13px;
  background: #F5F8F5;
  border-radius: 18px;
  padding: 13px 16px;
}
.suggestion__icon {
  width: 40px; height: 40px; border-radius: 13px;
  background: var(--tint);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.suggestion__body { flex: 1; min-width: 0; }
.suggestion__name { font-weight: 700; font-size: 14.5px; }
.suggestion__meta { font-size: 12px; color: var(--muted); }
.suggestion__num { text-align: right; }
.suggestion__km { font-weight: 800; font-size: 16px; }
.suggestion__time { font-size: 11px; color: var(--muted); }

/* ---------- Live-deling ---------- */

.live-map {
  position: relative;
  height: 180px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(140deg, #DCE9E2, #EDF3EE 60%, #D3E4DA);
}
.live-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }

.follower {
  display: flex; align-items: center; gap: 12px;
  background: #fff;
  border-radius: 16px;
  padding: 14px 16px;
  margin-top: -30px;
  position: relative;
  box-shadow: 0 8px 24px rgba(18, 33, 29, 0.10);
}
.avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px;
  flex-shrink: 0;
}
.follower__body { flex: 1; min-width: 0; }
.follower__name { font-weight: 700; font-size: 14.5px; }
.follower__meta { font-size: 12px; color: var(--muted); }

.tag-live {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--tint); color: var(--success);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 11.5px; font-weight: 700;
}

/* ---------- Fliser ---------- */

.tile { flex: 1; background: #fff; border-radius: 16px; padding: 12px 14px; }
.tile__value { font-weight: 800; font-size: 22px; }
.tile__label { font-size: 10.5px; letter-spacing: 0.8px; color: var(--muted); }

/* ---------- Vær ---------- */

.weather-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.weather-head__name { font-weight: 700; font-size: 14.5px; }
.weather-head__meta { font-size: 12px; color: var(--muted); }
.weather-head__temp { display: flex; align-items: center; gap: 8px; }
.weather-head__temp span { font-weight: 800; font-size: 26px; }

.weather-row { display: flex; gap: 10px; margin-top: 10px; }
.weather-row .tile--accent { background: var(--tint); }
.weather-row .tile--accent .tile__value,
.weather-row .tile--accent .tile__label { color: var(--success); }
.weather-row .tile__value { font-size: 17px; }

.along { display: flex; justify-content: space-between; gap: 8px; }
.along div { text-align: center; }
.along__place { font-size: 11.5px; color: var(--muted); }
.along__temp { font-weight: 800; font-size: 15px; }

/* ---------- Om oss ---------- */

.about {
  background: var(--tint);
  border-radius: var(--radius-card);
  padding: clamp(28px, 4vw, 56px);
  display: flex; flex-wrap: wrap; gap: 32px; align-items: center;
}
.about .kicker { color: var(--success); }
.about h2 { margin: 0 0 14px; font-size: clamp(24px, 3vw, 34px); }
.about p { margin: 0; color: var(--body-alt); font-size: 15.5px; line-height: 1.6; max-width: 58ch; }
.about__body { flex: 1 1 340px; min-width: 0; }
.about__mail {
  background: var(--brand); color: #fff;
  text-decoration: none;
  border-radius: 999px;
  padding: 14px 28px;
  font-weight: 700; font-size: 15px;
  white-space: nowrap;
}
.about__mail:hover { color: #fff; background: var(--ink); }

/* ---------- Bunn ---------- */

.site-footer { background: var(--ink); padding: 28px 24px; }
.site-footer__inner {
  max-width: var(--shell); margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.site-footer .brand__name { color: #fff; font-size: 16px; }
.site-footer__note { color: var(--on-dark-muted); font-size: 12.5px; }

/* ---------- Animasjoner ---------- */

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55); }
  60%      { box-shadow: 0 0 0 9px rgba(74, 222, 128, 0); }
}

@keyframes pulseMarker {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.45); }
  60%      { box-shadow: 0 0 0 14px rgba(255, 107, 53, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .dot--pulse, .glid-marker { animation: none; }
  .feature__slide, .feature__visual { transition: none !important; }
  * { scroll-behavior: auto; }
}

/* ---------- Responsivt ---------- */

/* På desktop står alle bildene i en like bred kolonne helt til høyre, og
   toppfeltet får samme sidemarg som kortene (seksjonsmarg 24px + kant 1px),
   så bilder og tekst står rett over hverandre nedover siden. */
@media (min-width: 761px) {
  .hero { padding-left: calc(var(--panel-pad) + 25px); padding-right: calc(var(--panel-pad) + 25px); }
  .hero__phone { margin-right: 0; }
  .panel { display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
}

@media (max-width: 760px) {
  .site-nav a:not(.btn-cta) { display: none; }
  .hero { border-radius: 0; margin-top: 0; }
  .stat__value { font-size: 22px; }

  /* Pillene blir en rad man sveiper sidelengs. Raden går helt ut til
     kanten av kortet, så neste pille stikker fram og viser at det er mer. */
  .feature__tabs {
    width: auto;
    max-width: none;
    gap: 8px;
    margin: 0 calc(-1 * var(--panel-pad)) 22px;
    padding: 0 var(--panel-pad);
    scroll-padding: 0 var(--panel-pad);
    background: none;
    border-radius: 0;
  }
  /* Bildet står under teksten på mobil, så kortet følger høyden til den
     valgte siden i stedet for den høyeste. Ellers blir det et tomrom over
     bildet når en kort side er valgt. */
  .feature--on .feature__slide:not(.is-active) { display: none; }

  .feature__tab { background: var(--chip-neutral); }
  .feature__tab[aria-selected="true"] { background: var(--brand); color: #fff; box-shadow: none; }
}
