/**
 * Agency design system: tokens, buttons, hero, stats, closing band, header overlay.
 * Loads after main.css and base.css. Plain CSS, no build step.
 *
 * @package AngeloseGlobal
 */

:root {
    --ag-navy: #18183f;
    --ag-navy-deep: #101030;
    --ag-accent: #f5b83d;          /* proposed accent, change here to restyle all buttons */
    --ag-accent-ink: #18183f;
    --ag-white: #fff;
    --ag-radius: 0.75rem;
    --ag-space-section: clamp(2.75rem, 5.5vw, 4rem);
    --ag-text-hero: clamp(2.5rem, 6.5vw, 5rem);
    --ag-shadow: 0 10px 30px -12px rgba(16, 16, 48, 0.45);
    --ag-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --ag-emph: #18183f;            /* the one emphasis colour for text: navy in light mode */
    --ag-field-radius: 0.75rem;
}
html.dark, :root:not(.light) { --ag-emph: #8fb4ff; }   /* ...and light blue in dark mode */

.ag-container {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 1.5rem;
}

/* Buttons */
.ag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3.25rem;
    padding: 0.85rem 1.75rem;
    border-radius: 999px;
    border: 2px solid transparent;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.25s var(--ag-ease), background-color 0.25s, color 0.25s, border-color 0.25s;
}
.ag-btn:hover { transform: translateY(-2px); }
.ag-btn:focus-visible { outline: 3px solid var(--ag-accent); outline-offset: 3px; }
.ag-btn--primary { background: var(--ag-accent); color: var(--ag-accent-ink); }
.ag-btn--primary:hover { background: #ffc95c; color: var(--ag-accent-ink); }
.ag-btn--ghost { border-color: rgba(255, 255, 255, 0.55); color: var(--ag-white); background: transparent; }
.ag-btn--ghost:hover { background: var(--ag-white); color: var(--ag-navy); border-color: var(--ag-white); }
.ag-btn--nav { min-height: 2.5rem; padding: 0.5rem 1.25rem; font-size: 0.9rem; }
/* Outline button that follows the page (dark text in light mode, light text in dark mode) */
.ag-btn--outline { border-color: hsl(var(--foreground) / 0.22); color: hsl(var(--foreground)); background: transparent; }
.ag-btn--outline:hover { background: hsl(var(--foreground)); color: hsl(var(--background)); border-color: hsl(var(--foreground)); }
.ag-btn--sm { min-height: 2.5rem; padding: 0.55rem 1.15rem; font-size: 0.9rem; }
.ag-btn--block { width: 100%; }
.ag-btn svg { width: 1.1rem; height: 1.1rem; flex-shrink: 0; transition: transform 0.25s var(--ag-ease); }
.ag-btn:hover svg { transform: translateX(3px); }

/* Selected work cards: screenshot on top (images line up across a row), text below, tags pinned to the bottom */
.ag-project-card { display: flex; flex-direction: column; padding: 1.25rem; height: 100%; }
.ag-project-card--small { padding: 1rem; }
.ag-project-card__body { display: flex; flex-direction: column; flex: 1; gap: 0.35rem; margin-top: 1.25rem; }
.ag-project-card__titlebar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.ag-project-card__desc { margin-top: 0.5rem; }
.ag-project-card__tags { margin-top: auto; padding-top: 1rem; }
.ag-project-card__quote { margin: 1rem 0 0; padding: 1rem; border-left: 4px solid var(--ag-accent); border-radius: 0 0.75rem 0.75rem 0; font-style: italic; color: hsl(var(--muted-foreground)); background: hsl(var(--muted) / 0.5); }
.ag-project-card__quote footer { margin-top: 0.5rem; font-size: 0.875rem; font-style: normal; }

/* Earlier work led by the founder: a quiet text list under the project cards */
.ag-earlier { max-width: 56rem; margin: 0 auto; padding-top: 0.5rem; }
.ag-earlier__title { margin: 0 0 1rem; text-align: center; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: hsl(var(--muted-foreground)); }
.ag-earlier__list { margin: 0; padding: 0; list-style: none; border-top: 1px solid hsl(var(--border)); }
.ag-earlier__item { display: grid; grid-template-columns: 1fr; gap: 0.25rem; padding: 0.9rem 0.25rem; border-bottom: 1px solid hsl(var(--border)); }
@media (min-width: 700px) { .ag-earlier__item { grid-template-columns: 12rem 1fr; gap: 1.5rem; align-items: baseline; } }
.ag-earlier__name { font-weight: 600; color: var(--ag-emph); text-decoration: none; }
.ag-earlier__name:hover { text-decoration: underline; text-underline-offset: 0.18em; }
.ag-earlier__what { font-size: 0.95rem; line-height: 1.55; color: hsl(var(--muted-foreground)); }

/* Project year and role under the subtitle on Selected work cards */
.ag-project-meta { margin: 0.35rem 0 0; font-size: 0.85rem; line-height: 1.45; color: hsl(var(--muted-foreground)); }

/* One emphasis colour, one badge style, one sub-heading style */
.ag-emph { color: var(--ag-emph); }
.ag-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--ag-emph) 22%, transparent);
    background: color-mix(in srgb, var(--ag-emph) 8%, transparent);
    color: var(--ag-emph);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.2;
}
.ag-subhead {
    margin: 0 0 clamp(1.75rem, 3.5vw, 2.25rem);
    text-align: center;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: hsl(var(--foreground));
}

/* Form fields in the contact and newsletter forms: rounded to match buttons and cards */
#contact :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]), select, textarea),
#newsletter :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]), select, textarea) {
    border-radius: var(--ag-field-radius) !important;
    min-height: 3rem;
    padding-inline: 1rem;
}
#contact textarea { padding-block: 0.75rem; }

/* Header: transparent over the hero on the homepage, solid once scrolled */
.site-header { transition: background-color 0.3s, box-shadow 0.3s, border-color 0.3s; }
.site-header--overlay:not(.is-scrolled):not(:has(#mobile-menu:not(.hidden))) {
    background-color: transparent;
    border-color: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
.site-header--overlay:not(.is-scrolled):not(:has(#mobile-menu:not(.hidden))) .logo-img { filter: brightness(0) invert(1); }
.site-header--overlay:not(.is-scrolled):not(:has(#mobile-menu:not(.hidden))) nav a:not(.ag-btn),
.site-header--overlay:not(.is-scrolled):not(:has(#mobile-menu:not(.hidden))) button {
    color: var(--ag-white);
}

/* Hero: three slides, crossfade */
.ag-hero {
    position: relative;
    isolation: isolate;
    background: var(--ag-navy);
    color: var(--ag-white);
    overflow: hidden;
}
.ag-hero__slides { display: grid; min-height: 100vh; min-height: 100svh; }
.ag-slide {
    grid-area: 1 / 1;
    position: relative;
    display: flex;
    align-items: center;
    padding-block: 7rem 7rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.9s ease, visibility 0s linear 0.9s;
}
.ag-slide.is-active { opacity: 1; visibility: visible; transition: opacity 0.9s ease, visibility 0s; }
.ag-slide__media { position: absolute; inset: 0; z-index: 0; }
.ag-hero__img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.ag-slide--portrait .ag-hero__img { object-position: center 25%; }
.ag-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(24, 24, 63, 0.94) 0%, rgba(24, 24, 63, 0.78) 50%, rgba(24, 24, 63, 0.42) 100%),  /* text side stays dark, photo side lighter */
        linear-gradient(0deg, rgba(16, 16, 48, 0.9) 0%, rgba(16, 16, 48, 0) 40%);
}
.ag-slide .ag-container { position: relative; z-index: 2; }
.ag-hero__content { max-width: 46rem; }
/* Text fades in when the slider moves on; the first slide's text shows at once so it counts as the page's main content (LCP) */
.ag-slide:not(:first-child).is-active .ag-hero__content { animation: ag-rise 0.9s var(--ag-ease) both; }
.ag-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ag-accent);
}
.ag-hero__eyebrow::before { content: ""; width: 2.5rem; height: 2px; background: var(--ag-accent); }
.ag-hero__title {
    margin: 0 0 1.5rem;
    font-size: var(--ag-text-hero);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--ag-white);
    text-wrap: balance;
    min-height: calc(2em * 1.05);  /* two lines reserved on every slide */
}
.ag-hero__sub { max-width: 36rem; min-height: calc(2em * 1.6); margin: 0 0 2.5rem; font-size: clamp(1.05rem, 2vw, 1.3rem); line-height: 1.6; color: rgba(255, 255, 255, 0.82); text-wrap: pretty; }
.ag-hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* Slider controls: dots left, arrows right, aligned to the page container */
.ag-hero__controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 1.75rem;
    z-index: 5;
}
.ag-hero__controls-inner { display: flex; align-items: center; justify-content: space-between; }
.ag-dots { display: flex; gap: 0.25rem; }
.ag-dot { display: flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; padding: 0; background: none; border: 0; cursor: pointer; }
.ag-dot::before { content: ""; display: block; width: 1.5rem; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.35); transition: background-color 0.3s, width 0.3s; }
.ag-dot[aria-current="true"]::before { width: 2.5rem; background: var(--ag-accent); }
.ag-dot:focus-visible, .ag-arrow:focus-visible { outline: 3px solid var(--ag-accent); outline-offset: 2px; }
.ag-arrows { display: flex; gap: 0.75rem; }
.ag-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    background: transparent;
    color: var(--ag-white);
    cursor: pointer;
    transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.ag-arrow:hover { background: var(--ag-white); color: var(--ag-navy); border-color: var(--ag-white); }
.ag-arrow svg { width: 1.1rem; height: 1.1rem; }

@keyframes ag-rise { from { opacity: 0; } to { opacity: 1; } }

/* Stats row (slots with no value are not rendered) */
.ag-stats { background: var(--ag-navy-deep); color: var(--ag-white); border-top: 1px solid rgba(255, 255, 255, 0.08); }
.ag-stats__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem 1.5rem; padding-block: 3rem; }
.ag-stats__grid[data-count="3"] { grid-template-columns: repeat(3, 1fr); gap: 2rem 1rem; } /* three stats stay on one row, phones included */
.ag-stats__value { display: block; margin: 0; font-size: clamp(2.25rem, 5vw, 3.5rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--ag-accent); }
.ag-stats__label { display: block; margin-left: 0; margin-top: 0.6rem; font-size: 0.95rem; color: rgba(255, 255, 255, 0.72); }
.ag-stats__grid > div { text-align: center; padding-inline: 0.5rem; }
.ag-stats__grid[data-count="3"] > div + div { border-left: 1px solid rgba(255, 255, 255, 0.14); }
@media (min-width: 900px) {
    .ag-stats__grid[data-count="1"] { grid-template-columns: 1fr; }
    .ag-stats__grid[data-count="2"] { grid-template-columns: repeat(2, 1fr); }
    .ag-stats__grid[data-count="3"] { grid-template-columns: repeat(3, 1fr); }
    .ag-stats__grid[data-count="4"] { grid-template-columns: repeat(4, 1fr); }
    .ag-stats__grid[data-count="2"] > div + div,
    .ag-stats__grid[data-count="4"] > div + div { border-left: 1px solid rgba(255, 255, 255, 0.14); }
}

/* Work section intro */
.ag-section-head { max-width: 46rem; margin: 0 auto clamp(2rem, 4vw, 2.75rem); text-align: center; }
.ag-section-head__title { margin: 0 0 1rem; font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.ag-section-head__text { margin: 0; font-size: 1.1rem; line-height: 1.7; opacity: 0.78; }

/* About: same section rhythm as the agency sections, tighter gaps between its blocks */
.ag-about { padding-block: var(--ag-space-section); }
.ag-about .mb-16 { margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.ag-about .mb-12 { margin-bottom: clamp(1.75rem, 3.5vw, 2.25rem); }

/* Closing call to action band */
.ag-cta {
    padding-block: var(--ag-space-section);
    background: linear-gradient(135deg, var(--ag-navy-deep), var(--ag-navy));
    color: var(--ag-white);
    text-align: center;
}
.ag-cta__title { margin: 0 0 0.75rem; font-size: clamp(1.9rem, 4.5vw, 3.2rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; color: var(--ag-white); }
.ag-cta__text { margin: 0 0 2rem; font-size: 1.2rem; color: rgba(255, 255, 255, 0.8); }
.ag-cta__actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

/* ========================================
   Homepage dark canvas (html.ag-canvas): one continuous brand-navy background from hero to footer
   (option B, owner choice 14 Oct: softer than near-black), see-through cards, faint borders,
   white headings, soft grey text. Builds on the dark mode styles.
   ======================================== */
html.ag-canvas {
    --background: 236 45% 16%;         /* #16183a brand navy */
    --foreground: 0 0% 100%;
    --card: 236 33% 19%;               /* white at ~5% over the navy (solid equivalent for token uses) */
    --card-foreground: 0 0% 100%;
    --card-hover: 236 30% 22%;
    --muted: 236 33% 20%;
    --muted-foreground: 232 18% 76%;
    --secondary: 236 30% 22%;
    --secondary-foreground: 0 0% 96%;
    --border: 236 22% 27%;             /* white at ~12% over the navy */
    --input: 236 33% 20%;
    --gradient-card: hsl(236 45% 16%);
    --gradient-subtle: hsl(236 45% 16%);
    background-color: hsl(var(--background));
}
html.ag-canvas body { background-color: hsl(var(--background)); }
/* No alternating bands: every section sits on the same canvas */
html.ag-canvas :is(#portfolio, .ag-services, #about, #contact, #newsletter, footer, .ag-stats, .ag-cta) {
    background: transparent;
}
html.ag-canvas .ag-stats { border-block: 1px solid hsl(var(--border)); }
/* The hero fades into the canvas instead of ending in a hard edge */
html.ag-canvas .ag-hero__overlay {
    background:
        linear-gradient(90deg, rgba(22, 24, 58, 0.94) 0%, rgba(22, 24, 58, 0.74) 50%, rgba(22, 24, 58, 0.38) 100%),
        linear-gradient(0deg, #16183a 0%, rgba(22, 24, 58, 0) 35%);
}
html.ag-canvas .ag-hero { background: #16183a; }
/* Cards: one surface and one hairline everywhere */
html.ag-canvas :is(.card-professional, .ag-svc) {
    background: rgba(255, 255, 255, 0.05);     /* see-through cards */
    border-color: rgba(255, 255, 255, 0.10);
    box-shadow: none;
}
html.ag-canvas :is(.card-professional, .ag-svc):hover { border-color: rgba(255, 255, 255, 0.24); }
html.ag-canvas footer { border-top: 1px solid hsl(var(--border)); }

/* Scroll reveal (only active when JS has marked the page) */
.ag-js .ag-reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ag-ease), transform 0.7s var(--ag-ease); }
.ag-js .ag-reveal.is-visible { opacity: 1; transform: none; }

/* Floating WhatsApp button */
.ag-wa {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    box-shadow: var(--ag-shadow);
    transition: transform 0.25s var(--ag-ease);
}
.ag-wa:hover { transform: scale(1.08); color: #fff; }
.ag-wa:focus-visible { outline: 3px solid var(--ag-accent); outline-offset: 3px; }

@media (max-width: 640px) {
    .ag-slide { padding-block: 6.5rem 6rem; }
    .ag-hero__title { min-height: calc(3em * 1.05); }
    .ag-hero__sub { min-height: calc(4em * 1.6); }
    .ag-hero__overlay { background: linear-gradient(0deg, rgba(16, 16, 48, 0.92) 0%, rgba(24, 24, 63, 0.76) 100%); }
    .ag-hero__actions .ag-btn { width: 100%; }
    .ag-arrows { display: none; }
}
@media (max-width: 400px) {
    .ag-hero__title { min-height: calc(4em * 1.05); }  /* very narrow phones: the longest headline needs four lines */
    .ag-hero__eyebrow { letter-spacing: 0.1em; }       /* keep every eyebrow on one line */
    .ag-hero__eyebrow::before { display: none; }
}

/* Icon tile (explicit colours so it reads in light and dark mode) */
.ag-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    border-radius: 0.85rem;
    background: rgba(24, 24, 63, 0.08);
    color: #18183f;
}
.ag-icon svg { display: block; width: 1.5rem; height: 1.5rem; stroke: currentColor; fill: none; }
html.dark .ag-icon { background: rgba(255, 255, 255, 0.1); color: #fff; }

/* Small label above section headings */
.ag-eyebrow { margin: 0 0 0.9rem; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: hsl(var(--muted-foreground)); }

/* Services */
.ag-services { padding-block: var(--ag-space-section); background: hsl(var(--muted) / 0.35); }
.ag-svc-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 700px) { .ag-svc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .ag-svc-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.ag-svc {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    border: 1px solid hsl(var(--border));
    border-radius: 1.1rem;
    background: hsl(var(--card));
    overflow: hidden;
    transition: transform 0.35s var(--ag-ease), border-color 0.35s, box-shadow 0.35s;
}
.ag-svc::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 3px;
    background: var(--ag-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.45s var(--ag-ease);
}
.ag-svc:hover { transform: translateY(-4px); border-color: hsl(var(--primary) / 0.35); box-shadow: var(--ag-shadow); }
.ag-svc:hover::before { transform: scaleX(1); }
.ag-svc__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.ag-svc__num { font-size: 0.95rem; font-weight: 600; letter-spacing: 0.1em; color: hsl(var(--muted-foreground)); }
.ag-svc__title { margin: 0 0 0.5rem; font-size: 1.35rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.ag-svc__tag { margin: 0 0 1rem; font-weight: 500; color: hsl(var(--primary)); }
.ag-svc__desc { margin: 0 0 1.5rem; line-height: 1.65; color: hsl(var(--muted-foreground)); }
.ag-svc__list { display: grid; gap: 0.65rem; margin: auto 0 0; padding: 1.25rem 0 0; border-top: 1px solid hsl(var(--border)); list-style: none; }
.ag-svc__list li { display: flex; gap: 0.65rem; align-items: flex-start; font-size: 0.92rem; line-height: 1.45; color: hsl(var(--foreground)); }
.ag-svc__check { display: inline-flex; flex-shrink: 0; margin-top: 0.1rem; color: hsl(var(--primary)); }
.ag-svc__check svg { display: block; width: 1rem; height: 1rem; stroke: currentColor; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
html.dark .ag-svc__tag, html.dark .ag-svc__check { color: #8fb4ff; }

/* Stagger the reveal of grid cards */
.ag-js .ag-svc-grid .ag-reveal:nth-child(3n + 2) { transition-delay: 0.08s; }
.ag-js .ag-svc-grid .ag-reveal:nth-child(3n + 3) { transition-delay: 0.16s; }

/* No colour transitions while the page first loads or the theme is being switched */
.ag-no-transition, .ag-no-transition *, .ag-no-transition *::before, .ag-no-transition *::after { transition: none !important; }

/* "Visit Site" pill on portfolio previews: accent fill, navy text, same in light and dark */
.ag-visit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: 999px;
    background: var(--ag-accent);
    color: var(--ag-accent-ink);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    box-shadow: var(--ag-shadow);
    transition: background-color 0.25s, transform 0.25s var(--ag-ease);
}
.ag-visit svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.group:hover .ag-visit { transform: translateY(-1px); }
.ag-visit:hover { background: #ffc95c; }

@media (prefers-reduced-motion: reduce) {
    .ag-slide:not(:first-child).is-active .ag-hero__content { animation: none; }
    .ag-slide { transition: none; }
    .ag-btn, .ag-wa, .site-header, .ag-svc, .ag-svc::before { transition: none; }
    .ag-btn:hover, .ag-wa:hover, .ag-svc:hover { transform: none; }
    .ag-js .ag-reveal { opacity: 1; transform: none; transition: none; }
}

/* ------------------------------------------------------------------
 * Phase 4: inner pages (Work, Services, About, Contact)
 * ------------------------------------------------------------------ */
.ag-page { padding-bottom: var(--ag-space-section); }
.ag-narrow { max-width: 52rem; }
.ag-page-hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem); }
.ag-page-hero__title { margin: 0 0 1rem; font-size: clamp(2.25rem, 5.5vw, 3.75rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; color: hsl(var(--foreground)); max-width: 20ch; }
.ag-page-hero__text { margin: 0; max-width: 42rem; font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.6; color: hsl(var(--muted-foreground)); }
.ag-page-hero .ag-hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* Breadcrumbs */
.ag-crumbs { margin-bottom: 1.5rem; font-size: 0.875rem; }
.ag-crumbs ol { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; list-style: none; color: hsl(var(--muted-foreground)); }
.ag-crumbs li + li::before { content: "/"; margin-right: 0.4rem; opacity: 0.5; }
.ag-crumbs a { color: inherit; text-decoration: none; }
.ag-crumbs a:hover { color: hsl(var(--foreground)); text-decoration: underline; }
.ag-crumbs [aria-current] { color: hsl(var(--foreground)); }

/* Tags and small links */
.ag-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.ag-tags li { padding: 0.25rem 0.6rem; border: 1px solid hsl(var(--border)); border-radius: 999px; font-size: 0.75rem; color: hsl(var(--muted-foreground)); }
.ag-link-arrow { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 600; color: var(--ag-emph); text-decoration: none; }
.ag-link-arrow svg { width: 1rem; height: 1rem; transition: transform 0.25s var(--ag-ease); }
.ag-link-arrow:hover svg { transform: translateX(3px); }
.ag-section-more { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin: 2.5rem 0 0; text-align: center; }

/* Work: featured project */
.ag-work-feature { display: grid; gap: 1.75rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
@media (min-width: 960px) { .ag-work-feature { grid-template-columns: 1.45fr 1fr; align-items: center; gap: 3rem; } }
.ag-work-feature__media { display: block; border-radius: 1.1rem; overflow: hidden; border: 1px solid hsl(var(--border)); box-shadow: var(--ag-shadow); }
.ag-work-feature__media img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 0.6s var(--ag-ease); }
.ag-work-feature__media:hover img { transform: scale(1.02); }
.ag-work-feature__body { display: grid; gap: 0.85rem; justify-items: start; }
.ag-work-feature__title { margin: 0; font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.ag-work-feature__text { margin: 0; line-height: 1.65; color: hsl(var(--muted-foreground)); }

/* Work: filter chips */
.ag-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.75rem; }
.ag-chip { padding: 0.45rem 0.95rem; border: 1px solid hsl(var(--border)); border-radius: 999px; background: transparent; color: hsl(var(--muted-foreground)); font-size: 0.875rem; font-weight: 500; cursor: pointer; transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.ag-chip:hover { border-color: hsl(var(--foreground) / 0.4); color: hsl(var(--foreground)); }
.ag-chip[aria-pressed="true"] { background: hsl(var(--foreground)); border-color: hsl(var(--foreground)); color: hsl(var(--background)); }
.ag-chip:focus-visible { outline: 3px solid var(--ag-accent); outline-offset: 2px; }

/* Work: card grid */
.ag-work-grid { display: grid; gap: 1.75rem; }
@media (min-width: 760px) { .ag-work-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; } }
.ag-work-card[hidden] { display: none; }
.ag-work-card__link { display: flex; flex-direction: column; height: 100%; border: 1px solid hsl(var(--border)); border-radius: 1.1rem; overflow: hidden; background: hsl(var(--card)); color: inherit; text-decoration: none; transition: transform 0.35s var(--ag-ease), box-shadow 0.35s, border-color 0.35s; }
.ag-work-card__link:hover { transform: translateY(-4px); box-shadow: var(--ag-shadow); border-color: hsl(var(--primary) / 0.35); }
.ag-work-card__link:focus-visible { outline: 3px solid var(--ag-accent); outline-offset: 3px; }
.ag-work-card__media { aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid hsl(var(--border)); background: hsl(var(--muted)); }
.ag-work-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ag-ease); }
.ag-work-card__link:hover .ag-work-card__media img { transform: scale(1.03); }
.ag-work-card__body { display: flex; flex-direction: column; gap: 0.6rem; flex: 1; padding: 1.5rem; }
.ag-work-card__origin { margin: 0; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: hsl(var(--muted-foreground)); }
.ag-work-card__title { margin: 0; font-size: 1.4rem; font-weight: 700; letter-spacing: -0.01em; color: hsl(var(--foreground)); }
.ag-work-card__tagline { margin: 0; font-weight: 500; color: var(--ag-emph); }
.ag-work-card__body .ag-tags { margin-top: 0.25rem; }
.ag-work-card__cta { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: auto; padding-top: 0.75rem; font-weight: 600; color: var(--ag-emph); }
.ag-work-card__cta svg { width: 1rem; height: 1rem; transition: transform 0.25s var(--ag-ease); }
.ag-work-card__link:hover .ag-work-card__cta svg { transform: translateX(3px); }

/* Case study */
.ag-case__cover { margin: 0 0 clamp(2rem, 5vw, 3.5rem); border-radius: 1.1rem; overflow: hidden; border: 1px solid hsl(var(--border)); box-shadow: var(--ag-shadow); }
.ag-case__cover img { display: block; width: 100%; height: auto; }
.ag-case { display: grid; gap: 2rem; }
@media (min-width: 900px) { .ag-case { grid-template-columns: 18rem 1fr; gap: 4rem; align-items: start; } .ag-case__facts { position: sticky; top: 100px; } }
.ag-case__facts { padding: 1.5rem; border: 1px solid hsl(var(--border)); border-radius: 1.1rem; background: hsl(var(--card)); }
.ag-case__facts dl { display: grid; gap: 0.35rem; margin: 0 0 1.5rem; }
.ag-case__facts dt { margin-top: 0.75rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: hsl(var(--muted-foreground)); }
.ag-case__facts dt:first-child { margin-top: 0; }
.ag-case__facts dd { margin: 0; line-height: 1.5; color: hsl(var(--foreground)); }
.ag-case__section { margin-bottom: 2.5rem; }
.ag-case__section h2 { margin: 0 0 0.85rem; font-size: clamp(1.4rem, 2.5vw, 1.75rem); font-weight: 700; letter-spacing: -0.02em; color: hsl(var(--foreground)); }
.ag-case__section p { margin: 0; font-size: 1.075rem; line-height: 1.75; color: hsl(var(--muted-foreground)); }
.ag-case__outcome { padding: 1.5rem; border-left: 3px solid var(--ag-accent); border-radius: 0 0.75rem 0.75rem 0; background: hsl(var(--muted) / 0.45); }
.ag-case__content { margin-bottom: 2.5rem; }
.ag-gallery { margin-top: clamp(3rem, 6vw, 4.5rem); }
.ag-gallery__grid { display: grid; gap: 1.5rem; }
.ag-gallery__grid figure { margin: 0; border-radius: 1rem; overflow: hidden; border: 1px solid hsl(var(--border)); }
.ag-gallery__grid img { display: block; width: 100%; height: auto; }
.ag-gallery__grid .ag-gallery__full { width: 100%; max-width: 60rem; max-height: 80vh; margin-inline: auto; overflow-y: auto; }
.ag-related { margin-top: clamp(3rem, 6vw, 4.5rem); }
.ag-related__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.ag-related__head .ag-subhead { margin: 0; text-align: left; }

/* Service page */
.ag-steps { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 700px) { .ag-steps { grid-template-columns: repeat(3, 1fr); } }
.ag-steps li { padding: 1.5rem; border: 1px solid hsl(var(--border)); border-radius: 1rem; background: hsl(var(--card)); }
.ag-steps__num { display: block; margin-bottom: 0.75rem; font-weight: 600; letter-spacing: 0.1em; color: hsl(var(--muted-foreground)); }
.ag-steps h3 { margin: 0 0 0.4rem; font-size: 1.1rem; font-weight: 700; }
.ag-steps p { margin: 0; font-size: 0.95rem !important; line-height: 1.6; }
.ag-price__values { display: flex; flex-wrap: wrap; gap: 1.5rem; font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; color: hsl(var(--foreground)) !important; }
.ag-price__note { margin-top: 0.5rem !important; font-size: 0.9rem !important; }
.ag-faq details { border-bottom: 1px solid hsl(var(--border)); }
.ag-faq summary { display: flex; justify-content: space-between; gap: 1rem; padding: 1.1rem 0; font-weight: 600; font-size: 1.05rem; color: hsl(var(--foreground)); cursor: pointer; list-style: none; }
.ag-faq summary::-webkit-details-marker { display: none; }
.ag-faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: hsl(var(--muted-foreground)); transition: transform 0.25s var(--ag-ease); }
.ag-faq details[open] summary::after { transform: rotate(45deg); }
.ag-faq details p { padding-bottom: 1.1rem; }
.ag-svc__title a { color: inherit; text-decoration: none; }
.ag-svc__title a:hover { text-decoration: underline; }
.ag-svc .ag-link-arrow { margin-top: 1.25rem; }

/* 404 */
.ag-404__search { display: flex; gap: 0.5rem; max-width: 32rem; margin-top: 1.75rem; }
.ag-404__search input { flex: 1; min-width: 0; padding: 0.7rem 1rem; border: 1px solid hsl(var(--border)); border-radius: var(--ag-field-radius); background: hsl(var(--background)); color: hsl(var(--foreground)); font-size: 1rem; }
.ag-404__search input:focus { outline: 3px solid var(--ag-accent); outline-offset: 1px; }
.ag-404__links { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 700px) { .ag-404__links { grid-template-columns: repeat(2, 1fr); } }
.ag-404__links a { display: grid; gap: 0.35rem; height: 100%; padding: 1.5rem; border: 1px solid hsl(var(--border)); border-radius: 1rem; background: hsl(var(--card)); color: inherit; text-decoration: none; transition: transform 0.3s var(--ag-ease), border-color 0.3s; }
.ag-404__links a:hover { transform: translateY(-3px); border-color: hsl(var(--primary) / 0.35); }
.ag-404__label { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 1.2rem; font-weight: 700; color: hsl(var(--foreground)); }
.ag-404__label svg { width: 1rem; height: 1rem; }
.ag-404__desc { color: hsl(var(--muted-foreground)); }

/* Share buttons (AddToAny) on projects and services */
.ag-share { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 1.5rem; }
.ag-share__label { margin: 0; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: hsl(var(--muted-foreground)); }
.ag-case__facts .ag-share { padding-top: 1.25rem; border-top: 1px solid hsl(var(--border)); }

/* Service cards: the whole card opens the service page once it is published */
.ag-svc--link { cursor: pointer; }
.ag-svc--link .ag-svc__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.ag-svc--link .ag-svc__title a:focus-visible { outline: none; }
.ag-svc--link:focus-within { outline: 3px solid var(--ag-accent); outline-offset: 3px; }
.ag-svc--link:hover .ag-svc__title { color: var(--ag-emph); }
.ag-svc--link .ag-link-arrow { position: relative; z-index: 2; }
