/* ============================================================
   Elaiah: ny layout (startsidan). Laddas efter styles.css och
   skriver över färger och typsnitt. Alla klasser börjar med ny-.
   ============================================================ */

@font-face { font-family: "Familjen Grotesk"; font-weight: 500; font-display: swap; src: url("vendor/fonts/familjen-grotesk-500.woff2") format("woff2"); }
@font-face { font-family: "Familjen Grotesk"; font-weight: 600; font-display: swap; src: url("vendor/fonts/familjen-grotesk-600.woff2") format("woff2"); }
@font-face { font-family: "Familjen Grotesk"; font-weight: 700; font-display: swap; src: url("vendor/fonts/familjen-grotesk-700.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 400; font-display: swap; src: url("vendor/fonts/source-serif-4-400.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 600; font-display: swap; src: url("vendor/fonts/source-serif-4-600.woff2") format("woff2"); }

/* ---------- Färger: brand bookens varma palett, tydliga ytor ---------- */
:root {
  color-scheme: light;
  --bg: #f8f6f1;
  --bg-alt: #d7d1c7;
  --ink: #16181d;
  --ink-soft: #4d4a45;
  --ink-faint: #6b665f;
  --line: #bdb6a9;
  --accent: #456b58;
  --accent-deep: #365646;
  --accent-soft: #a9cdb9;
  --card-bg: #fffdf9;
  --header-bg: rgba(248, 246, 241, 0.85);
  --invert-bg: #16181d;
  --invert-fg: #f8f6f1;
  --invert-muted: rgba(248, 246, 241, 0.7);
  --invert-line: rgba(248, 246, 241, 0.16);
  --btn-bg: #16181d;
  --btn-fg: #f8f6f1;
  --module-empty: #fffdf9;

  --alt: var(--bg-alt);
  --soft: var(--ink-soft);
  --hero-bg: #456b58;
  --hero-fg: #f8f6f1;
  --hero-line: rgba(248, 246, 241, 0.4);
  --mark: #b9d6c6;
  --accent-fg: #f8f6f1;
  --sq-admin: #16181d;
  --sq-other: #d7d1c7;
  --sq-empty: #8a8479;
  --node-empty: #8a8479;
  --band-bg: #16181d;
  --band-fg: #f8f6f1;

  --font-display: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-sans: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-head: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Source Serif 4", Georgia, serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131518;
  --bg-alt: #1f2227;
  --ink: #f1eee7;
  --ink-soft: #b5b0a6;
  --ink-faint: #8f8a80;
  --line: #353a41;
  --accent: #7fb59a;
  --accent-deep: #9ac9b1;
  --accent-soft: #9cc4ac;
  --card-bg: #1f2227;
  --header-bg: rgba(19, 21, 24, 0.85);
  --invert-bg: #1f2d26;
  --invert-fg: #f1eee7;
  --btn-bg: #7fb59a;
  --btn-fg: #131518;
  --module-empty: #1f2227;
  --hero-bg: #2b4a3a;
  --hero-fg: #f1eee7;
  --hero-line: rgba(241, 238, 231, 0.35);
  --mark: #a9d4bd;
  --accent-fg: #131518;
  --sq-admin: #f1eee7;
  --sq-other: #2d3137;
  --sq-empty: #6a6f76;
  --node-empty: #6a6f76;
  --band-bg: #0a0b0d;
  --band-fg: #f1eee7;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #131518;
    --bg-alt: #1f2227;
    --ink: #f1eee7;
    --ink-soft: #b5b0a6;
    --ink-faint: #8f8a80;
    --line: #353a41;
    --accent: #7fb59a;
    --accent-deep: #9ac9b1;
    --accent-soft: #9cc4ac;
    --card-bg: #1f2227;
    --header-bg: rgba(19, 21, 24, 0.85);
    --invert-bg: #1f2d26;
    --invert-fg: #f1eee7;
    --btn-bg: #7fb59a;
    --btn-fg: #131518;
    --module-empty: #1f2227;
    --hero-bg: #2b4a3a;
    --hero-fg: #f1eee7;
    --hero-line: rgba(241, 238, 231, 0.35);
    --mark: #a9d4bd;
    --accent-fg: #131518;
    --sq-admin: #f1eee7;
    --sq-other: #2d3137;
    --sq-empty: #6a6f76;
    --node-empty: #6a6f76;
    --band-bg: #0a0b0d;
    --band-fg: #f1eee7;
  }
}

/* ---------- Bas ---------- */
.ny { font-family: var(--f-body); font-size: 1.1rem; line-height: 1.6; background: var(--bg); color: var(--ink); }
.ny h1, .ny h2, .ny h3, .ny button, .ny input, .ny textarea, .ny label, .ny summary, .ny .ui { font-family: var(--f-head); }
.ny h1, .ny h2, .ny h3, .ny p { margin: 0; }
:where(.ny) a { color: inherit; }
.ny a:focus-visible, .ny button:focus-visible, .ny summary:focus-visible, .ny input:focus-visible, .ny textarea:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.ny-wrap { max-width: 1280px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 56px); }
.ny-h2 { font-size: clamp(2.2rem, 1.2rem + 3vw, 3.6rem); line-height: 1; letter-spacing: -0.035em; font-weight: 700; }
.ny-sec { padding-block: 112px; }
.ny-sec--alt { background: var(--bg-alt); }
.ny-soft { color: var(--ink-soft); }

.ny-btn { display: inline-block; text-decoration: none; font-family: var(--f-head); font-weight: 600; font-size: 1.05rem; line-height: 1.2; padding: 15px 26px; border: 2px solid transparent; cursor: pointer; }
.ny-btn:hover { opacity: 0.86; }
.ny-btn--hero { background: var(--hero-fg); color: var(--hero-bg); border-color: var(--hero-fg); padding: 13px 24px; }
.ny-btn--small { padding: 9px 18px; font-size: 0.98rem; }
.ny-btn--accent { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.ny-btn--invert { background: var(--accent-fg); color: var(--accent); border-color: var(--accent-fg); }
.ny-link { font-family: var(--f-head); font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }

/* ---------- Topp ---------- */
.ny-hero { position: relative; background: var(--hero-bg); color: var(--hero-fg); border-bottom: 10px solid var(--ink); }
.ny-top { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; padding: 26px 0; border-bottom: 1px solid var(--hero-line); }
.ny-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.ny-brand svg { width: 30px; height: 30px; fill: currentColor; }
.ny-brand .ny-mark-center { fill: var(--mark); }
.ny-brand-name { font-family: var(--f-head); font-size: 1.7rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.ny-brand-name span { color: var(--mark); }
.ny-top-right { display: flex; align-items: center; gap: 18px; }
.ny-top .nav { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 30px; font-family: var(--f-head); font-weight: 500; }
.ny-top .nav a { color: var(--hero-fg); font-size: 1rem; }
.ny-top .nav a.ny-btn { color: var(--hero-bg); font-weight: 600; }
.ny-top .theme-toggle { border-color: var(--hero-line); color: var(--hero-fg); border-radius: 0; }
.ny-top .theme-toggle:hover { border-color: var(--hero-fg); }
.ny-top .nav-toggle { border-color: var(--hero-line); border-radius: 0; }
.ny-top .nav-toggle span { background: var(--hero-fg); }

.ny-hero-body { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 56px 80px; padding: 48px 0 104px; }
.ny-hero-text { flex: 1 1 520px; min-width: 0; }
.ny-h1 { font-size: clamp(2.8rem, 0.6rem + 6.2vw, 5.8rem); line-height: 0.96; letter-spacing: -0.045em; font-weight: 700; }
.ny-h1 span { display: block; }
.ny-lead { margin-top: 44px !important; padding-top: 28px; border-top: 3px solid var(--hero-fg); max-width: 31em; font-size: 1.3rem; line-height: 1.5; font-weight: 600; }
.ny-sub { margin-top: 16px !important; max-width: 33em; opacity: 0.88; }
.ny-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; margin-top: 40px; }

.ny-week { flex: 0 1 440px; min-width: 280px; width: 100%; box-sizing: border-box; background: var(--bg); color: var(--ink); border: 2px solid var(--ink); padding: 26px; box-shadow: 12px 12px 0 var(--mark); }
.ny-seg { display: inline-flex; border: 2px solid var(--ink); }
.ny-seg button { border: 0; padding: 10px 24px; font-size: 1rem; font-weight: 600; cursor: pointer; background: transparent; color: var(--ink); }
.ny-seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.ny-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 22px; }
.ny-cell { aspect-ratio: 1; box-sizing: border-box; background: var(--sq-other); border: 2px solid var(--sq-other); transition: background 0.25s ease-out, border-color 0.25s ease-out; }
.ny-cell.a { background: var(--sq-admin); border-color: var(--sq-admin); }
.ny-week.after .ny-cell.a { background: transparent; border-color: var(--sq-empty); }
.ny-week.after .ny-cell.r { background: var(--accent); border-color: var(--accent); }
.ny-days { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 10px; text-align: center; font-size: 0.9rem; color: var(--ink-soft); }
.ny-week-cap { margin-top: 20px !important; font-weight: 600; }
.ny-week-note { margin-top: 8px !important; font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- Så jobbar vi ---------- */
.ny-steps-sec { padding-bottom: 136px; }
.ny-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 40px 32px; align-items: start; margin-top: 64px; }
.ny-step { background: var(--card-bg); border: 2px solid var(--ink); padding: 24px 24px 28px; box-shadow: 8px 8px 0 var(--accent); }
@media (min-width: 900px) {
  .ny-step:nth-child(2) { margin-top: 56px; }
  .ny-step:nth-child(3) { margin-top: 112px; }
  .ny-step:nth-child(4) { margin-top: 168px; }
}
.ny-step-n { font-family: var(--f-head); font-size: 5rem; line-height: 0.9; font-weight: 700; letter-spacing: -0.05em; color: var(--accent); }
.ny-step h3 { margin-top: 22px; font-size: 1.6rem; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
.ny-step .when { margin: 4px 0 14px; color: var(--ink-soft); font-size: 1rem; }
.ny-step p + p { margin-top: 12px; }

/* ---------- Arbetsflöden ---------- */
.ny-intro { margin-top: 14px !important; max-width: 38em; color: var(--ink-soft); }
.ny-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.ny-chip { font-weight: 600; font-size: 1rem; padding: 11px 18px; cursor: pointer; border: 2px solid var(--ink); background: transparent; color: var(--ink); }
.ny-chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.ny-cols { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 48px 72px; margin-top: 56px; }
.ny-col-main { flex: 3 1 560px; min-width: 0; }
.ny-col-side { flex: 1 1 280px; min-width: 0; }
.ny-nodes { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 32px 20px; }
.ny-node-row { display: flex; align-items: center; gap: 10px; }
.ny-node-sq { width: 24px; height: 24px; flex: none; box-sizing: border-box; border: 2px solid var(--node-empty); transition: background 0.3s ease-out, border-color 0.3s ease-out; }
.ny-node[data-kind="in"] .ny-node-sq { border-radius: 50%; }
.ny-node.done .ny-node-sq { background: var(--ink); border-color: var(--ink); }
.ny-node[data-kind="auto"].done .ny-node-sq { background: var(--accent); border-color: var(--accent); }
.ny-node-line { flex: 1; height: 2px; background: var(--line); transition: background 0.3s ease-out; }
.ny-node.linedone .ny-node-line { background: var(--accent); }
.ny-node:last-child .ny-node-line { visibility: hidden; }
.ny-node-label { margin-top: 16px !important; font-family: var(--f-head); font-weight: 600; font-size: 1.05rem; line-height: 1.3; color: var(--ink-soft); }
.ny-node.done .ny-node-label { color: var(--ink); }
.ny-node-tag { margin-top: 4px !important; font-family: var(--f-head); font-size: 0.88rem; color: var(--ink-soft); }
.ny-legend { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); font-family: var(--f-head); font-size: 0.92rem; color: var(--ink-soft); }
.ny-legend span { display: flex; align-items: center; gap: 8px; }
.ny-legend i { display: block; width: 14px; height: 14px; box-sizing: border-box; }
.ny-replay { margin-top: 22px; padding: 0; border: 0; background: none; cursor: pointer; font-size: 0.98rem; font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.ny-note-box { padding: 16px 0 24px; border-top: 3px solid var(--ink); }
.ny-note-box--ai { border-top-color: var(--accent); }
.ny-note-box h3 { margin-bottom: 6px; font-size: 1.15rem; line-height: 1.2; font-weight: 700; }
.ny-sys-h { margin: 12px 0 12px !important; font-size: 1.15rem; line-height: 1.2; font-weight: 700; }
.ny-sys { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ny-sys div { aspect-ratio: 1; box-sizing: border-box; display: flex; align-items: flex-end; padding: 8px; font-family: var(--f-head); font-size: 0.78rem; line-height: 1.15; font-weight: 600; border: 2px solid var(--line); color: var(--ink-soft); }
.ny-sys div.on { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }

/* ---------- Det vi bygger ---------- */
.ny-build { display: flex; flex-wrap: wrap; gap: 48px 72px; margin-top: 48px; align-items: flex-start; }
.ny-build-mock { flex: 1.5 1 440px; min-width: 0; max-width: 620px; }
.ny-build-text { flex: 1 1 300px; min-width: 0; }
.ny-build-text .lead { font-size: 1.35rem; line-height: 1.5; max-width: 24em; }
.ny-agent { margin-top: 36px; padding-top: 28px; border-top: 3px solid var(--ink); }
.ny-agent h3 { margin-bottom: 10px; font-size: 1.4rem; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
.ny-agent p { margin-bottom: 22px; }
.ny-agent p.small { margin: 12px 0 0; font-size: 0.92rem; color: var(--ink-soft); }
.ny-sketch-note { margin-top: 16px !important; font-size: 0.92rem; color: var(--ink-soft); }
.ny-mock { border: 2px solid var(--ink); background: var(--bg); }
.ny-bar { display: block; background: var(--line); height: 8px; }

/* ---------- Byggt av oss ---------- */
.ny-proj { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px 32px; align-items: stretch; margin-top: 56px; }
.ny-proj-card { display: flex; flex-direction: column; align-items: flex-start; background: var(--card-bg); border: 2px solid var(--ink); padding: 24px 24px 28px; box-shadow: 8px 8px 0 var(--accent); }
.ny-proj-tag { display: flex; align-items: center; gap: 10px; font-family: var(--f-head); font-size: 0.95rem; font-weight: 600; color: var(--ink-soft); }
.ny-proj-tag i { display: block; width: 14px; height: 14px; box-sizing: border-box; border: 2px solid var(--ink-soft); }
.ny-proj-tag i.on { background: var(--accent); border-color: var(--accent); }
.ny-proj-card h3 { margin-top: 18px; font-size: 1.6rem; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
.ny-proj-card h3 + p { margin-top: 12px; margin-bottom: 28px; max-width: 28em; }
.ny-proj-card .ny-btn { margin-top: auto; }
.ny-proj-note { margin-top: 12px !important; font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- Princip ---------- */
.ny-band { background: var(--band-bg); color: var(--band-fg); }
.ny-band .ny-sec { padding-block: 120px; }
.ny-band-h { margin-bottom: 80px !important; max-width: 18em; font-size: clamp(2.2rem, 1rem + 3.6vw, 4rem); line-height: 1.04; letter-spacing: -0.04em; font-weight: 700; }
.ny-rows { border-top: 1px solid rgba(255, 255, 255, 0.28); }
.ny-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 48px; padding: 28px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.28); }
.ny-row h3 { font-size: 1.6rem; line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; }
.ny-row p { opacity: 0.82; max-width: 34em; }

/* ---------- Frågor ---------- */
.ny-faq { display: flex; flex-wrap: wrap; gap: 40px 80px; }
.ny-faq h2 { flex: 1 1 280px; max-width: 8em; }
.ny-faq-list { flex: 2 1 480px; min-width: 0; border-bottom: 1px solid var(--line); }
.ny-faq details { border-top: 1px solid var(--line); }
.ny-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 0; font-size: 1.4rem; font-weight: 600; letter-spacing: -0.015em; cursor: pointer; list-style: none; }
.ny-faq summary::-webkit-details-marker { display: none; }
.ny-plus { display: inline-block; font-size: 1.8rem; line-height: 1; color: var(--accent); transition: transform 0.15s ease-out; }
.ny-faq details[open] .ny-plus { transform: rotate(45deg); }
.ny-faq details p { margin-bottom: 26px; max-width: 36em; color: var(--ink-soft); }

/* ---------- Kontakt ---------- */
.ny-contact { background: var(--accent); color: var(--accent-fg); }
.ny-contact .ny-sec { padding-block: 120px; }
.ny-contact-grid { display: flex; flex-wrap: wrap; gap: 56px 96px; align-items: flex-start; }
.ny-contact-text { flex: 1 1 400px; min-width: 0; }
.ny-contact-h { font-size: clamp(2.6rem, 1.2rem + 4.4vw, 5rem); line-height: 0.98; letter-spacing: -0.045em; font-weight: 700; }
.ny-contact-text .big { margin-top: 32px !important; max-width: 28em; font-size: 1.2rem; line-height: 1.5; }
.ny-contact-text .small { margin-top: 16px !important; max-width: 28em; opacity: 0.9; }
.ny-contact-text .mail { margin-top: 28px !important; }
.ny-contact-text .mail a { font-family: var(--f-head); font-size: 1.2rem; font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.ny-form { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.ny-form label { display: block; margin-bottom: 8px; font-weight: 600; }
.ny-form input, .ny-form textarea { width: 100%; box-sizing: border-box; padding: 14px; font-size: 1.05rem; border: 2px solid var(--accent-fg); background: var(--bg); color: var(--ink); border-radius: 0; }
.ny-form textarea { resize: vertical; }
.ny-form .ny-btn { align-self: flex-start; }
.ny-form .ny-btn:disabled { opacity: 0.6; cursor: default; }
.ny-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ny-form-note { min-height: 1.5em; font-family: var(--f-head); font-weight: 600; }

.ny-foot { background: var(--band-bg); color: var(--band-fg); }
.ny-foot .ny-wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-top: 28px; padding-bottom: 28px; font-family: var(--f-head); font-size: 0.95rem; opacity: 0.88; }

/* ---------- Mobil ---------- */
@media (max-width: 720px) {
  .ny-top .nav { display: none; position: absolute; top: 91px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 16px; padding: 20px clamp(20px, 4vw, 56px); background: var(--hero-bg); border-bottom: 1px solid var(--hero-line); z-index: 20; }
  .ny-top .nav.open { display: flex; }
  .ny-top .nav-toggle { display: flex; }
  .ny-sec { padding-block: 80px; }
  .ny-band .ny-sec, .ny-contact .ny-sec { padding-block: 80px; }
  .ny-hero-body { padding-bottom: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  .ny-cell, .ny-node-sq, .ny-node-line, .ny-plus { transition: none; }
}

/* hidden ska alltid dölja, även när inline-stil sätter display */
.ny [hidden] { display: none !important; }
