/*
 * Websjekk public homepage — Desktop Control Palette v1
 * Presentation-only layer. No calculator questions, scoring, routing or content semantics.
 * © Haut Forvalting AS (Org.nr. 931 603 760) — Altibedrift.
 * Konfidensiell arkitektur/arbeidsdokument. Uautorisert kopiering/distribusjon forbudt.
 */

@media (min-width: 1024px) {
  .home-v2 {
    --hd-ink: #0d1b1d;
    --hd-ink-2: #15282a;
    --hd-paper: #f3f0e8;
    --hd-panel: #fffdf7;
    --hd-line: rgba(13, 27, 29, .12);
    --hd-line-strong: rgba(13, 27, 29, .2);
    --hd-mint: #cbeedb;
    --hd-mint-strong: #2c7a62;
    --hd-lime: #9df44a;
    --hd-cyan: #bfe9eb;
    --hd-blue: #dce5ff;
    --hd-violet: #e9ddf5;
    --hd-amber: #ffe0a8;
    --hd-rose: #f7cfcb;
    --hd-shadow: 0 24px 72px rgba(11, 25, 26, .09), 0 3px 10px rgba(11, 25, 26, .035);
    --hd-shadow-soft: 0 13px 38px rgba(11, 25, 26, .065);
    width: min(96rem, calc(100% - clamp(3rem, 6vw, 7rem)));
    margin-bottom: 8rem;
  }

  .home-v2-kicker {
    color: var(--hd-mint-strong);
    font-size: .69rem;
    letter-spacing: .14em;
  }

  .home-v2 .button,
  .home-v2 a,
  .home-v2 button {
    transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
  }

  /* HERO — more deliberate desktop proportions and stronger orientation. */
  .home-v2-hero {
    grid-template-columns: minmax(0, .94fr) minmax(36rem, 1.06fr);
    gap: clamp(1.1rem, 1.8vw, 1.65rem);
    align-items: stretch;
    margin: 2.4rem 0 9.5rem;
  }

  .home-v2-hero__copy {
    position: relative;
    isolation: isolate;
    min-height: 48rem;
    overflow: hidden;
    padding: clamp(3.2rem, 4.8vw, 5.4rem);
    border-color: var(--hd-line);
    border-radius: 1.8rem;
    background:
      radial-gradient(circle at 12% 5%, rgba(191, 233, 235, .52), transparent 20rem),
      radial-gradient(circle at 96% 88%, rgba(203, 238, 219, .58), transparent 22rem),
      linear-gradient(145deg, #fbfaf5 0%, #f3f0e8 58%, #edf3ee 100%);
    box-shadow: var(--hd-shadow-soft);
  }

  .home-v2-hero__copy::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .24;
    background-image:
      linear-gradient(rgba(13, 27, 29, .04) 1px, transparent 1px),
      linear-gradient(90deg, rgba(13, 27, 29, .04) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(135deg, #000 0%, transparent 72%);
  }

  .home-v2-hero__copy .home-v2-kicker {
    align-self: flex-start;
    margin-bottom: 1.25rem;
    padding: .48rem .68rem;
    border: 1px solid rgba(44, 122, 98, .16);
    border-radius: 999px;
    color: #245f4f;
    background: rgba(203, 238, 219, .62);
  }

  .home-v2-hero h1 {
    max-width: 9.5ch;
    font-size: clamp(4rem, 5.35vw, 6.25rem);
    line-height: .91;
    letter-spacing: -.065em;
  }

  .home-v2-hero__lede {
    max-width: 40rem;
    margin-top: 1.8rem;
    color: #52666a;
    font-size: clamp(1.06rem, 1.35vw, 1.22rem);
    line-height: 1.72;
  }

  .home-v2-hero__actions {
    margin-top: 2.25rem;
  }

  .home-v2-hero__copy .button--primary {
    border-color: #0d1b1d;
    color: #f8fff9;
    background:
      radial-gradient(circle at 88% 10%, rgba(157, 244, 74, .14), transparent 7rem),
      linear-gradient(135deg, #0d1b1d 0%, #173333 100%);
    box-shadow: 0 12px 28px rgba(11, 25, 26, .16), inset 0 1px 0 rgba(255, 255, 255, .08);
  }

  .home-v2-hero__copy .button--primary:hover {
    transform: translateY(-2px);
    border-color: #2c7a62;
    box-shadow: 0 16px 34px rgba(11, 25, 26, .2), inset 3px 0 0 var(--hd-lime);
  }

  .home-v2-trust {
    gap: .65rem;
    margin-top: 2.5rem;
  }

  .home-v2-trust span {
    padding: .68rem .84rem;
    border-color: rgba(13, 27, 29, .1);
    color: #5e6f70;
    background: rgba(255, 253, 247, .76);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
  }

  .home-v2-trust b {
    color: var(--hd-mint-strong);
  }

  /* CALCULATOR — reuse the Control command-surface palette without turning the public page into an admin UI. */
  .home-v2-calculator-shell {
    min-height: 48rem;
    padding: 1.15rem;
    border-color: rgba(191, 233, 235, .17);
    border-radius: 1.8rem;
    background:
      radial-gradient(circle at 82% 8%, rgba(157, 244, 74, .15), transparent 18rem),
      radial-gradient(circle at 12% 96%, rgba(191, 233, 235, .14), transparent 22rem),
      linear-gradient(140deg, #0b1819 0%, #102526 56%, #173333 100%);
    box-shadow: 0 28px 78px rgba(8, 23, 24, .24), inset 0 1px 0 rgba(255, 255, 255, .055);
  }

  .home-v2-calculator-shell::before {
    opacity: .85;
    background:
      linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: radial-gradient(circle at 72% 18%, #000, transparent 72%);
  }

  .home-v2-calculator-shell__head {
    padding: 1.05rem 1.1rem 1.25rem;
    border-bottom-color: rgba(255, 255, 255, .11);
  }

  .home-v2-calculator-shell__head p {
    color: var(--hd-lime);
    letter-spacing: .15em;
  }

  .home-v2-calculator-shell__head strong {
    max-width: 27rem;
    color: #f7fff9;
    font-size: 1.02rem;
  }

  .home-v2-calculator-shell__head > span {
    width: 4.5rem;
    height: 2.35rem;
    border-color: rgba(191, 233, 235, .18);
    color: #def4ec;
    background: rgba(191, 233, 235, .07);
    box-shadow: inset 0 0 0 1px rgba(157, 244, 74, .035);
  }

  .home-v2-calculator-shell__inner {
    padding: 1.1rem 0;
  }

  .home-v2-calculator-shell__foot {
    padding: .95rem 1.1rem .2rem;
    border-top-color: rgba(255, 255, 255, .09);
    color: rgba(232, 244, 238, .58);
  }

  .home-v2-calculator-shell__foot span + span::before {
    color: var(--hd-lime);
  }

  .home-v2-calculator-shell .chooser-intro {
    min-height: 32.5rem;
    padding: clamp(1.7rem, 3vw, 2.65rem);
    border-color: rgba(191, 233, 235, .12);
    border-radius: 1.3rem;
    background:
      radial-gradient(circle at 92% 4%, rgba(157, 244, 74, .08), transparent 15rem),
      linear-gradient(145deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .025));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
    backdrop-filter: blur(14px);
  }

  .home-v2-calculator-shell .chooser-intro .eyebrow,
  .home-v2-calculator-shell .chooser-step__progress {
    color: var(--hd-lime);
    letter-spacing: .14em;
  }

  .home-v2-calculator-shell .chooser-intro h2 {
    max-width: 11ch;
    font-size: clamp(2.75rem, 3.7vw, 4.35rem);
    line-height: .94;
  }

  .home-v2-calculator-shell .chooser-intro p {
    max-width: 36rem;
    color: rgba(232, 244, 238, .67);
  }

  .home-v2-calculator-shell .chooser-intro__trust {
    color: #d9f4e7 !important;
  }

  .home-v2-calculator-shell [data-chooser-start],
  .home-v2-calculator-shell [data-chooser-next],
  .home-v2-calculator-shell [data-chooser-submit] {
    border-color: #9df44a !important;
    color: #10200f !important;
    background: linear-gradient(180deg, #b9ff7a 0%, #9df44a 100%) !important;
    box-shadow: 0 11px 26px rgba(95, 181, 31, .18), inset 0 1px 0 rgba(255, 255, 255, .55) !important;
  }

  .home-v2-calculator-shell [data-chooser-start]:hover,
  .home-v2-calculator-shell [data-chooser-next]:hover,
  .home-v2-calculator-shell [data-chooser-submit]:hover {
    border-color: #c1ff88 !important;
    background: #b9ff7a !important;
    box-shadow: 0 15px 32px rgba(95, 181, 31, .23), 0 0 0 4px rgba(157, 244, 74, .08) !important;
  }

  .home-v2-calculator-shell .chooser-progress__dot {
    background: rgba(191, 233, 235, .13);
  }

  .home-v2-calculator-shell .chooser-progress__dot[aria-current="step"],
  .home-v2-calculator-shell .chooser-progress__dot.is-active {
    background: linear-gradient(90deg, var(--hd-lime), var(--hd-cyan));
    box-shadow: 0 0 18px rgba(157, 244, 74, .16);
  }

  .home-v2-calculator-shell .chooser-step {
    padding: 1.3rem;
    border-color: rgba(191, 233, 235, .11);
    background: rgba(255, 255, 255, .038);
  }

  .home-v2-calculator-shell .chooser-step legend {
    font-size: clamp(1.9rem, 2.35vw, 2.75rem);
  }

  .home-v2-calculator-shell .choice-grid {
    gap: .78rem;
    margin-top: 1.55rem;
  }

  .home-v2-calculator-shell .choice-card {
    padding: 1.08rem 1.15rem !important;
    border-color: rgba(191, 233, 235, .11) !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, .052), rgba(191, 233, 235, .022)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025) !important;
  }

  .home-v2-calculator-shell .choice-card:hover,
  .home-v2-calculator-shell .choice-card:focus-within {
    transform: translateY(-2px);
    border-color: rgba(191, 233, 235, .43) !important;
    background: linear-gradient(145deg, rgba(191, 233, 235, .09), rgba(255, 255, 255, .035)) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .14) !important;
  }

  .home-v2-calculator-shell .choice-card:has(input:checked) {
    border-color: rgba(157, 244, 74, .74) !important;
    background: linear-gradient(145deg, rgba(157, 244, 74, .105), rgba(191, 233, 235, .075)) !important;
    box-shadow: inset 3px 0 0 var(--hd-lime), 0 13px 30px rgba(0, 0, 0, .13) !important;
  }

  .home-v2-calculator-shell .choice-card input {
    accent-color: var(--hd-lime);
  }

  .home-v2-calculator-shell .choice-card__copy {
    color: rgba(232, 244, 238, .58);
  }

  .home-v2-calculator-shell .chooser-confirmation {
    border-color: rgba(157, 244, 74, .22);
    color: #e7f8dc;
    background: rgba(157, 244, 74, .065);
  }

  .home-v2-calculator-shell .chooser-nav .button--secondary {
    border-color: rgba(191, 233, 235, .17);
    background: rgba(191, 233, 235, .055);
  }

  /* SECTION RHYTHM — reduce the feeling of isolated boxes and make the page read as one system. */
  .home-v2-section {
    margin-bottom: 9.5rem;
  }

  .home-v2-section__head {
    grid-template-columns: minmax(0, 1fr) minmax(21rem, .44fr);
    gap: clamp(3rem, 5vw, 5.25rem);
    margin-bottom: 2.7rem;
  }

  .home-v2-section__head h2,
  .home-v2-explain__copy h2,
  .home-v2-ai__copy h2,
  .home-v2-convert h2 {
    font-size: clamp(2.8rem, 4.4vw, 4.8rem);
    line-height: .95;
  }

  .home-v2-section__head > p,
  .home-v2-explain__copy > p,
  .home-v2-ai__copy > p,
  .home-v2-convert__main > p {
    color: #5a6b6d;
    font-size: 1.01rem;
    line-height: 1.76;
  }

  /* Current signals: Control pastels become category-coded rails, not dashboard chrome. */
  .home-v2-now__grid {
    gap: 1.15rem;
  }

  .home-v2-story {
    position: relative;
    min-height: 27.5rem;
    overflow: hidden;
    padding: 1.55rem;
    border-color: var(--hd-line);
    border-radius: 1.35rem;
    box-shadow: 0 9px 30px rgba(11, 25, 26, .035);
  }

  .home-v2-story::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: var(--hd-mint);
  }

  .home-v2-story--ai {
    background: linear-gradient(155deg, rgba(203, 238, 219, .78), #fffdf7 66%);
  }

  .home-v2-story--marketing {
    background: linear-gradient(155deg, rgba(255, 224, 168, .72), #fffdf7 66%);
  }

  .home-v2-story--marketing::before {
    background: var(--hd-amber);
  }

  .home-v2-story--norway {
    background: linear-gradient(155deg, rgba(220, 229, 255, .82), #fffdf7 68%);
  }

  .home-v2-story--norway::before {
    background: var(--hd-blue);
  }

  .home-v2-story:hover {
    transform: translateY(-5px);
    border-color: rgba(44, 122, 98, .24);
    box-shadow: var(--hd-shadow-soft);
  }

  .home-v2-story h3 {
    font-size: clamp(1.9rem, 2.6vw, 2.7rem);
  }

  /* Format index: calm color-coding borrowed directly from Control's metric/flow cards. */
  .traffic-editorial-index__grid {
    gap: .9rem;
  }

  .traffic-editorial-index__grid > a {
    position: relative;
    overflow: hidden;
    border-color: var(--hd-line);
    border-radius: 1.2rem;
    background: var(--hd-panel);
    box-shadow: 0 8px 25px rgba(11, 25, 26, .035);
  }

  .traffic-editorial-index__grid > a:nth-child(1) {
    background: linear-gradient(150deg, rgba(203, 238, 219, .66), var(--hd-panel) 62%);
  }

  .traffic-editorial-index__grid > a:nth-child(2) {
    background: linear-gradient(150deg, rgba(191, 233, 235, .67), var(--hd-panel) 62%);
  }

  .traffic-editorial-index__grid > a:nth-child(3) {
    background: linear-gradient(150deg, rgba(233, 221, 245, .67), var(--hd-panel) 62%);
  }

  .traffic-editorial-index__grid > a:nth-child(4) {
    background: linear-gradient(150deg, rgba(255, 224, 168, .61), var(--hd-panel) 62%);
  }

  .traffic-editorial-index__grid > a:hover {
    transform: translateY(-4px);
    border-color: rgba(44, 122, 98, .22);
    box-shadow: var(--hd-shadow-soft);
  }

  /* Explainer grid: cleaner editorial split with the same five-state color language as Control. */
  .home-v2-explain {
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: clamp(3.2rem, 5vw, 5.8rem);
  }

  .home-v2-job-grid {
    gap: .9rem;
    padding: 1.15rem;
    border-color: var(--hd-line);
    border-radius: 1.55rem;
    background:
      radial-gradient(circle at 100% 0, rgba(191, 233, 235, .28), transparent 18rem),
      linear-gradient(145deg, #f7f4ec, #efeee7);
    box-shadow: var(--hd-shadow-soft);
  }

  .home-v2-job-grid article {
    position: relative;
    min-height: 15.8rem;
    overflow: hidden;
    padding: 1.35rem;
    border-color: var(--hd-line);
    border-radius: 1.05rem;
    background: var(--hd-panel);
  }

  .home-v2-job-grid article:nth-child(1) { background: linear-gradient(145deg, rgba(203, 238, 219, .58), var(--hd-panel) 64%); }
  .home-v2-job-grid article:nth-child(2) { background: linear-gradient(145deg, rgba(191, 233, 235, .58), var(--hd-panel) 64%); }
  .home-v2-job-grid article:nth-child(3) { background: linear-gradient(145deg, rgba(233, 221, 245, .58), var(--hd-panel) 64%); }
  .home-v2-job-grid article:nth-child(4) { background: linear-gradient(145deg, rgba(255, 224, 168, .55), var(--hd-panel) 64%); }

  .home-v2-job-grid span {
    color: #10200f;
    background: var(--hd-lime);
    box-shadow: 0 0 0 5px rgba(157, 244, 74, .1);
  }

  /* Signal system: public-facing version of Control's dark command hero. */
  .home-v2-ai {
    gap: clamp(3rem, 5vw, 5.3rem);
    padding: clamp(2rem, 3.7vw, 3.8rem);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 1.85rem;
    background:
      radial-gradient(circle at 80% 12%, rgba(157, 244, 74, .13), transparent 19rem),
      radial-gradient(circle at 16% 92%, rgba(191, 233, 235, .12), transparent 22rem),
      linear-gradient(135deg, #0b1819 0%, #102526 58%, #173333 100%);
    box-shadow: 0 27px 76px rgba(8, 23, 24, .2);
  }

  .home-v2-ai .home-v2-kicker {
    color: var(--hd-lime);
  }

  .home-v2-ai__visual {
    min-height: 32rem;
    border-color: rgba(191, 233, 235, .12);
    border-radius: 1.35rem;
    background:
      radial-gradient(circle at 48% 45%, rgba(157, 244, 74, .1), transparent 14rem),
      radial-gradient(circle at 72% 24%, rgba(191, 233, 235, .09), transparent 13rem),
      rgba(255, 255, 255, .025);
  }

  .home-v2-ai__copy > p {
    color: rgba(232, 244, 238, .65);
  }

  .home-v2-ai .button--secondary {
    border-color: rgba(191, 233, 235, .2);
    background: rgba(191, 233, 235, .06);
  }

  .home-v2-ai .button--secondary:hover {
    border-color: rgba(157, 244, 74, .32);
    background: rgba(157, 244, 74, .08);
  }

  .home-v2-ai .home-v2-text-link {
    color: #d9f4e7;
  }

  /* Conversion end-state: light decision surface + dark newsletter instrument. */
  .home-v2-convert {
    position: relative;
    overflow: hidden;
    padding: clamp(2.2rem, 3.8vw, 4rem);
    border: 1px solid var(--hd-line);
    border-radius: 1.85rem;
    background:
      radial-gradient(circle at 6% 3%, rgba(203, 238, 219, .55), transparent 21rem),
      radial-gradient(circle at 95% 100%, rgba(220, 229, 255, .45), transparent 22rem),
      linear-gradient(145deg, #fbfaf5, #f1efe7);
    box-shadow: var(--hd-shadow-soft);
  }

  .home-v2-newsletter {
    border-color: rgba(191, 233, 235, .14);
    border-radius: 1.3rem;
    color: #f6fff8;
    background:
      radial-gradient(circle at 90% 6%, rgba(157, 244, 74, .13), transparent 12rem),
      linear-gradient(145deg, #0d1b1d, #173333);
    box-shadow: 0 18px 48px rgba(8, 23, 24, .16);
  }

  .home-v2-newsletter > span {
    color: var(--hd-lime);
  }

  .home-v2-newsletter input[type="email"] {
    border-color: rgba(191, 233, 235, .18);
    color: #f8fff9;
    background: rgba(255, 255, 255, .055);
  }

  .home-v2-newsletter input[type="email"]:focus {
    border-color: rgba(157, 244, 74, .62);
    box-shadow: 0 0 0 3px rgba(157, 244, 74, .09);
    outline: none;
  }

  .home-v2-newsletter input[type="checkbox"] {
    accent-color: var(--hd-lime);
  }

  .home-v2-newsletter button[type="submit"] {
    border-color: var(--hd-lime);
    color: #10200f;
    background: linear-gradient(180deg, #b9ff7a, var(--hd-lime));
    box-shadow: 0 10px 24px rgba(95, 181, 31, .16);
  }

  .home-v2-newsletter button[type="submit"]:hover {
    transform: translateY(-2px);
    background: #b9ff7a;
  }

  /* Desktop focus treatment stays visible even on the dark surfaces. */
  .home-v2 :is(a, button, input, label[tabindex]):focus-visible {
    outline: 3px solid rgba(157, 244, 74, .7);
    outline-offset: 3px;
  }
}

@media (min-width: 1200px) {
  .traffic-editorial-index__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-v2 .button,
  .home-v2 a,
  .home-v2 button,
  .home-v2-story,
  .traffic-editorial-index__grid > a,
  .home-v2-calculator-shell .choice-card {
    transition: none !important;
  }
}
