/* Fenrir Labs — "Viking glacier" theme. Plain CSS, no build step. */
:root {
  --night: #04070c;        /* page background, matches the emblem's black */
  --navy: #0a1422;         /* raised surfaces */
  --navy-2: #0f1c2e;       /* cards */
  --line: #1f3047;         /* hairlines */
  --frost: #eaf2f8;        /* primary text */
  --mist: #a9bccd;         /* secondary text */
  --steel: #7f93a6;        /* cold steel accent (decorative / large text) */
  --ice: #8fd3f4;          /* glacier blue: links, focus */
  --glacier: #4fa8d8;      /* deeper glacier blue */
  --aurora: #3fc1b0;       /* faint aurora green, gradients only */
  --radius: 14px;
  --maxw: 78rem;
  --font-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Larger type on screens with the room for it. */
@media (min-width: 48rem) { html { font-size: 112.5%; } }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--night);
  background-image:
    radial-gradient(60rem 28rem at 50% -8rem, rgba(79, 168, 216, 0.16), transparent 70%),
    radial-gradient(40rem 20rem at 85% 0, rgba(63, 193, 176, 0.07), transparent 70%);
  background-repeat: no-repeat;
  color: var(--frost);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

/* Fine frost grain over the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.85 0 0 0 0 0.93 0 0 0 0 1 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ice); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--frost); }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: var(--frost);
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2rem, 4.2vw, 3rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); }
h3 { font-size: 1.25rem; letter-spacing: 0.03em; }
h2[id], h3[id] { scroll-margin-top: 6rem; }
p { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.25em; }
li { margin-bottom: 0.4em; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--frost); color: var(--night);
  padding: 0.6rem 1rem; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 40rem) { .wrap { padding: 0 2rem; } }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(4, 7, 12, 0.86);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(4, 7, 12, 0.72); backdrop-filter: blur(10px); }
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--frost); }
.brand img { width: 40px; height: 40px; border-radius: 50%; }
.brand span { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: 0.14em; text-transform: uppercase; }

.nav-toggle {
  display: none;
  background: transparent; color: var(--frost);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 0.5rem 0.8rem; font: inherit; font-size: 0.95rem; cursor: pointer;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; }
.site-nav li { margin: 0; }
.site-nav a { color: var(--mist); text-decoration: none; font-size: 0.95rem; padding: 0.4rem 0; display: inline-block; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--frost); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--ice); }

/* Mobile navigation (collapses only when JS is available) */
@media (max-width: 60rem) {
  .js .nav-toggle { display: inline-block; }
  .js .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--night); border-bottom: 1px solid var(--line); }
  .js .site-nav.open { display: block; }
  .js .site-nav ul { flex-direction: column; padding: 0.5rem 1rem 1rem; gap: 0; }
  .js .site-nav a { display: block; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
  .js .site-nav li:last-child a { border-bottom: 0; }
  html:not(.js) .header-inner { flex-wrap: wrap; padding: 0.75rem 0; }
}

main { flex: 1; }
section { padding: 2rem 0; }
@media (min-width: 48rem) { section { padding: 2.5rem 0; } }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 1.5rem 0 1rem; }
.hero-grid { display: grid; gap: 1rem; align-items: center; }
@media (min-width: 56rem) { .hero-grid { grid-template-columns: 1.35fr 1fr; gap: 2rem; } .hero { padding: 1.5rem 0 0.75rem; } }
/* Blend the artwork's dark background into the hero without masking its lettering. */
.hero .lockup { width: min(100%, 30rem); margin: 0 auto; mix-blend-mode: lighten; }
.eyebrow { font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ice); margin-bottom: 0.65rem; font-weight: 600; }
.lead { font-size: 1.2rem; color: var(--mist); max-width: 38rem; }

/* Slow aurora drift behind the hero (disabled for reduced motion) */
.aurora {
  position: absolute; inset: -20% -10% auto; height: 70%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(30% 50% at 30% 50%, rgba(63, 193, 176, 0.10), transparent 70%),
    radial-gradient(35% 60% at 65% 40%, rgba(79, 168, 216, 0.14), transparent 70%);
  filter: blur(30px);
}
@media (prefers-reduced-motion: no-preference) {
  .aurora { animation: aurora 24s ease-in-out infinite alternate; }
  @keyframes aurora { from { transform: translateX(-4%) skewY(-2deg); } to { transform: translateX(4%) skewY(2deg); } }
}

.page-head { padding: 2rem 0 1rem; }
@media (min-width: 48rem) { .page-head { padding: 2.5rem 0 1rem; } }
.page-head .lead { margin-bottom: 0; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  text-decoration: none; font-weight: 600; font-size: 0.95rem; line-height: 1.25; letter-spacing: 0.01em;
  padding: 0.8rem 1.25rem; border-radius: 10px; border: 1px solid transparent; cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn-primary {
  background: linear-gradient(180deg, #b9e5fb, #86ccef); color: #03121d; border-color: #d3effd;
  box-shadow: inset 0 1px 0 #ffffff99, 0 12px 28px -14px rgba(79, 168, 216, 0.9);
}
.btn-primary:hover { background: linear-gradient(180deg, #dcf3fe, #a3daf5); color: #03121d; transform: translateY(-1px); }
.btn-ghost { border-color: #2f4762; color: var(--frost); background: rgba(255, 255, 255, 0.03); }
.btn-ghost:hover { border-color: var(--ice); color: var(--frost); background: rgba(143, 211, 244, 0.1); }
.btn-arrow::after {
  content: ""; width: 1em; height: 1em; flex: none; background: currentColor; transition: transform 0.2s;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8h10M9 4l4 4-4 4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8h10M9 4l4 4-4 4'/%3E%3C/svg%3E") center / contain no-repeat;
}
.btn-arrow:hover::after { transform: translateX(3px); }

/* Assistant launcher: a quiet glass chip rather than a floating call-to-action. */
.assistant-launcher {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 40;
  display: flex; align-items: center; gap: 0.7rem; padding: 0.45rem 1rem 0.45rem 0.45rem;
  text-decoration: none; color: var(--frost); border: 1px solid #33506b; border-radius: 14px;
  background: rgba(10, 20, 34, 0.94); box-shadow: 0 14px 40px -12px #000, inset 0 1px 0 #ffffff12;
  transition: border-color 0.2s, transform 0.2s;
}
@supports (backdrop-filter: blur(8px)) { .assistant-launcher { background: rgba(10, 20, 34, 0.78); backdrop-filter: blur(12px); } }
.assistant-launcher:hover { border-color: var(--ice); color: var(--frost); transform: translateY(-2px); }
.launcher-avatar { position: relative; flex: none; }
.launcher-avatar img { width: 2.5rem; height: 2.5rem; border-radius: 10px; border: 1px solid #33506b; }
.launcher-avatar::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 0.65rem; height: 0.65rem; border-radius: 50%; background: #62d6c2; border: 2px solid #0a1422; }
.launcher-text { display: flex; flex-direction: column; line-height: 1.25; }
.launcher-text strong { font-size: 0.9rem; font-weight: 600; }
.launcher-text small { font-size: 0.74rem; color: var(--mist); }
body.has-explore-launcher .site-footer { padding-bottom: 6rem; }
@media (max-width: 35rem) {
  .assistant-launcher { padding: 0.4rem; border-radius: 16px; }
  .launcher-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .btn, .btn-arrow::after, .assistant-launcher { transition: none; } .btn-primary:hover, .assistant-launcher:hover, .btn-arrow:hover::after { transform: none; } }

/* Cards */
.grid { display: grid; gap: 1rem; }
@media (min-width: 40rem) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 56rem) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-2.wide { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 40rem) and (max-width: 56rem) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
.card {
  position: relative;
  background: linear-gradient(180deg, var(--navy-2), var(--navy));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.card::before { /* frosted top edge */
  content: ""; position: absolute; left: 1.5rem; right: 1.5rem; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(143, 211, 244, 0.6), transparent);
}
.card h3 { margin-bottom: 0.5em; }
.card p:last-child { margin-bottom: 0; }
.card .icon { width: 40px; height: 40px; color: var(--ice); margin-bottom: 1rem; }
.meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.meta li { margin: 0; font-size: 0.8rem; letter-spacing: 0.04em; color: var(--frost); border: 1px solid var(--line); background: rgba(143, 211, 244, 0.06); border-radius: 999px; padding: 0.15rem 0.65rem; }
.meta li.status { border-color: rgba(143, 211, 244, 0.45); color: var(--ice); }
.placeholder-art {
  aspect-ratio: 16 / 9; border-radius: 10px; margin-bottom: 1.25rem; border: 1px solid var(--line);
  background:
    radial-gradient(60% 80% at 30% 20%, rgba(79, 168, 216, 0.25), transparent 70%),
    radial-gradient(50% 70% at 80% 90%, rgba(63, 193, 176, 0.14), transparent 70%),
    var(--night);
  display: grid; place-items: center;
}
.placeholder-art svg { width: 30%; max-width: 6rem; color: rgba(143, 211, 244, 0.55); }

/* Rune divider */
.rune-divider { display: flex; align-items: center; gap: 1rem; color: var(--steel); margin: 0 auto; width: 100%; max-width: var(--maxw); padding: 0 1rem; }
.rune-divider::before, .rune-divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line) 30%, var(--line) 70%, transparent); }
.rune-divider svg { width: 9rem; height: 1.5rem; flex: none; }
main + .rune-divider { margin-top: 2rem; }
@media (min-width: 48rem) { main + .rune-divider { margin-top: 2.5rem; } }

/* Prose pages */
.prose { max-width: 46rem; }
.prose h2 { margin-top: 2.2em; font-size: clamp(1.35rem, 3vw, 1.75rem); }
.prose h3 { margin-top: 1.6em; }
.prose p, .prose li { color: #d3dfe9; }
.callout {
  border: 1px solid rgba(143, 211, 244, 0.35); background: rgba(143, 211, 244, 0.06);
  border-radius: var(--radius); padding: 1rem 1.25rem; margin: 0 0 2rem;
}
.callout p:last-child { margin-bottom: 0; }
.muted { color: var(--mist); }
.small { font-size: 0.9rem; }

/* Split section */
.split { display: grid; gap: 2rem; }
@media (min-width: 56rem) { .split { grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; } }

/* Steps */
.project-details { display:grid; gap:1.5rem 2rem; margin:1.5rem 0 0; }
.project-details > div { border-top:1px solid var(--line); padding-top:1rem; }
.project-details dt { font-weight:600; margin-bottom:0.5rem; }
.project-details dd { margin:0; color:var(--mist); }
@media(min-width:48rem) { .project-details { grid-template-columns:1fr 1fr; } }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 1.1rem 2rem 1.1rem 0; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.25rem; top: 1rem; color: var(--ice); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 0 1.1rem; color: #d3dfe9; }

/* Contact blocks */
.mail { font-size: 1.15rem; font-weight: 600; word-break: break-word; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.25rem; margin: 0; }
dl.facts dt { color: var(--mist); }
dl.facts dd { margin: 0; }

/* CTA band */
.band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(79,168,216,0.07), rgba(63,193,176,0.05)); }
.band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.band h2 { margin: 0; }
main > .band:last-child { border-bottom: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0 1.5rem; color: var(--mist); font-size: 0.95rem; margin-top: 1.5rem; }
.rune-divider + .site-footer { border-top: 0; }
.site-footer .legal { margin: 0; font-size: 0.85rem; }

/* 404 */
.notfound { text-align: center; padding: 5rem 0; }
.notfound img { width: 9rem; margin: 0 auto 2rem; border-radius: 50%; }
.notfound .actions { justify-content: center; }

/* Compact content rhythm and useful navigation between answers. */
.section-heading { display:flex; align-items:end; justify-content:space-between; flex-wrap:wrap; gap:0.5rem 1.5rem; margin-bottom:1rem; }
.section-heading h2 { margin-bottom:0; }
.section-heading > a { font-size:0.95rem; }
.faq-layout { display:block; padding-bottom:2rem; }
.faq-group h2 { margin-bottom:0.75rem; }
.faq details[id] { scroll-margin-top:5rem; }
.faq details:target { background:rgba(143,211,244,0.04); }
@media (max-width:55.99rem) { .hero .lockup { width:min(100%,22rem); } }
@media (min-width:64rem) { .hero h1 { max-width:19ch; } }

.faq-groups { display:grid; gap:1.75rem 2rem; align-items:start; }
.faq-group { padding:0; }
@media(min-width:64rem) { .faq-groups { grid-template-columns:1fr 1fr; } }

/* Services */
.service-label { font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--steel); font-weight: 600; margin: 1.1rem 0 0.4rem; }
.service-examples { list-style: none; margin: 0; padding: 0; font-size: 0.9rem; }
.service-examples li { margin: 0; padding: 0.4rem 0; border-top: 1px solid var(--line); }
.project-details dt span { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; margin-right: 0.5rem; border: 1px solid #33506b; border-radius: 8px; font-size: 0.8rem; color: var(--ice); }
.band-inline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; background: linear-gradient(90deg, rgba(79,168,216,0.08), rgba(63,193,176,0.05)); }
.band-inline h2 { margin-bottom: 0.4rem; }
.band-inline p:last-child { margin: 0; }
.start-questions dt { font-size: 1.15rem; }
.start-questions dd { line-height: 1.65; }
.site-footer .legal a { color: inherit; text-underline-offset: 0.2em; }
.site-footer .legal a:hover { color: var(--frost); }

/* Industry tiles (home page and Services) */
.industry-grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(min(17rem, 100%), 1fr)); margin-top: 1.5rem; }
.industry-tile { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; text-decoration: none; color: var(--frost); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.2rem; background: linear-gradient(180deg, var(--navy-2), var(--navy)); transition: border-color 0.2s, transform 0.2s; }
.industry-tile:hover { border-color: var(--ice); color: var(--frost); transform: translateY(-2px); }
.industry-tile strong { font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; letter-spacing: 0.03em; line-height: 1.3; }
.industry-more { margin-top: auto; font-size: 0.9rem; font-weight: 600; color: var(--ice); }
.industry-more::after { content: " \2192"; }
@media (prefers-reduced-motion: reduce) { .industry-tile { transition: none; } .industry-tile:hover { transform: none; } }
.industry-blurb { font-size: 0.88rem; color: var(--mist); line-height: 1.45; margin-bottom: 0.4rem; }

/* Project outline (Services): a timeline, no step numbers. Vertical on phones, a row of four on wide screens. */
.outline { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; gap: 1.6rem; }
.outline li { position: relative; padding-left: 1.9rem; }
.outline li::before { content: ""; position: absolute; left: 0; top: 0.4rem; width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--ice); box-shadow: 0 0 0 4px rgba(143, 211, 244, 0.14), 0 0 16px rgba(143, 211, 244, 0.45); }
.outline li:not(:last-child)::after { content: ""; position: absolute; left: 0.36rem; top: 1.55rem; bottom: -1.45rem; width: 1px; background: linear-gradient(var(--ice), #3d6584); }
/* A small chevron at the end of each connecting line shows the direction of the steps. */
.outline li:not(:last-child) > h3::after { content: ""; position: absolute; left: 0.17rem; bottom: -1.2rem; width: 0.42rem; height: 0.42rem; border-right: 1.5px solid #5a8db3; border-bottom: 1.5px solid #5a8db3; transform: rotate(45deg); }
.outline h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.2rem; letter-spacing: 0.03em; margin: 0 0 0.45rem; }
.outline p { margin: 0; color: var(--mist); }
@media (min-width: 56rem) {
  .outline { grid-template-columns: repeat(4, 1fr); gap: 2rem; }
  .outline li { padding: 1.9rem 0 0; }
  .outline li::before { top: 0; }
  .outline li:not(:last-child)::after { left: 1.15rem; right: -1.35rem; top: 0.37rem; bottom: auto; width: auto; height: 1px; background: linear-gradient(90deg, var(--ice), #3d6584); }
  .outline li:not(:last-child) > h3::after { left: auto; right: -1.4rem; top: 0.18rem; bottom: auto; transform: rotate(-45deg); }
}
