/* Case Study 01 Holdings Ltd. — site styles */

/* Newsreader, self-hosted (SIL Open Font License). Variable: opsz 6–72, wght 200–700. */

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url("/fonts/newsreader-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url("/fonts/newsreader-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --paper: #ffffff;
  --surface: #f2f4f3;
  --ink: #16181c;
  --muted: #5b6168;
  --rule: #e0e4e3;
  --accent: #1f5f5b;

  --measure: 34rem;
  --gutter: clamp(1.5rem, 5vw, 3rem);

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: 1.1875rem;
  line-height: 1.62;
  font-weight: 380;
  text-rendering: optimizeLegibility;
}

/* ---------- structure ---------- */

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.wrap--wide { max-width: 52rem; }

header.site {
  border-bottom: 1px solid var(--rule);
  padding: 1.4rem 0;
}

header.site .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: baseline;
  justify-content: space-between;
}

.wordmark {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
  text-decoration: none;
  font-variant-numeric: lining-nums tabular-nums;
}

nav.site ul {
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--sans);
  font-size: 0.875rem;
}

nav.site a { color: var(--muted); }
nav.site a:hover { color: var(--accent); }

/* Products dropdown. "Products" is a link to /products; the menu opens on
   hover (mouse) and when keyboard focus is inside it. On touch screens,
   tapping "Products" goes to the Products page. */

nav.site .has-menu { position: relative; }

/* The top padding bridges the gap so the menu stays open while the
   pointer moves down into it. */
nav.site .menu {
  display: none;
  position: absolute;
  top: 100%;
  left: -0.75rem;
  z-index: 10;
  padding-top: 0.5rem;
  min-width: 10rem;
}

nav.site .menu ul {
  display: block;
  padding: 0.35rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(22, 24, 28, 0.08);
}

nav.site .menu a {
  display: block;
  padding: 0.45rem 0.6rem;
  border-radius: 5px;
  color: var(--ink);
  text-decoration: none;
}

nav.site .menu a:hover { background: var(--surface); color: var(--ink); }

nav.site .has-menu:focus-within .menu { display: block; }

@media (hover: hover) {
  nav.site .has-menu:hover .menu { display: block; }
}

main { padding: clamp(3.5rem, 9vw, 6.5rem) 0 5rem; }

/* ---------- type ---------- */

h1.display {
  font-size: clamp(2.25rem, 5.6vw, 3.5rem);
  line-height: 1.06;
  font-weight: 350;
  letter-spacing: -0.021em;
  margin: 0 0 1.6rem;
  max-width: 18ch;
  text-wrap: balance;
}

h2 {
  font-size: 1.3125rem;
  font-weight: 600;
  letter-spacing: -0.008em;
  line-height: 1.3;
  margin: 0 0 0.7rem;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 2rem 0 0.5rem;
}

p { margin: 0 0 1.15rem; }

.lede {
  font-size: 1.3125rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 32ch;
}

.section { margin-top: 3.25rem; }

.section + .section { margin-top: 3rem; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

a:hover { text-decoration-thickness: 2px; }

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- document pages ---------- */

.doc-meta {
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0 0 2.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.placeholder {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  padding: 1.15rem 1.3rem;
  margin: 0 0 2.5rem;
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--muted);
}

.placeholder strong { color: var(--ink); }

.doc h2 { margin-top: 2.6rem; }
.doc h2:first-of-type { margin-top: 0; }

.doc ul { padding-left: 1.15rem; }
.doc li { margin-bottom: 0.5rem; }

/* ---------- products ---------- */

/* Text on the leading side, button in the bottom trailing corner. On
   narrow screens the button wraps below the text and stays trailing. */
.product {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1.25rem 3rem;
  margin-top: 2.5rem;
}

.product + .product { margin-top: 3rem; }

.product-text {
  flex: 1 1 20rem;
  max-width: var(--measure);
}

.product-text p:last-child { margin-bottom: 0; }

.product .button {
  flex: none;
  margin-left: auto;
}

.button {
  display: inline-block;
  padding: 0.7rem 1.15rem;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--paper);
  background: var(--accent);
  border-radius: 6px;
  text-decoration: none;
}

.button:hover { background: var(--ink); }

/* ---------- contact ---------- */

.contact-line {
  margin: 0 0 0.4rem;
}

address {
  font-style: normal;
  color: var(--muted);
}

/* ---------- footer ---------- */

footer.site {
  border-top: 1px solid var(--rule);
  padding: 2.25rem 0 3.5rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--muted);
}

footer.site .legal-name {
  color: var(--ink);
  font-weight: 500;
}

footer.site ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--accent); }

/* ---------- preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
