/* Additions theme.json can't express. Brand: ink #0e1a24, green #10d18b, pink #dd4a80. */

:root { --als-radius: 18px; --als-ease: cubic-bezier(.2, .7, .2, 1); }
body { -webkit-font-smoothing: antialiased; }
h1, h2, h3, .als-display { font-stretch: 112%; }
::selection { background: var(--wp--preset--color--pink); color: #fff; }
.skip-link:focus { background: var(--wp--preset--color--base); padding: .5rem; }
:focus-visible { outline: 3px solid var(--wp--preset--color--pink); outline-offset: 3px; }

/* ---------- Header ---------- */
/* WordPress wraps the header part in a div, so sticky has to go on that wrapper: on .als-header alone it never sticks. */
.wp-block-template-part:has(> .als-header) { position: sticky; top: 0; z-index: 50; }
.admin-bar .wp-block-template-part:has(> .als-header) { top: var(--wp-admin--admin-bar--height, 32px); }
html { scroll-padding-top: 5.5rem; } /* in-page anchors land below the sticky header */
.als-header .wp-block-navigation a { color: #fff; text-decoration: none; }
.als-header .wp-block-navigation a:hover { color: var(--wp--preset--color--green); }
.als-header .als-phone a { color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem; }
.als-logo img { display: block; width: 190px; height: auto; }
.wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--ink) !important; color: #fff !important; }
@media (max-width: 781px) { .als-header .als-phone { display: none; } .als-logo img { width: 150px; } }

/* ---------- Dark sections ---------- */
.has-ink-background-color { color: #fff; }
.has-ink-background-color a:not(.wp-element-button) { color: var(--wp--preset--color--green); }
.has-ink-background-color a:not(.wp-element-button):hover { color: var(--wp--preset--color--pink); }
.has-ink-background-color .is-style-outline .wp-element-button { color: #fff; border-color: rgba(255,255,255,.5); background: transparent; }
.has-ink-background-color .is-style-outline .wp-element-button:hover { border-color: var(--wp--preset--color--pink); background: var(--wp--preset--color--pink); color: var(--wp--preset--color--ink); }
.is-style-outline .wp-element-button { border: 2px solid currentColor; }

/* Kicker / eyebrow */
.als-eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; color: var(--wp--preset--color--green-dark); margin-bottom: .75rem !important; }
.has-ink-background-color .als-eyebrow { color: var(--wp--preset--color--green); }
.als-eyebrow a { color: inherit; text-decoration: none; }

/* Highlighted word in headings: <mark class="als-hl"> */
.als-hl, mark.als-hl { background: none; color: var(--wp--preset--color--pink); }
.als-hl-green { color: var(--wp--preset--color--green-dark); background: none; }

/* ---------- Hero ---------- */
.als-hero { position: relative; overflow: hidden; }
.als-hero h1 { font-size: var(--wp--preset--font-size--display); line-height: .98; letter-spacing: -0.035em; max-width: 14ch; }
.als-hero .als-lead { font-size: var(--wp--preset--font-size--large); color: #c9d3d8; max-width: 40rem; }
.als-hero > * { position: relative; z-index: 1; }
.als-hero::after {
  /* Triple-line ribbons from the logo's inline strokes; they draw in on load, then a light runs along them. Decorative only. */
  content: ""; position: absolute; inset: 0 0 0 auto; width: min(68rem, 85%); z-index: 0;
  background: url(hero-lines.svg) right center / cover no-repeat;
  -webkit-mask-image: linear-gradient(to right, transparent 5%, #000 60%); mask-image: linear-gradient(to right, transparent 5%, #000 60%); opacity: .8;
  pointer-events: none; animation: als-drift 18s ease-in-out infinite alternate;
}
.als-hero::before {
  content: ""; position: absolute; right: -10rem; top: -12rem; width: 36rem; height: 36rem; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle, rgba(16,209,139,.16), transparent 65%); pointer-events: none;
  animation: als-glow 9s ease-in-out infinite alternate;
}
@keyframes als-drift { to { transform: translate3d(-2rem, 1rem, 0); } }
@keyframes als-glow { to { transform: translate3d(-8rem, 6rem, 0) scale(1.15); opacity: .7; } }
@media (max-width: 782px) { .als-hero::after { width: 100%; opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .als-hero::after, .als-hero::before { animation: none; } }
.als-page-hero h1 { max-width: 20ch; }
@media (max-width: 600px) { .als-page-hero h1 { font-size: clamp(2rem, 9vw, 2.6rem); hyphens: auto; } .als-hero:not(.als-page-hero) h1 { font-size: 10vw; } }
.als-page-hero .wp-block-post-excerpt__excerpt, .als-page-hero .als-lead { color: #c9d3d8; font-size: var(--wp--preset--font-size--large); max-width: 44rem; }

/* ---------- Client marquee ---------- */
.als-marquee { overflow: hidden; border-top: 1px solid rgba(255,255,255,.12); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.als-marquee__track { display: flex; gap: 3.5rem; width: max-content; padding: 1.4rem 0; animation: als-marquee 40s linear infinite; }
.als-marquee__track span { font-family: var(--wp--preset--font-family--display); font-stretch: 112%; font-weight: 700; font-size: 1.15rem; color: rgba(255,255,255,.55); white-space: nowrap; }
.als-marquee__track span::before { content: "✦"; color: var(--wp--preset--color--green); margin-right: 3.5rem; font-size: .8em; }
@keyframes als-marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .als-marquee__track { animation: none; flex-wrap: wrap; width: auto; } }

/* ---------- Numbered services list ---------- */
.als-services { counter-reset: als-svc; border-top: 1px solid var(--wp--preset--color--line); margin-top: 2rem; }
.als-service { display: grid; grid-template-columns: 4rem 1fr auto; gap: 1rem 2rem; align-items: center; padding: 1.75rem 0; border-bottom: 1px solid var(--wp--preset--color--line); text-decoration: none; color: inherit; transition: padding .3s var(--als-ease); }
.als-service::before { counter-increment: als-svc; content: "0" counter(als-svc); font-family: var(--wp--preset--font-family--display); font-weight: 700; color: var(--wp--preset--color--pink); font-size: 1rem; }
.als-service h3 { margin: 0; font-size: clamp(1.4rem, 3vw, 2.2rem); }
.als-service p { margin: .35rem 0 0; color: var(--wp--preset--color--ink-soft); max-width: 40rem; }
.als-service__arrow { width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--wp--preset--color--line); font-size: 1.25rem; transition: all .3s var(--als-ease); }
.als-service:hover { padding-left: .75rem; }
.als-service:hover h3 { color: var(--wp--preset--color--green-dark); }
.als-service:hover .als-service__arrow { background: var(--wp--preset--color--green); border-color: var(--wp--preset--color--green); transform: rotate(-45deg); }
.als-layer { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; color: var(--wp--preset--color--ink-soft); }
@media (max-width: 600px) { .als-service { grid-template-columns: 2.5rem 1fr; } .als-service__arrow { display: none; } }

/* ---------- Proof / stats ---------- */
.als-stats { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.als-stat strong { display: block; font-family: var(--wp--preset--font-family--display); font-stretch: 112%; font-weight: 800; font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1; letter-spacing: -0.03em; color: var(--wp--preset--color--green); }
.als-stat span { display: block; margin-top: .6rem; color: #c9d3d8; max-width: 22rem; }

/* ---------- Cards ---------- */
.is-style-card, .als-grid > .is-style-card { background: var(--wp--preset--color--panel); border-radius: var(--als-radius); padding: 1.75rem; }
.is-style-card > :first-child { margin-top: 0; }
.als-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.als-grid > * { margin: 0 !important; }
.wp-block-post-template.is-layout-grid > li {
  background: var(--wp--preset--color--panel); border-radius: var(--als-radius); padding: 1.75rem; position: relative;
  transition: transform .3s var(--als-ease), box-shadow .3s var(--als-ease); border-top: 4px solid var(--wp--preset--color--green);
}
.wp-block-post-template.is-layout-grid > li:nth-child(3n+2) { border-top-color: var(--wp--preset--color--pink); }
.wp-block-post-template.is-layout-grid > li:nth-child(3n) { border-top-color: var(--wp--preset--color--ink); }
.wp-block-post-template.is-layout-grid > li:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -20px rgba(14,26,36,.35); }
.wp-block-post-template a { text-decoration: none; color: var(--wp--preset--color--ink); }
.wp-block-post-template .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.wp-block-post-template .wp-block-post-excerpt { color: var(--wp--preset--color--ink-soft); }
@media (max-width: 600px) { .wp-block-post-template.is-layout-grid { grid-template-columns: 1fr !important; } }

/* Case study headline stats and images */
.als-case-video { margin: 0 0 2.5rem; }
.als-case-video video { display: block; width: 100%; aspect-ratio: 16/9; border-radius: var(--als-radius); box-shadow: 0 20px 50px -20px rgba(0,0,0,.35); background: #0d1b2a; }
.als-case-stats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); margin: 0 0 2.5rem; }
.als-case-stat { background: var(--wp--preset--color--panel); border-radius: var(--als-radius); border-top: 4px solid var(--wp--preset--color--green); padding: 1.5rem; }
.als-case-stat:nth-child(2) { border-top-color: var(--wp--preset--color--pink); }
.als-case-stat:nth-child(3) { border-top-color: var(--wp--preset--color--ink); }
.als-case-stat strong { display: block; font-family: var(--wp--preset--font-family--display); font-stretch: 112%; font-weight: 800; font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1; letter-spacing: -0.03em; color: var(--wp--preset--color--green-dark); }
.als-case-stat span { display: block; margin-top: .6rem; color: var(--wp--preset--color--ink-soft); font-size: .95rem; line-height: 1.4; }
.als-case-image { margin: 2.5rem 0; }
.als-case-image figcaption { margin-top: .75rem; color: var(--wp--preset--color--ink-soft); font-size: .9rem; }
.als-case-gallery { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); margin: 2.5rem 0; }
.als-case-gallery .als-case-image { margin: 0; }
.als-case-image img { width: 100%; height: auto; border-radius: var(--als-radius); box-shadow: 0 24px 60px -30px rgba(14,26,36,.45); }
.wp-block-post-template .wp-block-post-featured-image { margin: -1.75rem -1.75rem 1.5rem; }
.wp-block-post-template .wp-block-post-featured-image img { border-radius: var(--als-radius) var(--als-radius) 0 0; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; width: 100%; }

/* ---------- Quotes ---------- */
/* In site.css rather than theme.json: WordPress only prints block styles when the block is on the page, and the case study quote is printed by the plugin. */
.wp-block-quote { border-left: 4px solid var(--wp--preset--color--pink); padding: 0 0 0 1.5rem; margin-left: 0; margin-right: 0; font-family: var(--wp--preset--font-family--display); font-size: 1.5rem; font-weight: 600; line-height: 1.3; }
.wp-block-quote cite { display: block; margin-top: 1rem; font-family: var(--wp--preset--font-family--body); font-size: .95rem; font-weight: 500; font-style: normal; color: var(--wp--preset--color--ink-soft); }
.has-ink-background-color .wp-block-quote cite { color: #c9d3d8; }

/* ---------- Content details ---------- */
.wp-block-details { border-bottom: 1px solid var(--wp--preset--color--line); padding: 1.1rem 0; }
.wp-block-details summary { font-weight: 700; cursor: pointer; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.wp-block-details summary::after { content: "+"; color: var(--wp--preset--color--pink); font-size: 1.5rem; line-height: 1; }
.wp-block-details[open] summary::after { content: "–"; }
.wp-block-details summary::-webkit-details-marker { display: none; }
ul.wp-block-list:not(.is-style-none) li::marker { color: var(--wp--preset--color--green); }
.als-facts, .wp-block-table table { border-collapse: collapse; width: 100%; }
.als-facts th, .als-facts td, .wp-block-table td, .wp-block-table th { text-align: left; padding: .75rem .5rem; border: 0; border-bottom: 1px solid var(--wp--preset--color--line); vertical-align: top; }
.is-style-none { list-style: none; padding-left: 0; }
.is-style-none li { margin: .35rem 0; }

/* ---------- Forms ---------- */
.als-form { display: grid; gap: .35rem; max-width: 38rem; }
.als-form label { display: grid; gap: .35rem; font-weight: 600; font-size: .95rem; }
.als-form input, .als-form select, .als-form textarea { font: inherit; padding: .8rem .9rem; border: 1.5px solid var(--wp--preset--color--line); border-radius: 10px; background: #fff; }
.als-form input:focus, .als-form select:focus, .als-form textarea:focus { border-color: var(--wp--preset--color--green); outline: none; box-shadow: 0 0 0 3px rgba(16,209,139,.3); }
.als-form button { cursor: pointer; border: 0; justify-self: start; }
.als-form-note { font-size: .85rem; color: var(--wp--preset--color--ink-soft); }
.als-hp { position: absolute; left: -9999px; }

/* ---------- CTA band + footer ---------- */
.als-cta h2 { font-size: var(--wp--preset--font-size--xx-large); max-width: 18ch; }
.als-cta .wp-element-button { background: var(--wp--preset--color--ink); color: #fff; }
.als-cta .wp-element-button:hover { background: #fff; color: var(--wp--preset--color--ink); }
.als-footer.has-ink-background-color a:not(.wp-element-button), .als-footer a { color: #fff; text-decoration: none; }
.als-footer.has-ink-background-color a:not(.wp-element-button):hover, .als-footer a:hover { color: var(--wp--preset--color--green); }
.als-footer .als-contact { color: #c9d3d8; }
.als-footer .als-contact strong { color: #fff; }

/* Blog */
.als-post-grid .wp-block-post-terms { position: relative; z-index: 1; margin-bottom: .5rem !important; }
.als-post-meta { font-size: .9rem; color: var(--wp--preset--color--ink-soft); }
.als-page-hero .als-post-meta { color: #c9d3d8; gap: .4rem 1.25rem; margin-top: 1.5rem; }
.als-page-hero .als-post-meta p { margin: 0; }
.als-author-box { max-width: 52rem; margin-left: 0 !important; margin-top: 4rem !important; padding: 1.75rem; border-left: 4px solid var(--wp--preset--color--green); background: var(--wp--preset--color--panel); border-radius: var(--als-radius); }
.als-author-box > * { margin-left: 0 !important; }
.als-author-box p:last-child { margin-bottom: 0; }
.als-founder-photo { display: block; border-radius: 50%; object-fit: cover; flex: none; }
.als-author-box { gap: 1.25rem !important; }
.als-speak-to { display: flex; align-items: center; gap: 1rem; margin: 2rem 0 1.5rem; }
.als-speak-to p { margin: 0; font-weight: 600; }

/* Breathing room inside page content: sub-headings and list items. */
.entry-content h3, .wp-block-post-content h3 { margin-top: 2.25rem; }
.wp-block-post-content li + li { margin-top: .4rem; }
/* Section spacing lives here, not only in theme.json: newer WordPress versions let the layout's block gap
   override element margins from theme.json, which collapsed the gap above headings. */
.wp-block-post-content h2:not(:first-child) { margin-top: clamp(3.5rem, 6vw, 5.5rem); margin-bottom: 1.5rem; }
/* The same section gap for whatever a template places after the page content (e.g. the service-page enquiry form). */
.wp-block-post-content + * { margin-top: clamp(3.5rem, 6vw, 5.5rem) !important; }

/* ---------- Light and dark mode ----------
   <html data-theme> is set in the head (functions.php). Light: white header with the ink logo. Dark: ink header
   with the white logo, and the page body turns dark. Hero, footer and other ink sections are dark in both. */
.als-logo__dark { display: none !important; }
[data-theme="dark"] .als-logo__light { display: none !important; }
[data-theme="dark"] .als-logo__dark { display: block !important; }

.als-theme-toggle { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0; border: 1.5px solid currentColor; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; opacity: .8; transition: opacity .2s, color .2s; }
.als-theme-toggle:hover { opacity: 1; color: var(--wp--preset--color--pink); }
.als-theme-toggle .als-icon-sun, [data-theme="dark"] .als-theme-toggle .als-icon-moon { display: none; }
[data-theme="dark"] .als-theme-toggle .als-icon-sun { display: block; }

html:not([data-theme="dark"]) .als-header { background-color: var(--wp--preset--color--base) !important; color: var(--wp--preset--color--ink) !important; border-bottom-color: var(--wp--preset--color--line) !important; }
html:not([data-theme="dark"]) .als-header .wp-block-navigation a,
html:not([data-theme="dark"]) .als-header .als-phone a { color: var(--wp--preset--color--ink); }
html:not([data-theme="dark"]) .als-header .wp-block-navigation a:hover { color: var(--wp--preset--color--green-dark); }
html:not([data-theme="dark"]) .als-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--base) !important; color: var(--wp--preset--color--ink) !important; }

[data-theme="dark"] {
	color-scheme: dark;
	--wp--preset--color--panel: #16252f;
	--wp--preset--color--line: #2a3a44;
	--wp--preset--color--ink-soft: #a9b6bd;
	--wp--preset--color--green-dark: #10d18b; /* the darker green is only there for contrast on white */
}
[data-theme="dark"] body { background-color: #08121a; color: #e6ecef; }
[data-theme="dark"] .als-header { border-bottom-color: #ffffff1a !important; }
[data-theme="dark"] .wp-block-post-template a { color: #e6ecef; }
[data-theme="dark"] .wp-block-post-template.is-layout-grid > li:nth-child(3n),
[data-theme="dark"] .als-case-stat:nth-child(3) { border-top-color: #e6ecef; }
[data-theme="dark"] .wp-block-post-template.is-layout-grid > li:hover { box-shadow: 0 18px 40px -20px rgba(0,0,0,.8); }
[data-theme="dark"] .als-form input, [data-theme="dark"] .als-form select, [data-theme="dark"] .als-form textarea { background: var(--wp--preset--color--ink); color: #e6ecef; }
[data-theme="dark"] .skip-link:focus { background: var(--wp--preset--color--ink); }
/* Ink sections sit a shade lighter than the dark page so they still read as bands. */
[data-theme="dark"] main .has-ink-background-color:not(.als-hero) { background-color: var(--wp--preset--color--ink-2) !important; }
.als-header .wp-element-button { white-space: nowrap; }
@media (max-width: 781px) { .als-theme-toggle { width: 2.25rem; height: 2.25rem; } .als-header .alignwide > .wp-block-group { gap: .75rem; } }
@media (max-width: 420px) { .als-logo img { width: 120px; } .als-header .wp-element-button { padding: .5rem .9rem !important; font-size: .9rem; } .als-header .alignwide { gap: .5rem; } .als-header .alignwide > .wp-block-group { gap: .5rem; } }

/* "Websites" dropdown in the header. Opens on click/tap (openSubmenusOnClick), so it works the same on touch screens. */
.als-header .wp-block-navigation-submenu__toggle { color: inherit; font: inherit; }
.als-header .wp-block-navigation__submenu-container {
	background: var(--wp--preset--color--ink-2) !important; border: 1px solid #ffffff1f !important; border-radius: 12px;
	padding: .5rem !important; min-width: 13rem !important; box-shadow: 0 18px 40px -18px rgba(0,0,0,.5); margin-top: .5rem;
}
.als-header .wp-block-navigation__submenu-container a { padding: .55rem .75rem !important; border-radius: 8px; }
.als-header .wp-block-navigation__submenu-container a:hover { background: #ffffff12; }
html:not([data-theme="dark"]) .als-header .wp-block-navigation__submenu-container { background: var(--wp--preset--color--base) !important; border-color: var(--wp--preset--color--line) !important; box-shadow: 0 18px 40px -18px rgba(14,26,36,.3); }
html:not([data-theme="dark"]) .als-header .wp-block-navigation__submenu-container a:hover { background: var(--wp--preset--color--panel); }
/* In the mobile overlay the submenu shows inline, so drop the panel styling there. */
html .als-header .is-menu-open .wp-block-navigation__submenu-container { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 0 0 1rem !important; margin: 0; }
