/* Krish Star Stationery
   The page is a sheet of ruled exercise paper: one red margin line runs down
   the left, headlines sit on feint rules, and the form is written on lines. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --paper: #f8fafc;
  --ink: #18223d;
  --ink-soft: #4d5873;
  --feint: #c6d4e8;      /* the pale blue of ruled lines */
  --margin-red: #e0564f; /* the margin line */
  --gold: #b67f2b;       /* from the logo */
  --bad: #b3261e;
  --ok: #1f6b45;

  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --margin-x: clamp(1.25rem, 9vw, 9rem);   /* where the red line sits */
  --display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --text: "Instrument Sans", system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  position: relative;
  min-height: 100vh;
}

/* The margin line */
body::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--margin-x);
  width: 2px;
  background: var(--margin-red);
  opacity: .7;
  pointer-events: none;
}

.masthead,
main > section,
.colophon {
  padding-left: calc(var(--margin-x) + var(--gutter));
  padding-right: var(--gutter);
}

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

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-color: var(--gold); text-decoration-thickness: 2px; }

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

h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
address { font-style: normal; }

.skip {
  position: absolute; left: -999rem; top: .5rem;
  background: var(--ink); color: var(--paper); padding: .5rem .9rem; z-index: 10;
}
.skip:focus { left: .5rem; }

/* ---- Masthead ---------------------------------------------------------- */
.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 2rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}
.brand {
  display: inline-flex; align-items: center; gap: .75rem;
  font-family: var(--display); font-weight: 650; font-size: 1.125rem;
  text-decoration: none; letter-spacing: -.01em;
}
.brand img { width: 52px; height: 52px; }
.masthead ul { display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; }
.masthead nav a { text-decoration: none; padding: .35rem 0; display: inline-block; }
.masthead nav a:hover,
.masthead nav a[aria-current="page"] { box-shadow: 0 2px 0 var(--gold); }

/* ---- Ruled headline ------------------------------------------------------ */
.ruled {
  font-size: clamp(2.5rem, 7.2vw, 5.25rem);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.12;
  max-width: 15em;
  padding-bottom: .04em;
  /* one feint rule under every line of text */
  background-image: linear-gradient(to bottom, transparent calc(100% - 2px), var(--feint) calc(100% - 2px));
  background-size: 100% 1.12em;
}

.hero { padding-top: clamp(2.5rem, 8vw, 6rem); padding-bottom: clamp(3rem, 8vw, 6rem); }
.page-head { padding-top: clamp(2rem, 6vw, 4.5rem); padding-bottom: clamp(1.5rem, 4vw, 3rem); }
.page-head .ruled { font-size: clamp(2.25rem, 5.5vw, 4rem); }

.lede {
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  color: var(--ink-soft);
  max-width: 34em;
  margin: 1.75rem 0 0;
}
.measure { max-width: 38em; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin: 2rem 0 0; }

.button {
  display: inline-block;
  font: 600 1rem/1.2 var(--text);
  color: var(--paper);
  background: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: .85rem 1.4rem;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--paper); color: var(--ink); }
.plain-link { font-weight: 600; }

/* ---- Blocks ------------------------------------------------------------ */
.block { padding-top: clamp(2rem, 5vw, 3.5rem); padding-bottom: clamp(2rem, 5vw, 3.5rem); }
.block > h2,
.details h2,
.write h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 600; letter-spacing: -.02em; margin-bottom: 1.5rem; }

/* Home: six products laid on the page */
.shelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 2.5rem 2rem;
  margin-bottom: 2.5rem;
}
.shelf img,
.range img,
.split img { border-radius: 4px; background: #e8edf4; }
.shelf h3 { font-size: 1.1875rem; font-weight: 600; margin: 1rem 0 .25rem; }
.shelf p { color: var(--ink-soft); margin: 0; font-size: 1rem; }

.visit address { font-size: 1.125rem; margin-bottom: 1rem; }

/* What we stock: one row per shelf */
.range li {
  display: grid;
  grid-template-columns: minmax(0, 17rem) minmax(0, 34em);
  gap: 1.25rem 2.5rem;
  align-items: center;
  padding: 1.75rem 0;
  border-top: 2px solid var(--feint);
}
.range li:last-child { border-bottom: 2px solid var(--feint); }
.range h2 { font-size: 1.5rem; font-weight: 600; letter-spacing: -.015em; margin-bottom: .5rem; }
.range p { color: var(--ink-soft); margin: 0; }

/* About */
.split { display: grid; grid-template-columns: minmax(0, 38em) minmax(0, 22rem); gap: 2.5rem 4rem; align-items: start; }
.split h2 { font-size: 1.5rem; font-weight: 600; margin: 2rem 0 .75rem; }
.points li { padding: .55rem 0; border-bottom: 2px solid var(--feint); }

.prose h2 { font-size: 1.25rem; font-weight: 600; margin: 2rem 0 .5rem; }
.prose h2:first-child { margin-top: 0; }

/* ---- Contact ------------------------------------------------------------ */
.contact { display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 34rem); gap: 3rem 5rem; align-items: start; }
.details dt { font-size: .9375rem; color: var(--ink-soft); }
.details dd { margin: 0 0 1.25rem; font-size: 1.125rem; }
.details address { margin-bottom: .35rem; }

/* Fields are written on a line, like the rest of the page */
.field { margin: 0 0 1.5rem; }
.field label { display: block; font-weight: 600; font-size: .9375rem; }
.optional { font-weight: 400; color: var(--ink-soft); }
.field input,
.field textarea {
  display: block;
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--ink-soft);
  border-radius: 0;
  padding: .5rem 0;
}
.field textarea {
  resize: vertical;
  line-height: 2rem;
  padding-top: 0;
  border-bottom: 0;
  background-image: linear-gradient(to bottom, transparent calc(100% - 2px), var(--feint) calc(100% - 2px));
  background-size: 100% 2rem;
  background-attachment: local;
  box-shadow: 0 2px 0 var(--ink-soft);
}
.field input:focus-visible,
.field textarea:focus-visible { outline: 0; border-bottom-color: var(--gold); box-shadow: 0 2px 0 var(--gold); }
.field [aria-invalid="true"] { border-bottom-color: var(--bad); box-shadow: 0 2px 0 var(--bad); }
.error { display: block; color: var(--bad); font-size: .9375rem; margin-top: .4rem; }

.status { padding: .85rem 1rem; border-left: 4px solid; margin-bottom: 1.75rem; font-weight: 600; background: #fff; }
.status.ok { border-color: var(--ok); color: var(--ok); }
.status.bad { border-color: var(--bad); color: var(--bad); }

.small { font-size: .9375rem; color: var(--ink-soft); margin-top: 1.25rem; }

/* Honeypot: off-screen for people, visible to form-filling bots */
.trap { position: absolute; left: -999rem; width: 1px; height: 1px; overflow: hidden; }

/* ---- Colophon ------------------------------------------------------------ */
.colophon {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 4rem;
  margin-top: clamp(2rem, 6vw, 4rem);
  padding-top: 2rem;
  padding-bottom: 2.5rem;
  border-top: 2px solid var(--feint);
  font-size: .9375rem;
  color: var(--ink-soft);
}
.colophon p { margin: 0 0 .3rem; }
.colophon-name { font-family: var(--display); font-weight: 600; color: var(--ink); font-size: 1.0625rem; }
.colophon div:first-child { max-width: 22rem; }

/* ---- Small screens ------------------------------------------------------- */
@media (max-width: 46rem) {
  .range li,
  .split,
  .contact { grid-template-columns: minmax(0, 1fr); }
  .split img { max-width: 20rem; }
  .masthead ul { gap: .25rem 1rem; }
  .masthead nav a { font-size: .9375rem; }
}

@media print {
  body::before, .masthead nav, .actions, form { display: none; }
}
