/* gridwise.no page layouts, on top of packages/brand/site.css. */

/* Front page hero: the headline beside the plant (partials/anlegg.html). Each
   part of the plant links to the service for it; the strip below says the same
   in words for small screens. */
.home-hero { padding-top: clamp(32px, 4vw, 64px); }
.home-hero > .gwb-wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 4vw, 64px); align-items: center; }
.home-hero h1 { font-size: clamp(38px, 2.4vw + 20px, 58px); }
.home-hero .gwb-lead { margin-top: 22px; }
.home-hero .gwb-actions { margin-top: 32px; }
.home-hero .gwb-small { margin-top: 16px; max-width: 42ch; }
@media (max-width: 960px) { .home-hero > .gwb-wrap { grid-template-columns: minmax(0, 1fr); } }

.plant { position: relative; margin: 0 calc(-1 * clamp(0px, (100vw - 1240px) / 2, 96px)) 0 clamp(-48px, -3vw, 0px); }
.plant-stage { position: relative; }
.plant-scene { display: block; width: 100%; height: auto; overflow: visible; }
.plant-scene .svg-label { font-family: var(--gwb-font-display); font-weight: 600; fill: var(--gwb-ink); }
.plant-scene .svg-small { font-family: var(--gwb-font); font-weight: 600; fill: var(--gwb-muted); }
.plant-scene .mk-title { font-size: 12px; }
.plant-scene .mk-sub { font-size: 7.5px; letter-spacing: .06em; }
.plant-scene .device { cursor: pointer; outline: none; transition: opacity .35s ease; }
.plant-scene .device-ring { opacity: 0; transition: opacity .25s ease; }
.plant-scene .device:focus-visible .device-ring, .plant-scene .device.is-on .device-ring { opacity: 1; }
.plant-scene .device .hardware { transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.plant-scene .device:focus-visible .hardware, .plant-scene .device.is-on .hardware { transform: translateY(-3px); }
/* While one part is pointed at, the rest of the plant steps back. */
.plant.is-pointing .device:not(.is-on) { opacity: .45; }
.plant-scene .flow { stroke-linecap: round; stroke-dasharray: 2 18; animation: plant-flow 2.2s linear infinite; }
.plant-scene .flow.data { stroke-width: 1.4; stroke-dasharray: 1.5 7; animation-duration: 2.8s; }
.plant-scene .flow.reverse { animation-direction: reverse; }
.plant.is-paused .flow { animation-play-state: paused; }
@keyframes plant-flow { to { stroke-dashoffset: -60; } }

/* One tag, over the part pointed at: what it is, and where it leads. */
.plant-tags { position: absolute; inset: 0; pointer-events: none; }
.plant-tag { position: absolute; left: calc(var(--x) / 800 * 100%); top: calc(var(--y) / 526 * 100%); transform: translate(-50%, calc(-100% - 6px)); display: grid; gap: 1px; padding: 8px 13px 9px; border-radius: 10px; background: var(--gwb-navy); box-shadow: var(--gwb-lift-float); color: #fff; font: 600 14px/1.25 var(--gwb-font); white-space: nowrap; opacity: 0; transition: opacity .2s ease, transform .3s cubic-bezier(.2, .8, .2, 1); }
.plant-tag small { color: rgba(255, 255, 255, .66); font-size: 13px; font-weight: 500; }
.plant-tag::after { content: "→"; position: absolute; right: 13px; bottom: 9px; color: var(--gwb-cyan); }
.plant-tag { padding-right: 34px; }
.plant-tag.is-on { opacity: 1; transform: translate(-50%, calc(-100% - 14px)); }

.plant-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 4px; padding-left: clamp(0px, 3vw, 48px); color: var(--gwb-muted); font-size: 14px; }
.plant-pause { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: var(--gwb-muted); cursor: pointer; transition: color .2s ease, background .2s ease; }
.plant-pause:hover { color: var(--gwb-accent); background: var(--gwb-paper); }
.plant-pause svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.plant-pause .i-play, .plant.is-paused .plant-pause .i-pause { display: none; }
.plant.is-paused .plant-pause .i-play { display: inline; fill: currentColor; stroke-width: 1.6; }

@media (prefers-reduced-motion: reduce) { .plant-scene .flow { animation: none; } .plant-pause { display: none; } .plant-scene .device .hardware, .plant-tag, .plant-scene .device { transition: none; } }
@media (max-width: 960px) { .plant { margin: 0; } .plant-foot { padding-left: 0; } }
@media (hover: none) { .plant-foot span { visibility: hidden; } }

.plant-strip { margin-top: clamp(32px, 4vw, 56px); background: var(--gwb-paper); }
.plant-strip .gwb-wrap { display: flex; justify-content: space-between; gap: 8px 20px; padding-block: 18px; }
.plant-strip a { display: inline-flex; align-items: center; gap: 10px; padding: 6px 0; color: var(--gwb-ink-2); font-weight: 500; font-size: 15px; text-decoration: none; transition: color .2s ease; }
.plant-strip a:hover, .plant-strip a.is-on { color: var(--gwb-accent); }
.plant-strip svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--gwb-accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.plant-strip a:hover svg, .plant-strip a.is-on svg { transform: translateY(-2px); }
@media (max-width: 960px) { .plant-strip .gwb-wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .plant-strip .gwb-wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Portal cards: 2 x 2, a real screenshot sliding in from the right edge. */
.portal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.portal-card { display: flex; flex-direction: column; padding: 28px 28px 0; overflow: hidden; text-decoration: none; transition: box-shadow .2s ease, transform .2s ease; }
.portal-card:hover { box-shadow: 0 0 0 1px rgba(4, 27, 77, .08), 0 14px 34px -14px rgba(4, 27, 77, .28); transform: translateY(-2px); }
.portal-card p { margin-top: 8px; color: var(--gwb-ink-2); font-size: 16px; max-width: 46ch; }
.portal-card .gwb-link { margin-top: 14px; font-size: 15px; }
.portal-card .pic { margin: 24px -28px 0 28px; height: 230px; overflow: hidden; border-radius: 10px 0 0 0; box-shadow: var(--gwb-lift); background: var(--gwb-sunk); }
.portal-card .pic img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
@media (max-width: 860px) { .portal-grid { grid-template-columns: 1fr; } .portal-card .pic { height: 200px; } }

/* Free tools */
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.tool-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 24px; align-items: center; padding: 28px; }
.tool-card p { margin: 8px 0 20px; color: var(--gwb-ink-2); font-size: 16px; }
.tool-card .gwb-shot { aspect-ratio: 4 / 3; }
@media (max-width: 1080px) { .tool-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .tool-card { grid-template-columns: 1fr; } }

/* Closing band */
.closing { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: clamp(28px, 4vw, 48px); border-radius: var(--gwb-radius-surface); background: var(--gwb-navy); color: #fff; }
.closing h2 { color: #fff; }
.closing p { margin-top: 12px; color: #c3cfe3; max-width: 46ch; }
.closing .gwb-actions { margin-top: 24px; }
.closing ol { display: grid; gap: 10px; }
.closing li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 16px; border-radius: 10px; background: rgba(255, 255, 255, .07); font-weight: 600; }
.closing li span { color: #9fb2d1; font-weight: 500; font-size: 14.5px; text-align: right; }
.closing :focus-visible { outline-color: var(--gwb-cyan); }
@media (max-width: 860px) { .closing { grid-template-columns: 1fr; } }

/* Product pages */
.product-hero .gwb-wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 4vw, 64px); align-items: center; }
.product-hero .gwb-browser img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: left top; }
.product-hero .gwb-tag { margin-bottom: 18px; }
@media (max-width: 960px) { .product-hero .gwb-wrap { grid-template-columns: 1fr; } }
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.feature + .feature { margin-top: clamp(64px, 7vw, 104px); }
.feature.flip > :first-child { order: 2; }
.feature p { margin-top: 14px; color: var(--gwb-ink-2); max-width: 46ch; }
.feature .gwb-ticks { margin-top: 18px; }
.feature .gwb-shot { aspect-ratio: 16 / 10; }
@media (max-width: 860px) { .feature, .feature.flip { grid-template-columns: 1fr; } .feature.flip > :first-child { order: 0; } }
.notice { margin-top: 22px; padding: 16px 18px; border-radius: var(--gwb-radius-control); background: var(--gwb-amber-soft); color: var(--gwb-ink); font-size: 15.5px; max-width: 52ch; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.facts > div { padding: 22px; }
.facts dt { font-family: var(--gwb-font-display); font-weight: 600; font-size: 19px; letter-spacing: -.01em; }
.facts dd { margin-top: 8px; color: var(--gwb-ink-2); font-size: 15.5px; }
@media (max-width: 960px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; } }
.product-hero h1 { font-size: clamp(32px, 2vw + 16px, 48px); hyphens: manual; }
.product-hero .gwb-browser { margin-right: calc(-1 * clamp(0px, (100vw - 1240px) / 2, 120px)); }

/* The tools' pages: work still saved in this browser from before the login (site.js). */
.local-work { padding: 28px; }
.local-work h2 { font-size: 22px; margin: 0 0 8px; }
.local-work p { margin: 0 0 18px; max-width: 64ch; }
.local-work ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.local-work li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--gwb-line); }
