/* hecticsoftware.com, new brand. Every value is a design token from tokens.css.
   tools/test.mjs fails if a raw colour, size or duration is written here.
   Components followed: Wordmark, PlatformStrip, StatusMeter, ProductTile, BundleBlock, StateBlock. */

* { box-sizing: border-box; }
/* Phones: keep text the size it was set, in both orientations (iOS and Android browsers). */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: var(--bar-nav-mobile); }
body { margin: var(--space-0); background: var(--ground-base); color: var(--ink-body); }
a { color: var(--ink-link); }
:focus-visible { outline: var(--border-focus) solid var(--focus-ring); outline-offset: var(--space-2); }
h1, h2, h3, p, ul { margin: var(--space-0); }
ul { padding: var(--space-0); list-style: none; }
/* The side gutters never go under a notch or a rounded screen corner. */
.wrap { max-width: var(--content-max); margin-inline: auto; padding-inline: max(var(--gutter-desktop), env(safe-area-inset-left)) max(var(--gutter-desktop), env(safe-area-inset-right)); }
footer { padding-bottom: max(var(--space-64), env(safe-area-inset-bottom)); }
img { max-width: 100%; height: auto; }
.placeholder { color: var(--ink-faint); }
/* A hidden thing stays hidden even where a rule gives its box a display. */
[hidden] { display: none !important; }
/* The largest display sizes never ship on a phone (platform rules). The type styles are classes, not
   variables, so the page carries both sizes and shows one. The hidden one is out of the accessibility tree. */
.on-phone.on-phone { display: none; }

/* Arabic is set in its own typeface, ahead of the same fallbacks. Archivo has no Arabic letters. */
:lang(ar) { --font-display: "Noto Sans Arabic", "Archivo", "Helvetica Neue", Arial, sans-serif; --font-sans: "Noto Sans Arabic", "Archivo", "Helvetica Neue", Arial, sans-serif; --font-narrow: "Noto Sans Arabic", "Archivo", Arial, sans-serif; }
/* Display type takes the widest cut of Archivo. */
.display-xl, .display-lg, .display-md, .display-sm, .wordmark { font-stretch: var(--wdth-display); text-wrap: balance; }
.narrow { font-family: var(--font-narrow); font-stretch: var(--wdth-narrow); }

/* Skip link: off screen until it has focus. */
.skip { position: absolute; inset-inline-start: var(--space-8); top: var(--space-8); z-index: var(--z-tooltip); padding: var(--space-8) var(--space-12); background: var(--ground-overlay); color: var(--ink-strong); transform: translateY(-200%); }
.skip { display: inline-flex; align-items: center; min-height: var(--touch-min); }
.skip:focus { transform: none; }
/* Every stand-alone link is a full-size tap target on a phone or tablet. Links inside a sentence stay inline. */
.home, main a.label, .drop a, .strip a, .meter .proof a { display: inline-flex; align-items: center; min-height: var(--touch-min); }
.home { text-decoration: none; }

/* Nav bar: ground-raised with a hairline, no blur. */
.nav { background: var(--ground-raised); box-shadow: var(--elev-bar); position: sticky; top: var(--space-0); z-index: var(--z-nav); }
.nav > .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-24); min-height: var(--bar-nav-mobile); }
.nav ul { display: flex; align-items: center; gap: var(--space-24); }
.nav a:not(.button):not(.home), .nav summary { color: var(--ink-body); text-decoration: none; display: inline-flex; align-items: center; min-height: var(--touch-min); cursor: pointer; }
.nav a:not(.button):not(.home):hover, .nav summary:hover { color: var(--ink-strong); text-decoration: underline; }
.nav .phone { display: none; }

/* Menus that open without script: the account menu, and the whole menu on a phone. */
.drop { position: relative; }
.drop > summary { list-style: none; }
.drop > summary::-webkit-details-marker { display: none; }
.drop > summary::after { content: ""; margin-inline-start: var(--space-8); border: var(--space-4) solid transparent; border-top-color: currentColor; border-bottom-width: var(--space-0); }
.drop > ul, .drop > nav { position: absolute; inset-inline-end: var(--space-0); top: 100%; z-index: var(--z-sheet); min-width: var(--sidebar-width); padding: var(--space-12) var(--space-16); background: var(--ground-overlay); border-radius: var(--radius-12); box-shadow: var(--elev-menu); }
.drop ul { display: block; }
.drop li.caption { padding-top: var(--space-8); max-width: var(--sidebar-width); }

/* Button, as a link: primary by default, quiet as the alternative. Never white on orange. */
.button { display: inline-flex; align-items: center; min-height: var(--touch-min); padding: var(--space-0) var(--space-20); border-radius: var(--radius-8); background: var(--brand-orange); color: var(--ink-on-brand); text-decoration: none; border: var(--border-strong) solid var(--brand-orange); }
@media (hover: hover) { .button:hover { background: var(--brand-orange-hover); border-color: var(--brand-orange-hover); } }
.button.quiet { background: transparent; color: var(--ink-body); border-color: var(--line-strong); }
@media (hover: hover) { .button.quiet:hover { background: var(--surface-card-hover); border-color: var(--line-strong); } }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-16); margin-top: var(--space-32); }
.eyebrow { color: var(--brand-orange-ink); margin-bottom: var(--space-8); }

/* Wordmark: HECTIC in orange, the descriptor in ink, a rule in the accent at the name's width. */
.wordmark { display: inline-block; font-family: var(--font-display); color: var(--ink-strong); text-decoration: none; border-bottom: var(--border-focus) solid var(--accent, var(--line-brand)); }
.wordmark .hectic { color: var(--brand-orange-mark); }
.wordmark.sm { border-bottom-width: var(--border-strong); }

/* Hero */
.hero { padding-block: var(--space-96) var(--space-64); }
.hero h1 { color: var(--ink-strong); max-width: var(--content-max); }
.hero p { margin-top: var(--space-24); max-width: var(--measure-text); color: var(--ink-body); }
.hero .strip { margin-top: var(--space-64); }
.strip-note { margin-top: var(--space-8); }

/* PlatformStrip: words and rules. A filled dot when it ships, a hollow ring when it does not. */
.strip { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: var(--space-8); }
.strip.audio { grid-template-columns: repeat(11, minmax(0, 1fr)); }
.strip li { display: flex; flex-direction: column; gap: var(--space-8); color: var(--ink-faint); border-bottom: var(--border-focus) solid var(--line-default); padding-bottom: var(--space-8); }
.strip li::before { content: ""; width: var(--space-8); height: var(--space-8); border-radius: var(--radius-pill); border: var(--border-hairline) solid var(--ink-faint); }
.strip li.on { color: var(--ink-body); border-bottom-color: var(--accent, var(--line-brand)); }
.strip li.on::before { background: var(--ink-body); border-color: var(--ink-body); }
.strip a { color: inherit; }
.strip.md li { gap: var(--space-12); padding-bottom: var(--space-12); }

/* Sections */
section { padding-block: var(--space-64); }
section > .wrap > h2 { color: var(--ink-strong); margin-bottom: var(--space-8); }
section > .wrap > .lede { color: var(--ink-muted); max-width: var(--measure-text); margin-bottom: var(--space-32); }

/* ProductTile grid: the strip is pinned to the bottom so the rules line up across the grid. */
.tiles { display: grid; gap: var(--space-24); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tiles > li { min-width: var(--space-0); container-type: inline-size; }
/* Below 360px wide the strip wraps to two rows of four (PlatformStrip rules). The design system has no token for that width. */
@container (max-width: 360px) { .strip { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: var(--space-16); } }
.tile { display: flex; flex-direction: column; height: 100%; padding: var(--space-20); background: var(--surface-card); border: var(--border-hairline) solid var(--line-default); border-radius: var(--radius-12); color: inherit; text-decoration: none; }
@media (hover: hover) { .tile:hover { background: var(--surface-card-hover); border-color: var(--accent); } }
/* A product with no accent token yet takes a neutral mark and rule. */
.tile, .product-head { --accent: var(--line-strong); }
.tile .mark { display: flex; align-items: center; justify-content: center; width: var(--space-48); height: var(--space-48); border-radius: var(--radius-12); background: var(--brand-ink); color: var(--accent); font-family: var(--font-display); margin-bottom: var(--space-16); }
.tile h3 { color: var(--ink-strong); }
.tile .sentence { color: var(--ink-muted); margin-top: var(--space-4); margin-bottom: var(--space-16); }
.tile .meter { margin-bottom: var(--space-20); }
.tile .strip { margin-top: auto; }
.tile.unset .mark, .tile.unset .sentence, .tile.unset .strip { opacity: var(--opacity-disabled); }

/* StatusMeter: five segments and the word, with the proof beneath. */
.meter .pill { display: inline-flex; align-items: center; gap: var(--space-8); padding: var(--space-8) var(--space-12); background: var(--surface-inset); border-radius: var(--radius-pill); color: var(--stage); }
.meter .segs { display: inline-flex; gap: var(--space-2); }
.meter .segs i { width: var(--space-8); height: var(--space-4); border-radius: var(--radius-2); background: var(--line-default); }
.meter .segs i.f { background: var(--stage); }
.meter .proof { display: block; margin-top: var(--space-8); color: var(--ink-faint); }
.meter .proof a { color: inherit; }
.s1 { --stage: var(--status-idea); } .s2 { --stage: var(--status-concept); } .s3 { --stage: var(--status-dev); }
.s4 { --stage: var(--status-beta); } .s5 { --stage: var(--status-live); } .s0 { --stage: var(--ink-faint); }

/* Services, the steps, work, questions and contact: the live site's own words in the new system. */
.services { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-24); padding: var(--space-0); list-style: none; counter-reset: service; }
.services > li { border-top: var(--border-focus) solid var(--line-brand); padding-top: var(--space-16); counter-increment: service; }
.services h3, .steps h3, .work h3, .detail h2 { color: var(--ink-strong); margin-bottom: var(--space-8); }
.services p, .steps p, .work p { color: var(--ink-muted); }
.points { margin-top: var(--space-12); }
.points li { padding-inline-start: var(--space-16); position: relative; margin-bottom: var(--space-4); color: var(--ink-body); }
.points li::before { content: ""; position: absolute; inset-inline-start: var(--space-0); top: var(--space-8); width: var(--space-8); height: var(--space-2); background: var(--line-strong); }
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-24); padding: var(--space-0); list-style: none; counter-reset: step; margin-top: var(--space-32); }
.steps > li { counter-increment: step; border-top: var(--border-hairline) solid var(--line-strong); padding-top: var(--space-16); }
.steps > li::before { content: counter(step); display: block; color: var(--ink-faint); margin-bottom: var(--space-8); }
.works { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-24); margin-top: var(--space-32); }
.work { display: flex; flex-direction: column; height: 100%; padding: var(--space-20); background: var(--surface-card); border: var(--border-hairline) solid var(--line-default); border-radius: var(--radius-12); color: inherit; text-decoration: none; }
@media (hover: hover) { .work:hover { background: var(--surface-card-hover); border-color: var(--line-strong); } }
.work .thumb { display: block; width: 100%; max-width: none; height: var(--sidebar-width); object-fit: cover; object-position: top; border-radius: var(--radius-8); margin-bottom: var(--space-16); background: var(--surface-inset); }
.more { margin-top: var(--space-32); }
.faq details { border-top: var(--border-hairline) solid var(--line-strong); padding-block: var(--space-16); }
.faq summary { color: var(--ink-strong); cursor: pointer; min-height: var(--touch-min); display: flex; align-items: center; }
.faq p { margin-top: var(--space-12); max-width: var(--measure-text); }
.contact { border-top: var(--border-focus) solid var(--line-brand); padding-top: var(--space-32); }
.contact h2 { color: var(--ink-strong); margin-bottom: var(--space-12); }
.contact .actions a:not(.button) { color: var(--ink-link); }

/* BundleBlock: the one tinted panel a studio page may have. */
.bundle { background: var(--brand-orange-wash); border: var(--border-hairline) solid var(--line-brand); border-radius: var(--radius-16); padding: var(--space-24); }
.bundle .eyebrow { color: var(--brand-orange-ink); }
.bundle h2 { color: var(--ink-strong); margin-block: var(--space-8) var(--space-16); }
.bundle p { max-width: var(--measure-text); margin-bottom: var(--space-8); }

/* Chip (filter and choice): a pill, 44px to tap. Selected inverts the fill and gains a tick, so it is never colour alone. */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-8); margin-top: var(--space-32); }
.chip { display: inline-flex; align-items: center; gap: var(--space-8); min-height: var(--touch-min); padding: var(--space-0) var(--space-16); border-radius: var(--radius-pill); border: var(--border-hairline) solid var(--line-strong); background: var(--surface-inset); color: var(--ink-body); font-family: inherit; cursor: pointer; }
.chip[aria-pressed="true"], .chip[aria-checked="true"] { background: var(--surface-invert); color: var(--ink-inverse); border-color: var(--surface-invert); }
.chip[aria-pressed="true"]::before { content: "\2713"; }
@media (hover: hover) { .chip:hover:not([aria-pressed="true"]):not([aria-checked="true"]) { background: var(--surface-card-hover); } }
.count { margin-top: var(--space-16); color: var(--ink-muted); }
.group { padding-block: var(--space-32); }
.group h2 { color: var(--ink-strong); margin-bottom: var(--space-24); border-top: var(--border-focus) solid var(--line-brand); padding-top: var(--space-16); }
.group .lede { margin-top: calc(var(--space-0) - var(--space-12)); }

/* Three promises */
.promises { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-32); margin-top: var(--space-32); counter-reset: promise; }
.promises > li { counter-increment: promise; border-top: var(--border-focus) solid var(--line-brand); padding-top: var(--space-16); }
.promises > li::before { content: "0" counter(promise); display: block; font-family: var(--font-mono); color: var(--brand-orange-ink); margin-bottom: var(--space-8); }
.promises h3 { color: var(--ink-strong); margin-bottom: var(--space-8); }
.promises p { color: var(--ink-muted); }

/* The bundle: names with their marks, the period switch, and the band on a product page. */
.bundle .numeral { margin-block: var(--space-16) var(--space-8); }
.bundle h3, .bundle h2.label-sm { color: var(--ink-muted); margin-block: var(--space-16) var(--space-8); }
.bundle .switch { margin-top: var(--space-8); }
.bundle .period-name { color: var(--ink-muted); }
.included { display: grid; gap: var(--space-8); margin-block: var(--space-8) var(--space-16); }
.included li { display: flex; align-items: center; gap: var(--space-12); color: var(--ink-strong); }
.included.muted li { color: var(--ink-muted); }
.included .mini { width: var(--space-20); height: var(--space-20); border-radius: var(--radius-4); background: var(--accent, var(--line-strong)); }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-48); align-items: start; }
.split .bundle { margin-top: var(--space-0); }
.split h1, .split .display-sm.on-phone { margin-bottom: var(--space-24); }
/* With the switch showing, the one visible period needs no name of its own. */
.switch:not([hidden]) ~ .period .period-name { display: none; }
.split h2.heading-md { margin-top: var(--space-32); margin-bottom: var(--space-12); color: var(--ink-strong); }
.bundle.band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-16); margin-top: var(--space-48); }
.bundle.band p { margin-bottom: var(--space-0); }
.get-on { color: var(--ink-muted); margin-top: var(--space-32); margin-bottom: var(--space-12); }
.product-head .get-on + .strip { margin-top: var(--space-0); }

/* Ventures: a name, a sentence and a link out. Not tiles. */
.ventures { display: grid; gap: var(--space-24); grid-template-columns: repeat(2, 1fr); }
.ventures li { border-top: var(--border-hairline) solid var(--line-strong); padding-top: var(--space-16); }
.ventures h3 { color: var(--ink-strong); }
.ventures h3 a { color: inherit; display: inline-flex; align-items: center; min-height: var(--touch-min); }
/* Long words (German has many) break rather than push past a phone screen. */
h1, h2, h3, .wordmark { overflow-wrap: break-word; hyphens: auto; }
.ventures p { color: var(--ink-muted); margin-block: var(--space-4) var(--space-8); }

/* Screenshots: real ones, at their own shape, in a row that scrolls inside its own box. */
.shots { display: flex; gap: var(--space-24); overflow-x: auto; padding-bottom: var(--space-16); }
.shots li { flex: none; }
.shots img { display: block; height: calc(var(--sidebar-width) * 2); width: auto; max-width: none; border-radius: var(--radius-16); border: var(--border-hairline) solid var(--line-default); background: var(--surface-inset); }
.detail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-32); margin-top: var(--space-48); }
.detail p { max-width: var(--measure-text); }
.links li { margin-bottom: var(--space-8); }
.back { margin-bottom: var(--space-24); }
.publisher { margin-top: var(--space-48); color: var(--ink-muted); }

/* Product page */
.product-head { padding-block: var(--space-64) var(--space-32); }
.product-head .wordmark { margin-bottom: var(--space-24); }
.product-head p { max-width: var(--measure-text); margin-bottom: var(--space-32); }
.product-head .meter { margin-top: var(--space-32); }
.stateblock { border: var(--border-hairline) dashed var(--line-strong); border-radius: var(--radius-12); padding: var(--space-48) var(--space-24); text-align: center; color: var(--ink-faint); }

footer { background: var(--ground-sunken); padding-block: var(--space-64); margin-top: var(--space-64); }
footer .wordmark { margin-bottom: var(--space-24); }
footer h2 { color: var(--ink-muted); margin-bottom: var(--space-8); }
.foot-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-32); margin-block: var(--space-32); }
.foot-cols a { color: var(--ink-body); display: inline-flex; min-height: var(--touch-min); align-items: center; overflow-wrap: anywhere; }
.foot-cols li { min-width: var(--space-0); }
footer p { color: var(--ink-muted); max-width: var(--measure-text); margin-bottom: var(--space-8); }

/* 1200px, 840px and 600px are the bp-large, bp-expanded and bp-medium tokens; a media query cannot read a custom property. */
@media (max-width: 1200px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } .services, .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 840px) { .tiles, .works, .services, .steps, .foot-cols, .detail { grid-template-columns: repeat(2, minmax(0, 1fr)); } .promises, .split { grid-template-columns: repeat(1, minmax(0, 1fr)); } .nav .wide { display: none; } .nav .phone { display: block; } .wrap { padding-inline: max(var(--gutter-tablet), env(safe-area-inset-left)) max(var(--gutter-tablet), env(safe-area-inset-right)); } .hero { padding-block: var(--space-64) var(--space-48); } }
@media (max-width: 600px) {
  .tiles, .ventures, .works, .services, .steps, .detail { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .wrap { padding-inline: max(var(--gutter-phone), env(safe-area-inset-left)) max(var(--gutter-phone), env(safe-area-inset-right)); }
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shots img { height: var(--sidebar-width); }
  .strip, .strip.audio { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: var(--space-16); }
  .nav ul { gap: var(--space-16); }
  .on-wide.on-wide { display: none; }
  .on-phone.on-phone { display: inline-block; }
  .hero h1 .on-phone.on-phone { display: block; }
}
@media (forced-colors: active) { .tile, .bundle, .strip li { border-color: ButtonBorder; } }
