/* hugsa.fo — second local design iteration.

   The shared public foundation (brand.css, theme.js and DESIGN-SYSTEM.md) stays
   byte-identical with Hugsa.Support. This file builds a light-first Hugsa
   composition on top of it: white and cool off-white surfaces, pale Hugsa
   blue, deep-blue type and a continuous page atmosphere. Dark mode uses the
   same structure with a coherent deep-blue surface hierarchy.

   Cards are reserved for projects and products, where a boundary means
   something. Company information, service descriptions and the closing contact
   block stay open: type, whitespace and a single hairline carry the structure
   instead of nested panels. */

/* Source Serif 4 Italic 400 — a small subset containing the letters used by the
   accent words plus the Faroese alphabet and the punctuation around them.
   Licensed under the SIL Open Font License 1.1; see fonts/OFL-SourceSerif4.txt.
   Upstream: adobe-fonts/source-serif. */
@font-face {
    font-family: "Source Serif 4";
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/source-serif-4-italic.woff2") format("woff2");
    unicode-range: U+20-21, U+2c, U+2e, U+3f, U+41-42, U+45, U+48-49, U+4f, U+55, U+59, U+61,
        U+65, U+67, U+69-6f, U+72-75, U+77, U+79, U+b7, U+c1, U+c4-c6, U+c9, U+cb, U+cd,
        U+cf-d0, U+d3, U+d6, U+d8, U+da, U+dc-dd, U+e1, U+e4-e6, U+e9, U+eb, U+ed, U+ef-f0,
        U+f3, U+f6, U+f8, U+fa, U+fc-fd, U+ff, U+13a, U+144, U+155, U+15b, U+16e-16f, U+178,
        U+1d7-1d8, U+1f5, U+1fa-1ff, U+301, U+308, U+30a, U+1e26, U+1e2e-1e2f, U+1e31,
        U+1e3f, U+1e83, U+1e85, U+1e97-1e99, U+2013-2014, U+2018-2019, U+201d;
}

@media (forced-colors: none) {
    :root {
        --page: #f7fafd;
        --page-2: #ffffff;
        --surface: #ffffff;
        --surface-soft: #eef7fd;
        --surface-strong: #d7ebf8;

        --text: #0a2b3e;
        --muted-text: #4c6777;
        --border-color: #d9e7f0;
        --border-strong: #b9d2e1;
        --focus-color: #0b5e86;
        --link-color: #0b5e86;
        --link-hover: #083f5a;
        --accent: #1477a8;
        --accent-strong: #0b5e86;
        --accent-soft: #8fc9e4;

        --button-bg: #0b5e86;
        --button-bg-hover: #083f5a;
        --button-text: #ffffff;

        --background: var(--page);
        --header-bg: rgba(255, 255, 255, 0.86);
        --page-atmosphere:
            radial-gradient(circle at 12% -5%, rgba(143, 201, 228, 0.28), transparent 30rem),
            radial-gradient(circle at 92% 8%, rgba(227, 242, 251, 0.85), transparent 34rem);

        --shadow-soft: 0 1px 2px rgba(10, 43, 62, 0.04), 0 10px 28px rgba(10, 43, 62, 0.05);
        --shadow-card: 0 1px 2px rgba(10, 43, 62, 0.05), 0 12px 32px rgba(10, 43, 62, 0.07);

        --graph-edge: #1d6c8f;
        --graph-node: #083f58;
        --graph-glow: #7fd3f5;

        --control-track: rgba(10, 43, 62, 0.05);
        --control-border: rgba(10, 43, 62, 0.1);
        --control-text: #3f5d6b;
        --control-hover: rgba(10, 43, 62, 0.07);
        --control-active: #ffffff;
        --control-active-text: #0a2b3e;
        --control-active-shadow: 0 1px 2px rgba(10, 43, 62, 0.18);
        --control-selected: #0b5e86;
        --control-selected-text: #ffffff;

        --content-max-width: 76rem;
        --text-measure: 62ch;
        --page-gutter: clamp(1.25rem, 4vw, 3.5rem);
        --radius-sm: 0.5rem;
        --radius: 0.9rem;
        --radius-lg: 1.25rem;
        --radius-pill: 999px;

        --font-size-body: 1.0625rem;
        --font-size-small: 0.875rem;
        --font-size-title: clamp(2.4rem, 5vw, 3.8rem);
        --font-size-h2: clamp(1.6rem, 2.6vw, 2.25rem);
        --line-height-body: 1.6;
        --line-height-heading: 1.12;
    }

    :root[data-theme="dark"] {
        --page: #071a23;
        --page-2: #0a222d;
        --surface: #0c2531;
        --surface-soft: #0f2e3c;
        --surface-strong: #17465b;

        --text: #eaf4f8;
        --muted-text: #a9c4d0;
        --border-color: rgba(190, 225, 240, 0.16);
        --border-strong: rgba(190, 225, 240, 0.3);
        --focus-color: #9fdcf7;
        --link-color: #9fdcf7;
        --link-hover: #d6f1fd;
        --accent: #7fd3f5;
        --accent-strong: #bfe9fa;
        --accent-soft: #4e8aa6;

        --button-bg: #bfe9fa;
        --button-bg-hover: #ffffff;
        --button-text: #061e29;

        --background: var(--page);
        --header-bg: rgba(7, 26, 35, 0.86);
        --page-atmosphere:
            radial-gradient(circle at 12% -5%, rgba(46, 155, 201, 0.16), transparent 30rem),
            radial-gradient(circle at 92% 8%, rgba(18, 58, 76, 0.55), transparent 34rem);

        --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.2), 0 10px 28px rgba(0, 0, 0, 0.16);
        --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.24), 0 12px 32px rgba(0, 0, 0, 0.18);

        --graph-edge: #5fa8c7;
        --graph-node: #bfe9fa;
        --graph-glow: #7fd3f5;

        --control-track: rgba(234, 244, 248, 0.08);
        --control-border: rgba(234, 244, 248, 0.16);
        --control-text: #b9d3df;
        --control-hover: rgba(234, 244, 248, 0.14);
        --control-active: rgba(234, 244, 248, 0.2);
        --control-active-text: #ffffff;
        --control-active-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
        --control-selected: #bfe9fa;
        --control-selected-text: #061e29;
    }
}

@media (forced-colors: none) and (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]):not([data-theme="dark"]) {
        --page: #071a23;
        --page-2: #0a222d;
        --surface: #0c2531;
        --surface-soft: #0f2e3c;
        --surface-strong: #17465b;

        --text: #eaf4f8;
        --muted-text: #a9c4d0;
        --border-color: rgba(190, 225, 240, 0.16);
        --border-strong: rgba(190, 225, 240, 0.3);
        --focus-color: #9fdcf7;
        --link-color: #9fdcf7;
        --link-hover: #d6f1fd;
        --accent: #7fd3f5;
        --accent-strong: #bfe9fa;
        --accent-soft: #4e8aa6;

        --button-bg: #bfe9fa;
        --button-bg-hover: #ffffff;
        --button-text: #061e29;

        --background: var(--page);
        --header-bg: rgba(7, 26, 35, 0.86);
        --page-atmosphere:
            radial-gradient(circle at 12% -5%, rgba(46, 155, 201, 0.16), transparent 30rem),
            radial-gradient(circle at 92% 8%, rgba(18, 58, 76, 0.55), transparent 34rem);

        --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.2), 0 10px 28px rgba(0, 0, 0, 0.16);
        --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.24), 0 12px 32px rgba(0, 0, 0, 0.18);

        --graph-edge: #5fa8c7;
        --graph-node: #bfe9fa;
        --graph-glow: #7fd3f5;

        --control-track: rgba(234, 244, 248, 0.08);
        --control-border: rgba(234, 244, 248, 0.16);
        --control-text: #b9d3df;
        --control-hover: rgba(234, 244, 248, 0.14);
        --control-active: rgba(234, 244, 248, 0.2);
        --control-active-text: #ffffff;
        --control-active-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
        --control-selected: #bfe9fa;
        --control-selected-text: #061e29;
    }
}

/* ---------------------------------------------------------------- base */

html {
    background: var(--page);
}

body {
    background-color: var(--page);
    background-image: var(--page-atmosphere);
    background-repeat: no-repeat;
    color: var(--text);
    font-family: var(--font-body);
    font-size: var(--font-size-body);
    isolation: isolate;
    line-height: var(--line-height-body);
    position: relative;
}

::selection {
    background: var(--accent);
    color: var(--page);
}

h1,
h2,
h3 {
    color: var(--text);
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: var(--line-height-heading);
}

h2 {
    letter-spacing: -0.02em;
}

h3 {
    font-weight: 600;
    letter-spacing: -0.01em;
}

p {
    text-wrap: pretty;
}

a {
    text-underline-offset: 0.18em;
}

#main-content {
    margin: 0;
    max-width: none;
    min-height: 60vh;
    padding: 0;
    position: relative;
    width: 100%;
}

html.is-graph-dragging,
html.is-graph-dragging body {
    cursor: grabbing;
    overscroll-behavior: none;
    user-select: none;
}

.wrap {
    margin-inline: auto;
    width: min(calc(100% - (2 * var(--page-gutter))), var(--content-max-width));
}

.section {
    padding-block: clamp(2.75rem, 5.5vw, 4.5rem);
}

.section-title {
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin: 0 0 1rem;
    max-width: 24ch;
    text-wrap: balance;
}

.eyebrow {
    align-items: center;
    color: var(--accent-strong);
    display: flex;
    font-size: 0.72rem;
    font-weight: 600;
    gap: 0.55rem;
    letter-spacing: 0.12em;
    margin: 0 0 1rem;
    text-transform: uppercase;
}

.eyebrow::before {
    background: var(--accent);
    border-radius: 50%;
    content: "";
    flex: 0 0 auto;
    height: 0.35rem;
    width: 0.35rem;
}

.accent {
    color: var(--accent-strong);
    font-family: "Source Serif 4", var(--font-body);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.text-link {
    align-items: center;
    color: var(--accent-strong);
    display: inline-flex;
    font-weight: 600;
    gap: 0.45rem;
    text-decoration: underline;
    text-decoration-color: var(--accent-soft);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.2em;
}

.text-link:hover {
    color: var(--link-hover);
    text-decoration-color: var(--accent);
}

.text-link__arrow {
    line-height: 1;
}

.button {
    border-radius: var(--radius-sm);
    font-weight: 600;
    letter-spacing: 0.005em;
    padding: 0.7rem 1.1rem;
}

.button__arrow {
    line-height: 1;
}

.button--quiet {
    background: transparent;
    border-color: var(--border-strong);
    color: var(--text);
}

.button--quiet:hover,
.button--quiet:focus-visible {
    background: var(--surface-soft);
    border-color: var(--accent-soft);
    color: var(--text);
}

.status-dot {
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 0.2rem rgba(20, 119, 168, 0.12);
    display: inline-block;
    flex: 0 0 auto;
    height: 0.4rem;
    width: 0.4rem;
}

.badge {
    align-items: center;
    background: var(--surface-soft);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    color: var(--accent-strong);
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 600;
    gap: 0.45rem;
    letter-spacing: 0.02em;
    margin: 0 0 1rem;
    padding: 0.3rem 0.65rem;
}

.contact-details {
    display: grid;
    gap: 1rem 2rem;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    margin: 0;
}

.contact-details dt {
    color: var(--muted-text);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.contact-details dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.contact-details__wide {
    grid-column: 1 / -1;
}

/* ---------------------------------------------------------------- hero */

.hero {
    padding-block: clamp(2.25rem, 5vw, 4.25rem) clamp(2.75rem, 6vw, 5rem);
    position: relative;
}

.hero__grid {
    align-items: center;
    display: grid;
    gap: clamp(1.5rem, 4vw, 4rem);
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
}

.hero__content {
    max-width: 40rem;
}

.hero__title {
    font-size: clamp(2.75rem, 5.4vw, 4.9rem);
    letter-spacing: -0.035em;
    line-height: 1.02;
    margin: 0 0 1.35rem;
    max-width: 15ch;
    overflow-wrap: break-word;
    text-wrap: balance;
}

.hero__title .accent {
    color: var(--accent-strong);
}

.hero__intro {
    color: var(--muted-text);
    font-size: clamp(1.08rem, 1.3vw, 1.25rem);
    margin: 0;
    max-width: 42ch;
}

.hero__actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: clamp(1.5rem, 2.5vw, 2rem);
}

.hero__art {
    isolation: isolate;
    min-width: 0;
    position: relative;
}

/* Atmosphere behind the mark: a pale wash that replaces the panel the artwork
   used to sit inside. It carries no edge, so the illustration stays open. */
.hero__art::before {
    background: radial-gradient(
        closest-side,
        color-mix(in srgb, var(--accent-soft) 42%, transparent),
        color-mix(in srgb, var(--accent-soft) 12%, transparent) 62%,
        transparent 78%);
    content: "";
    inset: -10% -8% -6% 0;
    pointer-events: none;
    position: absolute;
    z-index: -1;
}

.hero__art .knowledge-graph {
    max-width: 100%;
}

/* On wide screens the mark reaches slightly past the content column, so it
   belongs to the page edge rather than to a centred frame. */
@media (min-width: 64.01rem) {
    .hero__art {
        margin-right: calc(-1 * clamp(0rem, 3vw, 4rem));
    }
}

/* ---------------------------------------------------------------- services */

.services {
    padding-top: clamp(1.5rem, 3vw, 2rem);
}

.services__lead {
    align-items: center;
    display: grid;
    gap: clamp(1.5rem, 4vw, 4rem);
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.services__intro .section-title {
    margin-bottom: 1rem;
}

.services__intro p:last-child {
    color: var(--muted-text);
    margin: 0;
    max-width: 54ch;
}

.services__diagram {
    align-self: end;
    justify-self: end;
    max-width: 21rem;
    width: 100%;
}

.services__diagram .flow {
    max-width: 100%;
}

/* The five areas as a plain index: one hairline, one glyph and one number per
   cell. The sixth cell carries the link, so the rows close cleanly. */
.service-index {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.service-index__item,
.service-index__more {
    border-top: 1px solid var(--border-color);
    display: grid;
    gap: 0.45rem;
    padding: clamp(1.1rem, 2vw, 1.4rem) clamp(1.25rem, 2.4vw, 2rem) clamp(1.5rem, 3vw, 2.25rem) 0;
}

.service-index__item:nth-child(3n),
.service-index__more {
    padding-right: 0;
}

.service-index__top {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.service-index__glyph {
    color: var(--accent-strong);
    display: block;
}

.service-index__number {
    color: var(--muted-text);
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    letter-spacing: 0.14em;
}

.service-index__item h3 {
    font-size: 1.05rem;
    margin: 0;
    max-width: 22ch;
}

.service-index__item p {
    color: var(--muted-text);
    font-size: 0.95rem;
    margin: 0;
    max-width: 36ch;
}

.service-index__more {
    align-content: end;
    justify-items: start;
}

/* ---------------------------------------------------------------- current work */

/* Current work, the founder and the closing enquiry each open with the same
   hairline, which gives the lower half of the page one steady rhythm. */
.work {
    border-top: 1px solid var(--border-color);
}

.work__head {
    margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.work__grid {
    align-items: center;
    display: grid;
    gap: clamp(1.5rem, 4vw, 4rem);
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.work__art {
    justify-self: center;
    max-width: 30rem;
    width: 100%;
}

.work__art .ai-tasks {
    max-width: 100%;
}

.work__copy {
    max-width: 34rem;
}

.work__name {
    font-size: clamp(2.2rem, 4.4vw, 3.3rem);
    letter-spacing: -0.03em;
    line-height: 1.02;
    margin: 0 0 0.6rem;
    overflow-wrap: break-word;
}

.work__meta {
    color: var(--accent-strong);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    margin: 0 0 1.25rem;
    text-transform: uppercase;
}

.work__body {
    color: var(--muted-text);
    font-size: clamp(1.02rem, 1.2vw, 1.12rem);
    margin: 0 0 1.5rem;
    max-width: 40ch;
}

.work__copy .badge {
    margin-bottom: 1.5rem;
}

/* ---------------------------------------------------------------- project feature */

.project-feature {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    display: grid;
    gap: clamp(1.5rem, 4vw, 3rem);
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    padding: clamp(1.5rem, 4vw, 2.5rem);
}

.project-feature__copy {
    max-width: 36rem;
}

.project-feature__title {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin: 0 0 0.75rem;
    overflow-wrap: break-word;
}

.project-feature__meta {
    color: var(--accent-strong);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    margin: 0 0 1rem;
    text-transform: uppercase;
}

.project-feature__copy p:not(.badge):not(.project-feature__meta) {
    color: var(--muted-text);
    max-width: 46ch;
}

/* The artwork sits directly on the featured card with a pale wash behind it.
   The illustration already draws its own sheets, so a framed panel inside the
   card would only be a box within a box. */
.project-feature__visual {
    align-items: center;
    display: flex;
    isolation: isolate;
    justify-content: center;
    position: relative;
}

.project-feature__visual::before {
    background: radial-gradient(
        closest-side,
        color-mix(in srgb, var(--accent-soft) 34%, transparent),
        transparent 76%);
    content: "";
    inset: -6%;
    pointer-events: none;
    position: absolute;
    z-index: -1;
}

.project-feature__visual .ai-tasks {
    max-width: 27rem;
    width: 100%;
}

/* ---------------------------------------------------------------- profile */

.profile {
    border-top: 1px solid var(--border-color);
}

/* The About page sits directly under its page hero, so the block opens without
   a rule above it and starts a little closer to the intro. */
.person-profile {
    padding-top: clamp(1.75rem, 3.5vw, 2.75rem);
}

.profile__grid {
    align-items: start;
    display: grid;
    gap: clamp(1.5rem, 4vw, 4rem);
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}

.profile__name {
    font-size: clamp(2rem, 3.8vw, 2.9rem);
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin: 0;
    overflow-wrap: break-word;
}

.profile__body {
    border-left: 1px solid var(--border-color);
    padding-left: clamp(1.5rem, 3vw, 2.5rem);
}

.profile__lede {
    font-size: clamp(1.05rem, 1.4vw, 1.22rem);
    margin: 0;
    max-width: 46ch;
}

.profile__aside {
    color: var(--muted-text);
    margin: 1rem 0 0;
    max-width: 52ch;
}

.profile__body .contact-details {
    margin: 1.75rem 0;
}

/* ---------------------------------------------------------------- enquiry */

/* The closing composition is a full-width band of atmosphere rather than a
   card: a hairline on top and a wash that settles towards the footer. */
.enquiry {
    background: linear-gradient(180deg, transparent, var(--surface-soft));
    border-top: 1px solid var(--border-color);
    padding-block: clamp(3rem, 6vw, 5rem);
}

.enquiry__grid {
    align-items: start;
    display: grid;
    gap: clamp(2rem, 5vw, 4rem);
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.enquiry__title {
    font-size: clamp(2.3rem, 4.6vw, 3.5rem);
    letter-spacing: -0.035em;
    line-height: 1.04;
    margin: 0 0 1.1rem;
    max-width: 18ch;
    text-wrap: balance;
}

.enquiry__body {
    color: var(--muted-text);
    margin: 0;
    max-width: 48ch;
}

.enquiry__actions {
    display: grid;
}

.enquiry-link {
    align-items: center;
    border-top: 1px solid var(--border-strong);
    color: var(--text);
    display: flex;
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
    font-weight: 600;
    gap: 1rem;
    justify-content: space-between;
    padding-block: 1.15rem;
    text-decoration: none;
}

.enquiry-link:last-of-type {
    border-bottom: 1px solid var(--border-strong);
}

.enquiry-link:hover,
.enquiry-link:focus-visible {
    color: var(--accent-strong);
    text-decoration: none;
}

.enquiry-link__arrow {
    color: var(--accent-strong);
    font-size: 1.25rem;
    line-height: 1;
}

.enquiry__meta {
    color: var(--muted-text);
    margin: 1.5rem 0 0;
}

.enquiry__meta a {
    color: var(--accent-strong);
}

/* ---------------------------------------------------------------- inner pages */

.page-hero {
    padding-block: clamp(2rem, 4vw, 3rem) clamp(1rem, 2vw, 1.5rem);
    position: relative;
}

.page-hero h1 {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin: 0 0 1rem;
    max-width: 18ch;
    overflow-wrap: break-word;
}

.page-hero__intro {
    color: var(--muted-text);
    font-size: clamp(1.05rem, 1.3vw, 1.15rem);
    margin: 0;
    max-width: 56ch;
}

.page-body {
    padding-block: clamp(1.5rem, 3vw, 2.5rem) clamp(2.5rem, 5vw, 3.5rem);
}

.page-body__foot {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: space-between;
    margin-top: 2rem;
}

.page-note {
    color: var(--muted-text);
    font-size: var(--font-size-small);
    max-width: 56ch;
}

/* ---------------------------------------------------------------- services page */

/* Five areas as one editorial list: a hairline above each row, the glyph in a
   narrow column, the title beside it and the copy in a wider measure. No
   enclosing card, so the icons keep their scannability without each service
   turning into a panel of its own. */
.service-detail {
    align-items: start;
    border-top: 1px solid var(--border-color);
    display: grid;
    gap: 0.4rem 1.5rem;
    grid-template-columns: auto minmax(0, 0.78fr) minmax(0, 1.22fr);
    padding-block: clamp(1.6rem, 3vw, 2.2rem);
}

.service-detail__icon {
    color: var(--accent-strong);
    display: block;
    padding-top: 0.2rem;
}

.service-detail h2 {
    font-size: clamp(1.25rem, 1.6vw, 1.5rem);
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.25;
    margin: 0;
}

.service-detail__copy p {
    color: var(--muted-text);
    font-size: 0.95rem;
    margin: 0 0 0.5rem;
}

.service-detail__copy p:first-child {
    color: var(--text);
}

.service-detail__copy p:last-child {
    margin-bottom: 0;
}

/* ---------------------------------------------------------------- projects page */

.project-layout {
    display: grid;
    gap: 1.5rem;
}

.project-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.project-tile {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: clamp(1.5rem, 3vw, 2rem);
}

/* A status label, not a progress bar: without this the column flex container
   stretches the badge to the full width of the tile. */
.project-tile .badge {
    align-self: flex-start;
}

.project-tile h2 {
    font-size: clamp(1.4rem, 2.2vw, 1.8rem);
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0;
}

.project-tile__meta {
    color: var(--accent-strong);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    margin: 0;
    text-transform: uppercase;
}

.project-tile p:not(.badge):not(.project-tile__meta) {
    color: var(--muted-text);
    margin: 0;
}

.project-tile .text-link {
    margin-top: auto;
}

/* The trial tile in the second row is real and usable, but its rights and source
   arrangements are still being settled. It stays flatter and quieter than the
   featured tiles, without hiding anything. The quieter surface belongs to this
   placement, not to the Royndarútgáva status on its own. */
.project-tile--trial {
    background: transparent;
    box-shadow: none;
}

.project-tile--trial .badge {
    background: transparent;
    color: var(--muted-text);
}

.project-tile--trial .status-dot {
    animation: none;
    background: var(--muted-text);
    box-shadow: none;
}

/* ---------------------------------------------------------------- privacy page */

.privacy {
    display: grid;
    gap: 2rem;
    margin-inline: auto;
    max-width: 60rem;
}

.privacy__lead {
    color: var(--text);
    font-size: clamp(1.1rem, 1.6vw, 1.3rem);
    line-height: 1.55;
    margin: 0;
    max-width: 56ch;
}

.privacy__copy {
    display: grid;
    gap: 1rem;
    max-width: var(--text-measure);
}

.privacy__copy p {
    color: var(--muted-text);
    margin: 0;
}

.privacy__controller,
.privacy__contact {
    border-top: 1px solid var(--border-color);
    padding-top: clamp(1.5rem, 3vw, 2rem);
}

.privacy__controller h2,
.privacy__contact h2 {
    font-size: 1.4rem;
    letter-spacing: -0.02em;
    margin: 0 0 0.75rem;
}

.privacy__controller p,
.privacy__contact p {
    color: var(--muted-text);
    margin: 0 0 1.5rem;
}

.privacy__contact p {
    max-width: var(--text-measure);
}

.privacy__contact p:last-child {
    margin-bottom: 0;
}

/* ---------------------------------------------------------------- not found */

/* The page uses the inner-page composition; the status marker and the action
   spacing live in Pages/NotFound.razor.css. Nothing here needs a boundary. */
.not-found h1 {
    max-width: 26ch;
}

.not-found .page-note {
    max-width: 48ch;
}

/* ---------------------------------------------------------------- motion */

@keyframes hero-in {
    from {
        opacity: 0;
        transform: translateY(0.75rem);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes reveal-up {
    from {
        opacity: 0;
        transform: translateY(0.75rem);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes status-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 0.2rem rgba(20, 119, 168, 0.12);
    }

    50% {
        box-shadow: 0 0 0 0.35rem rgba(20, 119, 168, 0.04);
    }
}

@media (prefers-reduced-motion: no-preference) {
    .hero__content,
    .hero__art {
        animation: hero-in 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
    }

    .hero__art {
        animation-delay: 100ms;
    }

    .status-dot {
        animation: status-pulse 4s ease-in-out infinite;
    }

    .button__arrow,
    .text-link__arrow,
    .enquiry-link__arrow {
        transition: transform 160ms ease;
    }

    .button:hover .button__arrow,
    .button:focus-visible .button__arrow,
    .text-link:hover .text-link__arrow,
    .text-link:focus-visible .text-link__arrow,
    .enquiry-link:hover .enquiry-link__arrow,
    .enquiry-link:focus-visible .enquiry-link__arrow {
        transform: translateX(0.2rem);
    }
}

@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .reveal {
            animation: reveal-up linear both;
            animation-range: entry 5% cover 30%;
            animation-timeline: view();
            animation-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1);
        }
    }
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 64rem) {
    .hero__grid {
        gap: 2rem;
        grid-template-columns: minmax(0, 1fr);
    }

    .hero__content {
        max-width: 44rem;
    }

    .hero__art {
        margin-inline: auto;
        max-width: 36rem;
        width: 100%;
    }

    .services__lead {
        gap: 1.5rem;
        grid-template-columns: minmax(0, 1fr);
    }

    .services__diagram {
        justify-self: start;
        max-width: 18rem;
    }

    .service-index {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .service-index__item:nth-child(3n) {
        padding-right: clamp(1.25rem, 2.4vw, 2rem);
    }

    .service-index__item:nth-child(2n),
    .service-index__more {
        padding-right: 0;
    }

    .work__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .work__art {
        order: 2;
    }

    .profile__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .profile__body {
        border-left: 0;
        padding-left: 0;
    }

    .enquiry__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Inner pages keep their own composition. */
    .project-feature {
        grid-template-columns: minmax(0, 1fr);
    }

    .project-feature__visual {
        order: 2;
    }

    .project-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .service-detail {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .service-detail__copy {
        grid-column: 2;
    }
}

@media (max-width: 48rem) {
    .hero {
        padding-block: 1.75rem 2.5rem;
    }

    .hero__title {
        font-size: clamp(2.3rem, 10vw, 3.1rem);
        max-width: 16ch;
    }

    .service-index__item p {
        max-width: 46ch;
    }

    .page-body__foot {
        align-items: flex-start;
        flex-direction: column;
    }

    .service-detail {
        grid-template-columns: minmax(0, 1fr);
    }

    .service-detail__copy {
        grid-column: auto;
    }
}

@media (max-width: 40rem) {
    .service-index {
        grid-template-columns: minmax(0, 1fr);
    }

    .service-index__item,
    .service-index__more,
    .service-index__item:nth-child(3n),
    .service-index__item:nth-child(2n) {
        padding-right: 0;
    }
}

@media (max-width: 34rem) {
    .hero__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .hero__actions .button {
        width: 100%;
    }
}

@media (max-width: 24rem) {
    .hero__title {
        font-size: 2.2rem;
    }

    .project-feature__title {
        font-size: 1.8rem;
    }

    .work__name {
        font-size: 1.8rem;
    }

    .profile__name {
        font-size: 1.9rem;
    }
}

/* ---------------------------------------------------------------- errors */

#blazor-error-ui {
    background: var(--surface);
    border-top: 1px solid var(--border-color);
    display: none;
    inset: auto 0 0;
    padding: var(--space-2) var(--page-gutter);
    position: fixed;
    z-index: 1000;
}

/* ---------------------------------------------------------------- forced colors */

@media (forced-colors: active) {
    :root {
        --page: Canvas;
        --page-2: Canvas;
        --surface: Canvas;
        --surface-soft: Canvas;
        --surface-strong: Canvas;
        --text: CanvasText;
        --muted-text: CanvasText;
        --border-color: ButtonText;
        --border-strong: ButtonText;
        --focus-color: Highlight;
        --link-color: LinkText;
        --link-hover: LinkText;
        --accent: LinkText;
        --accent-strong: LinkText;
        --accent-soft: ButtonText;
        --button-bg: ButtonFace;
        --button-bg-hover: ButtonFace;
        --button-text: ButtonText;
        --header-bg: Canvas;
        --page-atmosphere: none;
        --shadow-soft: none;
        --shadow-card: none;
        --graph-edge: ButtonText;
        --graph-node: CanvasText;
        --graph-glow: Canvas;
    }

    .hero__art::before,
    .services__diagram,
    .project-feature__visual::before {
        display: none;
    }

    .hero__art .knowledge-graph__graph {
        filter: none;
    }

    .project-feature,
    .project-tile {
        background: Canvas;
        border-color: ButtonText;
    }

    .badge {
        background: Canvas;
        border-color: ButtonText;
        color: CanvasText;
    }

    .accent,
    .hero__title .accent,
    .eyebrow,
    .contact-details dt,
    .project-feature__meta,
    .project-tile__meta,
    .work__meta,
    .service-index__number,
    .enquiry__body,
    .enquiry__meta {
        color: CanvasText;
    }

    .service-index__item,
    .service-index__more,
    .service-detail,
    .work,
    .profile,
    .profile__body,
    .enquiry,
    .enquiry-link,
    .privacy__controller {
        border-color: ButtonText;
    }

    .service-index__glyph,
    .service-detail__icon,
    .enquiry-link__arrow {
        color: CanvasText;
    }

    .eyebrow::before {
        background: CanvasText;
    }

    .status-dot {
        animation: none;
        background: CanvasText;
        box-shadow: none;
    }

    .text-link {
        color: LinkText;
        text-decoration-color: ButtonText;
    }

    .button--quiet {
        border: 1px solid ButtonText;
    }
}
