/*
 * The public GridWise site: gridwise.no and the portal's public pages (login,
 * registrering, kontakt, tilbud, eksempelrapport, kundeside) share this one
 * file, so a visitor never crosses into a different-looking page. It is the
 * portal's own soft-surfaces system at marketing scale: grey canvas, white
 * surfaces lifted by a soft shadow (never an outline), 14px surfaces and 8px
 * controls, blue for anything clickable, the logo's cyan only as the slanted
 * strip on section headings. Sora for headings, Inter for text.
 *
 * Everything is scoped under .gwb-site so it can sit inside the portal app
 * without touching the app's own styles. Needs tokens.css first.
 */
.gwb-site { background: var(--gwb-canvas); color: var(--gwb-ink); font: 400 17px/1.6 var(--gwb-font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; min-height: 100svh; display: flex; flex-direction: column; }
body.gwb-site { margin: 0; }
.gwb-site *, .gwb-site *::before, .gwb-site *::after { box-sizing: border-box; }
.gwb-site :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote) { margin: 0; padding: 0; }
.gwb-site :where(ul, ol) { list-style: none; }
.gwb-site :where(h1, h2, h3) { font-family: var(--gwb-font-display); font-weight: 600; letter-spacing: -.025em; line-height: 1.08; text-wrap: balance; color: var(--gwb-ink); }
.gwb-site h1 { font-size: clamp(38px, 3.2vw + 18px, 64px); letter-spacing: -.03em; }
.gwb-site h2 { font-size: clamp(28px, 1.6vw + 18px, 40px); }
.gwb-site h3 { font-size: clamp(20px, .5vw + 17px, 24px); letter-spacing: -.015em; }
:where(.gwb-site a) { color: inherit; } /* zero specificity: any class wins, whatever the load order */
.gwb-site img { display: block; max-width: 100%; height: auto; }
.gwb-site :focus-visible { outline: 2px solid var(--gwb-accent); outline-offset: 3px; border-radius: 4px; }
.gwb-site main { flex: 1; }
.gwb-wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 clamp(18px, 3vw, 32px); }
.gwb-narrow { max-width: 820px; }
.gwb-lead { font-size: clamp(18px, .4vw + 16px, 21px); line-height: 1.5; color: var(--gwb-ink-2); max-width: 40ch; }
.gwb-muted { color: var(--gwb-muted); }
.gwb-small { font-size: 14.5px; }
.gwb-skip { position: absolute; left: 16px; top: -64px; z-index: 20; background: var(--gwb-ink); color: #fff; padding: 10px 14px; border-radius: var(--gwb-radius-control); text-decoration: none; }
.gwb-skip:focus { top: 12px; }

/* Section heading with the logo's slanted cyan strip. */
.gwb-strip { position: relative; padding-left: 16px; }
.gwb-strip::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 5px; background: var(--gwb-cyan); transform: skewY(-24deg); border-radius: 1px; }

/* Buttons: one shape, the portal's 8px control. */
.gwb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border: 0; border-radius: var(--gwb-radius-control); background: var(--gwb-accent); color: #fff; font: 600 15.5px/1 var(--gwb-font); text-decoration: none; cursor: pointer; box-shadow: 0 1px 2px rgba(4, 27, 77, .22); transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.gwb-btn:hover { background: var(--gwb-accent-hover); }
.gwb-btn:active { transform: translateY(1px); }
.gwb-btn-quiet { background: var(--gwb-paper); color: var(--gwb-ink); box-shadow: var(--gwb-lift-control); }
.gwb-btn-quiet:hover { background: var(--gwb-paper); box-shadow: 0 0 0 1px rgba(4, 27, 77, .16), 0 2px 6px rgba(4, 27, 77, .08); }
.gwb-btn-light { background: #fff; color: var(--gwb-ink); box-shadow: none; }
.gwb-btn-light:hover { background: var(--gwb-accent-soft); }
.gwb-btn-sm { min-height: 38px; padding: 0 14px; font-size: 14.5px; }
.gwb-link { color: var(--gwb-accent); font-weight: 600; text-decoration: none; }
.gwb-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.gwb-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Surfaces */
.gwb-surface { background: var(--gwb-paper); border-radius: var(--gwb-radius-surface); box-shadow: var(--gwb-lift); }
.gwb-well { background: var(--gwb-sunk); border-radius: var(--gwb-radius-control); }
.gwb-shot { display: block; overflow: hidden; border-radius: 12px; background: #fff; box-shadow: var(--gwb-lift-float); }
.gwb-shot img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.gwb-browser { overflow: hidden; border-radius: var(--gwb-radius-surface); background: #fff; box-shadow: var(--gwb-lift-float); }
.gwb-browser-bar { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; background: #eef2f7; }
.gwb-browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #cfd8e3; }
.gwb-browser-bar span { margin-left: 12px; padding: 3px 12px; border-radius: 6px; background: #fff; color: var(--gwb-muted); font-size: 13px; }
.gwb-tag { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--gwb-accent-soft); color: var(--gwb-accent); font-size: 13px; font-weight: 600; }
.gwb-tag-free { background: #e2f8fc; color: #04657a; }

/* Header */
.gwb-header { position: sticky; top: 0; z-index: 10; background: var(--gwb-canvas); transition: box-shadow .2s ease; }
.gwb-header.is-scrolled { box-shadow: 0 1px 0 rgba(4, 27, 77, .06), 0 6px 18px -10px rgba(4, 27, 77, .18); }
.gwb-header-row { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.gwb-brand { display: inline-flex; flex: none; }
.gwb-brand img { height: 26px; width: auto; }
.gwb-nav { display: flex; align-items: center; gap: 2px; margin-left: 8px; }
.gwb-nav a { padding: 8px 11px; border-radius: var(--gwb-radius-control); color: var(--gwb-ink-2); font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.gwb-nav a:hover { background: var(--gwb-paper); color: var(--gwb-ink); box-shadow: var(--gwb-lift-control); }
.gwb-nav a[aria-current="page"] { color: var(--gwb-ink); background: var(--gwb-paper); box-shadow: var(--gwb-lift-control); }
.gwb-header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.gwb-menu-button { display: none; }
@media (max-width: 1080px) {
  .gwb-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 2px; margin: 0; padding: 8px clamp(18px, 3vw, 32px) 18px; background: var(--gwb-canvas); box-shadow: 0 12px 24px -16px rgba(4, 27, 77, .3); }
  .gwb-nav a { padding: 12px; font-size: 17px; }
  .gwb-header.is-open .gwb-nav { display: flex; }
  .gwb-menu-button { display: inline-flex; }
}
@media (max-width: 560px) {
  .gwb-header-actions .gwb-btn-quiet:not(.gwb-menu-button) { display: none; }
  .gwb-brand img { height: 22px; }
}

/* Footer */
.gwb-footer { margin-top: clamp(96px, 10vw, 140px); background: var(--gwb-navy); color: #c3cfe3; font-size: 15px; }
.gwb-footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 32px; padding-top: 64px; padding-bottom: 48px; }
.gwb-footer img { height: 24px; width: auto; }
.gwb-footer p { margin-top: 16px; max-width: 32ch; }
.gwb-footer h2 { font: 600 15px/1.4 var(--gwb-font); letter-spacing: 0; color: #fff; margin-bottom: 12px; }
.gwb-footer li { margin: 8px 0; }
.gwb-footer a { text-decoration: none; }
.gwb-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.gwb-footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 20px; padding-bottom: 28px; background: rgba(0, 0, 0, .14); font-size: 13.5px; color: #93a5c4; max-width: none; padding-left: max(clamp(18px, 3vw, 32px), calc((100% - 1240px) / 2 + clamp(18px, 3vw, 32px))); padding-right: max(clamp(18px, 3vw, 32px), calc((100% - 1240px) / 2 + clamp(18px, 3vw, 32px))); }
.gwb-footer-base a { text-decoration: underline; text-underline-offset: 2px; }
.gwb-footer :focus-visible { outline-color: var(--gwb-cyan); }
@media (max-width: 860px) { .gwb-footer-grid { grid-template-columns: 1fr 1fr; } .gwb-footer-grid > :first-child { grid-column: 1 / -1; } }

/* Section rhythm */
.gwb-section { padding-top: clamp(80px, 8vw, 120px); }
.gwb-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px 40px; margin-bottom: 32px; }
.gwb-section-head p { max-width: 48ch; color: var(--gwb-ink-2); }

/* Page hero for inner pages */
.gwb-page-hero { padding-top: clamp(40px, 5vw, 72px); }
.gwb-page-hero .gwb-lead { margin-top: 18px; }
.gwb-page-hero .gwb-actions { margin-top: 28px; }

/* Long text: legal pages, FAQ */
.gwb-prose { max-width: 70ch; }
.gwb-prose h1 { margin-bottom: 8px; }
.gwb-prose h2 { font-size: 24px; margin-top: 40px; margin-bottom: 10px; }
.gwb-prose p, .gwb-prose ul { margin-top: 12px; color: var(--gwb-ink-2); }
.gwb-prose ul { list-style: disc; padding-left: 22px; }
.gwb-prose li { margin: 6px 0; }
.gwb-prose a { color: var(--gwb-accent); }
.gwb-meta { color: var(--gwb-muted); font-size: 14.5px; }

/* Table on a surface */
.gwb-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.gwb-table th { text-align: left; font-weight: 600; font-size: 14px; color: var(--gwb-muted); padding: 14px 20px; background: var(--gwb-sunk); }
.gwb-table td { padding: 16px 20px; vertical-align: top; border-top: 1px solid var(--gwb-edge); color: var(--gwb-ink-2); }
.gwb-table td strong { display: block; color: var(--gwb-ink); }
.gwb-table td small { display: block; margin-top: 2px; color: var(--gwb-muted); font-size: 13.5px; }

/* Questions */
.gwb-faq { display: grid; gap: 12px; }
.gwb-faq > div { padding: 22px 24px; }
.gwb-faq dt { font-family: var(--gwb-font-display); font-weight: 600; font-size: 19px; letter-spacing: -.01em; }
.gwb-faq dd { margin-top: 8px; color: var(--gwb-ink-2); }

/* Ticks */
.gwb-ticks { display: grid; gap: 10px; }
.gwb-ticks li { position: relative; padding-left: 26px; }
.gwb-ticks li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 12px; height: 7px; border-left: 2.5px solid var(--gwb-accent); border-bottom: 2.5px solid var(--gwb-accent); transform: rotate(-45deg); }

/* Forms on public pages */
.gwb-form { display: grid; gap: 16px; }
.gwb-field { display: grid; gap: 6px; font-size: 14.5px; font-weight: 600; color: var(--gwb-ink); }
.gwb-field input, .gwb-field select, .gwb-field textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 0; border-radius: var(--gwb-radius-control); background: var(--gwb-paper); box-shadow: var(--gwb-lift-control); font: 400 16px/1.4 var(--gwb-font); color: var(--gwb-ink); }
.gwb-field textarea { min-height: 120px; resize: vertical; }
.gwb-field input:focus, .gwb-field select:focus, .gwb-field textarea:focus { outline: 2px solid var(--gwb-accent); outline-offset: 0; }
.gwb-field small { font-weight: 400; color: var(--gwb-muted); }

@media (prefers-reduced-motion: reduce) { .gwb-site * { transition: none !important; animation: none !important; } }

/* Entrances: parts rise in once as they scroll into view. Visible without script. */
.gwb-js .gwb-rise { opacity: 0; transform: translateY(18px); transition: opacity .6s cubic-bezier(.16, 1, .3, 1), transform .6s cubic-bezier(.16, 1, .3, 1); transition-delay: var(--gwb-d, 0ms); }
.gwb-js .gwb-rise.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .gwb-js .gwb-rise { opacity: 1; transform: none; } }
