/* Leeam Applications website
   One stylesheet, no frameworks, no JavaScript.
   Every colour lives in the tokens below so any of them can be changed in one place. */

:root {
  /* The site is designed light only (Liam, 15 October 2026): browsers must not repaint it dark */
  color-scheme: only light;

  /* Colours, decided by Liam 14 October 2026 */
  --page: #D9DCE1;        /* cool grey page background */
  --panel: #FFFFFF;       /* white content panels */
  --ink: #111111;         /* text and headings */
  --orange: #FF6616;      /* the logo orange: buttons, large shapes, rules, news markers */
  --orange-deep: #9A3800; /* small orange text and links */
  --line: rgba(17, 17, 17, 0.12);   /* hairlines on white */

  /* Type */
  --font-heading: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Atkinson Hyperlegible", Verdana, "Helvetica Neue", Arial, sans-serif;

  /* Shape and space */
  --radius: 20px;
  --radius-small: 10px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --panel-pad: clamp(1.5rem, 4vw, 3rem);
  --measure: 62ch;
}

/* Fonts, hosted here under the SIL Open Font Licence (see the fonts folder) */
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/SpaceGrotesk-variable.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/AtkinsonHyperlegible-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/AtkinsonHyperlegible-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/AtkinsonHyperlegible-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/AtkinsonHyperlegible-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* The plain zero (Liam, 14 October 2026). Atkinson Hyperlegible draws a slashed zero by design and its font
   files have no OpenType switch to turn that off (their substitution features are aalt, case, ccmp, frac, locl,
   ordn, pnum, sups and tnum; no "zero" and no stylistic sets). So the digits 0 to 9 of body text are taken from
   Space Grotesk, whose zero is plain, under the body font's own family name. Two things matter here:
   these faces are declared after the Atkinson faces, because when two faces of a family cover the same
   character the later one wins; and each one repeats an Atkinson face's exact weight (400, then 700), because
   browsers pick a face by weight first and only then look at which characters it covers, so a 300 to 700 range
   would never be consulted for 400 weight text. Every other character still comes from Atkinson Hyperlegible.
   The site uses no italic text, so no italic digit faces are needed. */
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/SpaceGrotesk-variable.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0030-0039;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/SpaceGrotesk-variable.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0030-0039;
}

/* Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--page);
  /* The logo's triangle mesh, very faint, only ever on the grey. Panels are solid white on top of it.
     images/mesh.svg is one two-row tile at the logo's own 6 to 5 triangle proportion. */
  background-image: url("images/mesh.svg");
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  overflow-wrap: anywhere;
}

h1 {
  font-size: clamp(2.25rem, 1.4rem + 4.5vw, 4.25rem);
}

h2 {
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem);
}

h3 {
  font-size: clamp(1.25rem, 1.05rem + 1vw, 1.5rem);
  line-height: 1.25;
}

p,
ul,
ol {
  margin: 0 0 1.1em;
  max-width: var(--measure);
}

a {
  color: var(--orange-deep);
  text-decoration: underline;
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.16em;
}

a:hover {
  text-decoration-thickness: 0.18em;
}

/* Keyboard focus: thick dark ring with a white gap so it shows on grey, white and orange */
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--panel);
  border-radius: 4px;
}

/* Skip link: the first thing a keyboard user reaches */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--panel);
  color: var(--ink);
  font-family: var(--font-heading);
  font-weight: 700;
  border: 2px solid var(--ink);
  border-radius: var(--radius-small);
}

.skip-link:focus {
  top: 1rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Page width */
.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Header: a white band so the logo's black column always sits on white */
.site-header {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  min-height: 76px;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-radius: 4px;
}

.site-logo img {
  height: 44px;
  width: auto;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  max-width: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0.9rem;
  color: var(--ink);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  border-radius: var(--radius-small);
  border-bottom: 3px solid transparent;
}

.site-nav a:hover {
  background: var(--page);
}

.site-nav a[aria-current="page"] {
  border-bottom-color: var(--orange);
}

/* Main column of panels */
main {
  flex: 1 0 auto;
  padding-top: clamp(1.25rem, 3vw, 2.5rem);
  padding-bottom: clamp(1.25rem, 3vw, 2.5rem);
}

main .wrap > * + * {
  margin-top: clamp(1.25rem, 3vw, 2rem);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--panel-pad);
}

/* Section headings carry a short orange rule, cut at the logo's angle */
.panel > h1::after,
.panel > h2::after,
.section-heading::after {
  content: "";
  display: block;
  width: 72px;
  height: 8px;
  margin-top: 0.45em;
  background: var(--orange);
  clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%);
}

/* Hero on the home page */
.hero {
  text-align: center;
}

.hero .logo-full {
  width: min(100%, 440px);
  margin: 0 auto clamp(1.5rem, 4vw, 2.5rem);
}

.hero h1 {
  margin-bottom: 0.4em;
}

.hero h1::after {
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  margin-left: auto;
  margin-right: auto;
  max-width: 40ch;
  font-size: clamp(1.15rem, 1rem + 0.8vw, 1.4rem);
}

.hero .button {
  margin-top: 0.5rem;
}

/* Buttons: orange, black text, thin black border because orange and grey are close in brightness */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.65rem 1.5rem;
  background: var(--orange);
  color: var(--ink);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  border: 2px solid var(--ink);
  border-radius: var(--radius-small);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.button:hover {
  box-shadow: 0 4px 0 var(--ink);
  transform: translateY(-2px);
}

.button:focus-visible {
  box-shadow: 0 0 0 3px var(--panel);
}

/* News */
.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: none;
}

.news-list li {
  position: relative;
  padding: 1.25rem 0 1.25rem 2.25rem;
  border-top: 1px solid var(--line);
}

.news-list li:last-child {
  border-bottom: 1px solid var(--line);
}

/* An orange triangle marker, borrowed from the logo's mesh */
.news-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.65rem;
  width: 20px;
  height: 20px;
  background: var(--orange);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.news-list time {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--orange-deep);
  margin-bottom: 0.25rem;
}

.news-list h3 {
  margin-bottom: 0.3em;
}

.news-list p:last-child {
  margin-bottom: 0;
}

/* About: joint photo above the text */
.about figure {
  margin: 0 0 1.5rem;
}

.about figure img,
.person figure img {
  width: 100%;
  border-radius: var(--radius-small);
  border: 1px solid var(--line);
}

/* People: heading, bio, then photo in the source; the photo's side is CSS only */
.person {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.person figure {
  margin: 0;
}

.person .bio h2 {
  margin-top: 0;
}

.person .bio p:last-child {
  margin-bottom: 0;
}

@media (min-width: 760px) {
  .person {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: clamp(1.5rem, 4vw, 3rem);
  }

  /* Liam: words left, photo right (the natural order) */
  .person.photo-right figure {
    grid-column: 2;
    grid-row: 1;
  }

  /* Lee: photo left, words right, without changing the reading order */
  .person.photo-left {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  }

  .person.photo-left figure {
    grid-column: 1;
    grid-row: 1;
  }

  .person.photo-left .bio {
    grid-column: 2;
    grid-row: 1;
  }
}

/* App store page: one block per app */
.app-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
}

.app-card .app-icon {
  width: 112px;
  height: 112px;
  border-radius: 26px;
  border: 1px solid var(--line);
}

.app-card h2 {
  margin-top: 0;
}

.app-card h2::after {
  content: none;
}

.app-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 0.5rem;
}

.app-actions p {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
}

/* Plain links in an action row are still comfortable tap targets */
.app-actions a:not(.button) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* Store badges keep their own artwork: sized by height only, nothing added */
.store-badge img { display: block; height: 60px; width: auto; }

/* Small print such as Google's trademark line */
.legal-note { margin: 1rem 0 0; font-size: 0.875rem; }

@media (min-width: 640px) {
  .app-card {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 2rem;
  }
}

.more-apps {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.2rem;
  margin: 0;
}

/* Contact */
.contact-email {
  font-family: var(--font-heading);
  font-weight: 700;
  /* sized so the whole address fits on one line from 320 pixels up */
  font-size: clamp(1rem, 0.5rem + 2.2vw, 2rem);
  overflow-wrap: anywhere;
}

.contact-email a {
  display: inline-block;
  min-height: 44px;
  padding: 0.35rem 0;
}

/* Social links (Liam, 14 October 2026): the footer shows the four official logos on their own; the contact
   page shows each logo with the account's name. Meta's rules for the Facebook logo and the Instagram glyph
   shape the layout: no word next to the Facebook logo, clear space of at least a quarter of its width on
   every side, at least half its width to any other content, never narrower than 16 pixels, and no
   recolouring, outlines, shadows or containers, so the logos sit directly on the white panel. */
.social-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  max-width: none;
}

/* Footer: a 56 by 56 pixel tile around a 28 pixel logo, so there is 14 pixels (half the logo's width)
   of clear space on every side inside the tile, and the tiles are 12 pixels apart on top of that */
.social-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  color: var(--ink);
  font-family: var(--font-heading);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-small);
}

.social-list a:hover {
  background: var(--page);
}

.social-list img {
  width: 28px;
  height: auto;
}

/* Contact page: one row per network, the 40 pixel logo first, then the account's name 20 pixels
   (half the logo's width) to its right; rows are 60 pixels tall with 8 pixels between them */
.social-list.large {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.social-list.large a {
  width: auto;
  height: auto;
  min-height: 60px;
  justify-content: flex-start;
  gap: 1.25rem;
  padding: 0.5rem 1rem 0.5rem 0.625rem;
  font-size: 1.2rem;
}

.social-list.large img {
  width: 40px;
}

/* The YouTube logo (15 October 2026) is wider than tall (110 by 79 pixels, cropped to the visible logo), so it is
   sized by height to match the other three: 28 pixels tall in the footer (about 39 wide, leaving over 8 pixels of
   clear space each side inside the 56 pixel tile) and 40 pixels tall on the contact page. Only YouTube is affected. */
.social-list img[src$="social-youtube.png"] {
  width: auto;
  height: 28px;
}

.social-list.large img[src$="social-youtube.png"] {
  width: auto;
  height: 40px;
}

.social-list.large span {
  overflow-wrap: anywhere;
}

/* Small phones, narrower than 390 pixels (prompt 07, 15 October 2026): the YouTube logo is 56 pixels wide, so at
   full size the account names would wrap and, being single words, break in the middle. Measured at 320 pixels
   the list is 238 pixels wide and "@LeeamApplications" is 163 pixels at 1rem, so the names drop to 1rem (never
   smaller), the row's side padding goes, and the logo-to-name gap is 12 pixels on the YouTube and TikTok rows.
   The Facebook and Instagram rows keep the 20 pixel gap (half the logo's width) that Meta's rules ask for.
   Rows stay at least 60 pixels tall, so tap targets are unchanged. */
@media (max-width: 389px) {
  .social-list.large a {
    font-size: 1rem;
    gap: 0.75rem;
    padding-left: 0;
    padding-right: 0;
  }

  .social-list.large a[aria-label*="Facebook"],
  .social-list.large a[aria-label*="Instagram"] {
    gap: 1.25rem;
  }
}

/* Footer: a white panel so no text sits on the mesh */
.site-footer {
  padding-bottom: clamp(1.25rem, 3vw, 2.5rem);
}

.site-footer .panel {
  display: grid;
  gap: 1.25rem;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  max-width: none;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0.75rem 0.4rem 0;
  color: var(--ink);
  font-family: var(--font-heading);
  font-weight: 600;
}

.site-footer small {
  display: block;
  font-size: 1rem;
}

/* Simple prose pages */
.prose h2 {
  margin-top: 1.6em;
}

.prose h2::after {
  content: none;
}

.prose ul {
  padding-left: 1.3em;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button {
    transition: none;
  }

  .button:hover {
    transform: none;
  }
}

/* Print: drop the texture */
@media print {
  body {
    background: #FFFFFF;
  }
}
