/* ============================================================
   B Side Solutions, LLC
   Brand Guide v1.0 · July 2026
   Ratio to hold: 70 Paper · 22 Ink · 6 Brass · 2 Moss
   ============================================================ */

/* ---------- Fonts (self-hosted, no third-party requests) ---------- */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/archivo-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: 'Archivo';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/archivo-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;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 300 600;
  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: 300 600;
  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;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 300 500;
  font-display: swap;
  src: url('../fonts/newsreader-italic-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: italic;
  font-weight: 300 500;
  font-display: swap;
  src: url('../fonts/newsreader-italic-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;
}

/* ---------- Tokens ---------- */

:root {
  /* The four values */
  --ink: #16181c;
  --brass: #be8236;
  --moss: #2b321a;
  --paper: #f7f5f0;

  /* Supporting greys */
  --grey-1: #5b5f63;
  --grey-2: #a8a296;
  --grey-3: #dcd6c7;
  --grey-4: #efebe2;

  /* Brass darkened for text use on Paper — AA contrast */
  --brass-text: #8a5a18;

  /* On-Ink support */
  --ink-line: #34383e;
  --ink-mute: #7a7f86;
  --ink-body: #c7cbd0;

  --body: #3a3f44;
  --body-soft: #4a4f54;

  --sans: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;

  /* Rhythm */
  --gutter: clamp(1.5rem, 5vw, 4.5rem);
  --measure: 34rem;
  --max: 68rem;
  --section-y: clamp(4.5rem, 10vw, 8.5rem);
}

/* ---------- Reset ---------- */

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

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1,
h2,
h3 {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: var(--brass-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--ink);
}

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

/* ---------- Layout primitives ---------- */

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass-text);
  margin: 0;
}

.rule {
  border: 0;
  border-top: 1px solid var(--grey-3);
  margin: 0;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.875rem;
  padding: 0.75rem 1.25rem;
  z-index: 100;
}

.skip:focus {
  left: 0;
  color: var(--paper);
}

/* ---------- The mark ---------- */

/* Clear space = one counter diameter = 15% of the mark's height.
   Applied as padding so the mark can never be crowded. */
.mark {
  display: block;
  color: var(--ink);
  flex: none;
}

/* ---------- Masthead ---------- */

.masthead {
  background: var(--ink);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}

.masthead__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--ink-line);
  font-family: var(--sans);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

/* The two tracked labels need ~295px plus gutters, so they fit on a phone.
   Below that the second one goes — it is a grace note, not information. */
@media (max-width: 26rem) {
  .masthead__bar {
    justify-content: center;
    letter-spacing: 0.18em;
  }

  .masthead__bar .loc {
    display: none;
  }
}

.masthead__bar .est {
  color: var(--brass);
}

.masthead__bar .loc {
  color: var(--ink-mute);
  font-weight: 600;
  letter-spacing: 0.2em;
}

.masthead__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-block: clamp(3.5rem, 9vw, 6.5rem) clamp(3rem, 7vw, 5rem);
}

.masthead .mark {
  color: var(--paper);
  width: clamp(96px, 17vw, 168px);
  height: auto;
  margin-bottom: clamp(2.25rem, 5vw, 3.5rem);
}

.wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.wordmark__name {
  font-family: var(--sans);
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 600;
  /* Locked tracking — set at +14% or don't set it at all. */
  letter-spacing: 0.14em;
  line-height: 1;
  margin: 0;
  /* Optical: locked tracking adds a trailing gap; pull it back to centre. */
  text-indent: 0.14em;
}

.wordmark__legal {
  font-family: var(--sans);
  font-size: clamp(0.6875rem, 1.6vw, 0.8125rem);
  font-weight: 500;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  color: #9da2a8;
  text-transform: uppercase;
}

.epigraph {
  font-family: var(--serif);
  font-size: clamp(1.125rem, 2.6vw, 1.4375rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1.5;
  color: var(--ink-body);
  max-width: 32rem;
  margin: clamp(2.75rem, 6vw, 4rem) auto 0;
}

/* The brand ratio bar, 5 · 2 · 1 */
.ratio {
  display: flex;
  height: 5px;
  border-radius: 3px;
  overflow: hidden;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.ratio span:nth-child(1) {
  flex: 5;
  background: var(--brass);
}
.ratio span:nth-child(2) {
  flex: 2;
  background: var(--moss);
}
.ratio span:nth-child(3) {
  flex: 1;
  background: var(--paper);
}

/* ---------- Statement ---------- */

.statement__lede {
  font-family: var(--sans);
  font-size: clamp(1.75rem, 4.4vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
  max-width: 22ch;
  margin-block: 1.75rem 0;
}

.statement__body {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--body);
  max-width: var(--measure);
  margin-top: 1.75rem;
}

/* ---------- Portfolio ---------- */

.portfolio {
  background: var(--grey-4);
}

.portfolio__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--grey-3);
}

.portfolio__count {
  font-family: var(--sans);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey-2);
}

.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.product {
  background: #fff;
  border: 1px solid #e3ddcf;
  padding: clamp(1.75rem, 3.5vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Products are named in type, never in a co-branded lockup. */
.product__name {
  font-family: var(--sans);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.product__line {
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-style: italic;
  line-height: 1.45;
  color: var(--moss);
}

.product__body {
  font-size: 0.9688rem;
  line-height: 1.65;
  color: var(--body-soft);
  flex: 1;
}

.product__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: baseline;
  padding-top: 1rem;
  border-top: 1px solid var(--grey-4);
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey-2);
}

.product__link {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  align-self: flex-start;
}

.product__link::after {
  content: ' \2192';
  font-family: var(--sans);
}

/* ---------- Contact ---------- */

.contact {
  background: var(--ink);
  color: var(--paper);
}

.contact a {
  color: var(--brass);
}

.contact a:hover {
  color: var(--paper);
}

.contact .eyebrow {
  color: var(--brass);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 6vw, 4.5rem);
}

@media (min-width: 56rem) {
  .contact__grid {
    grid-template-columns: 0.85fr 1fr;
    align-items: start;
  }
}

.contact__title {
  font-size: clamp(1.75rem, 4vw, 2.375rem);
  line-height: 1.1;
  margin-top: 1.5rem;
  color: var(--paper);
}

.contact__note {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink-body);
  margin-top: 1.25rem;
  max-width: 30rem;
}

/* ---------- Form ---------- */

.form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field > label {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #9da2a8;
}

.field input,
.field textarea {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--paper);
  background: #1d2025;
  border: 1px solid var(--ink-line);
  border-radius: 2px;
  padding: 0.8125rem 0.9375rem;
  width: 100%;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.field textarea {
  resize: vertical;
  min-height: 8.5rem;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #6d7278;
}

.field input:hover,
.field textarea:hover {
  border-color: #4a4f56;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brass);
  background: #212429;
}

.field[data-invalid] input,
.field[data-invalid] textarea {
  border-color: #c86a4e;
}

.field__error {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #e09477;
}

/* Honeypot — hidden from people, reachable by bots.
   Kept out of the a11y tree and the tab order. */
.trap {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  justify-content: space-between;
}

.btn {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--paper);
  border-radius: 2px;
  padding: 0.9375rem 2rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--ink);
}

.btn:disabled {
  opacity: 0.55;
  cursor: progress;
}

.form__fineprint {
  font-family: var(--serif);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink-mute);
  max-width: 20rem;
}

/* ---------- Footnote ----------
   Sits inside the contact section so the Ink ground stays continuous. Its
   label is grey, not Brass: this section already spends its one Brass accent
   on the "03 — Contact" eyebrow. */

.footnote {
  margin-top: clamp(3rem, 7vw, 5rem);
  padding-top: 1.75rem;
  border-top: 1px solid var(--ink-line);
  display: flex;
  flex-direction: column;
  gap: 0.6875rem;
}

.footnote__label {
  font-family: var(--sans);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8e9298;
}

.footnote__body {
  font-family: var(--serif);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #a8adb3;
  max-width: 52ch;
}

/* ---------- Notices ---------- */

.notice {
  border-left: 3px solid var(--brass);
  background: #1d2025;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4375rem;
}

.notice--bad {
  border-left-color: #c86a4e;
}

.notice__title {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass);
}

.notice--bad .notice__title {
  color: #e09477;
}

.notice__body {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-body);
}

/* ---------- Footer ---------- */

.footer {
  background: var(--ink);
  color: var(--paper);
  border-top: 1px solid var(--ink-line);
  padding-block: 2.5rem;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
}

.footer__id {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer .mark {
  color: var(--paper);
  width: 26px;
  height: 26px;
}

.footer__name {
  font-family: var(--sans);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-body);
}

.footer__legal {
  font-family: var(--serif);
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #8e9298;
}

/* ---------- The one licensed move ----------
   A single 180° rotation of the whole disc, easing out, once.
   It is a record being flipped. Nothing spins, pulses, bounces or loops. */

@media (prefers-reduced-motion: no-preference) {
  .masthead .mark {
    animation: flip 900ms cubic-bezier(0.22, 0.61, 0.36, 1) 1 both;
  }
}

@keyframes flip {
  from {
    transform: perspective(900px) rotateY(180deg);
    opacity: 0;
  }
  to {
    transform: perspective(900px) rotateY(0deg);
    opacity: 1;
  }
}

/* ---------- Print ---------- */

@media print {
  .masthead,
  .contact,
  .footer {
    background: #fff !important;
    color: #000 !important;
  }
  .masthead .mark,
  .footer .mark {
    color: #000 !important;
  }
  .contact__grid,
  .form {
    display: none;
  }
}
