/* Pathrew LLC — site stylesheet
   Shared by every page on pathrew.com (index, and later privacy / terms / support).
   No build step, no web fonts, no scripts.
   Responsive: spacing and headings scale fluidly with clamp(); layout changes
   (nav, grids, large monitors, landscape phones) are in the media queries at the end. */

:root {
  color-scheme: light dark;
  --bg: #faf7f1;
  --bg-alt: #f1ece2;
  --surface: #fffdf9;
  --ink: #1f1d1a;
  --ink-soft: #5b564e;
  --line: #e2dbcd;
  --accent: #b3412c;
  --accent-ink: #8f3222;
  --radius: 10px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;

  /* Layout. --content / --content-narrow are text-column widths; the gutter is added on top.
     Gutter and vertical spacing grow with the viewport (phone → desktop); the
     large-monitor breakpoints at the end of the file widen the columns again. */
  --content: 1000px;
  --content-narrow: 720px;
  --gutter: clamp(16px, 5vw, 40px);
  --section-pad: clamp(44px, 20px + 4.2vw, 96px);
  --hero-pad-top: clamp(48px, 24px + 4.6vw, 120px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16150f;
    --bg-alt: #1e1c15;
    --surface: #23211a;
    --ink: #ece7dc;
    --ink-soft: #b4ada0;
    --line: #3a372e;
    --accent: #e0765f;
    --accent-ink: #f0937e;
  }
}

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem; /* 17px at the default root size; rem so it follows the reader's browser setting */
  line-height: 1.6;
  overflow-wrap: break-word;
}

img,
video {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(1.75rem, 1.2rem + 2.9vw, 3.5rem);
}

h2 {
  font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.25rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1em;
}

em {
  font-style: italic;
}

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

/* Hover colors only where there is a real pointer, so taps on touch screens don't leave links "stuck" */
@media (hover: hover) {
  a:hover {
    color: var(--accent);
  }
}

a:focus-visible,
.button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
  /* Keep text clear of the notch / rounded corners on phones held sideways (viewport-fit=cover) */
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.container.narrow {
  max-width: calc(var(--content-narrow) + 2 * var(--gutter));
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 12px;
  left: max(12px, env(safe-area-inset-left));
  top: -60px;
  background: var(--ink);
  color: var(--bg);
  padding: 8px 12px;
  border-radius: 6px;
  z-index: 10;
}

.skip-link:focus {
  top: 12px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  padding: 12px 0;
}

.brand-mark {
  color: var(--accent);
  flex: none;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}

.site-nav {
  display: flex;
  gap: 4px 20px;
  flex-wrap: wrap;
  padding: 8px 0;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
}

@media (hover: hover) {
  .site-nav a:hover {
    color: var(--accent-ink);
  }
}

/* Hero */
.hero {
  padding: var(--hero-pad-top) 0 var(--section-pad);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-bottom: 20px;
}

.lede {
  font-size: 1.2rem;
  max-width: 44em;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.button {
  display: inline-block;
  padding: 0.72em 1.3em;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--accent);
}

.button-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

@media (hover: hover) {
  .button:hover {
    background: var(--accent-ink);
    border-color: var(--accent-ink);
    color: #fff;
  }

  .button-secondary:hover {
    background: var(--bg-alt);
    border-color: var(--ink-soft);
    color: var(--ink);
  }
}

/* Sections */
.section {
  padding: var(--section-pad) 0;
  border-top: 1px solid var(--line);
}

.section-alt {
  background: var(--bg-alt);
}

/* One column on phones; 2 and 3 columns at the breakpoints at the end of the file */
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin-top: 28px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.card h3 {
  margin-bottom: 0.4em;
}

.card p {
  margin: 0;
  color: var(--ink-soft);
}

/* Products */
.products {
  margin: 28px 0 0;
}

.product {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

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

.product dt {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.product dd {
  margin: 0;
  color: var(--ink-soft);
}

.products + .note {
  margin-top: 16px;
}

.tag {
  font-family: var(--font-body);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
  background: var(--surface);
}

/* Contact */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin: 28px 0 8px;
}

.contact dt {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

.contact dd {
  margin: 0;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.note {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 40px;
  padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.footer-inner p {
  margin: 0 0 6px;
}

/* Simple page (404, legal pages) */
.page {
  padding: var(--section-pad) 0;
}

.page .container {
  max-width: calc(var(--content-narrow) + 2 * var(--gutter));
}

/* ---------- Responsive layout ----------
   Phones ≤600 · portrait phones ≤540 · small phones ≤480 · narrowest <320
   Grids: 2 columns from 480/640, 3 from 720/960 · large monitors 1440+ and 2200+ */

/* Phones */
@media (max-width: 600px) {
  body {
    font-size: 1rem;
  }

  .card {
    padding: 20px;
  }
}

/* Portrait phones: the nav drops below the brand as one full-width row with 44px tap targets */
@media (max-width: 540px) {
  .header-inner {
    gap: 0;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    gap: 0 8px;
    padding: 0;
    border-top: 1px solid var(--line);
  }

  .site-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
  }
}

/* Small phones: the hero buttons share the row, and each takes the full width once they wrap */
@media (max-width: 480px) {
  .hero-actions .button {
    flex: 1 1 auto;
    text-align: center;
  }
}

/* Narrowest screens (e.g. foldable cover screens): a tidy 2 × 2 nav instead of a ragged wrap */
@media (max-width: 319px) {
  .site-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* Short landscape screens (phones held sideways): tighten the vertical spacing */
@media (orientation: landscape) and (max-height: 500px) {
  :root {
    --hero-pad-top: 40px;
    --section-pad: 44px;
  }
}

/* Contact: 2 columns, then 3. In 2 columns the odd item left over spans the row. */
@media (min-width: 480px) {
  .contact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (min-width: 720px) {
  .contact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .contact > :last-child:nth-child(odd) {
    grid-column: auto;
  }
}

/* Cards: 2 columns on tablets (an odd last card spans the row instead of leaving a gap), 3 on desktop */
@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (min-width: 960px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid > :last-child:nth-child(odd) {
    grid-column: auto;
  }
}

/* Large monitors: step the whole type scale up (everything is in rem) and widen the columns to keep
   the same line length, so the page doesn't shrink to a thin strip on big screens */
@media (min-width: 1440px) {
  html {
    font-size: 106.25%;
  }

  :root {
    --content: 1120px;
    --content-narrow: 760px;
  }

  .card {
    padding: 28px;
  }
}

@media (min-width: 2200px) {
  html {
    font-size: 118.75%;
  }

  :root {
    --content: 1280px;
    --content-narrow: 860px;
  }

  .card {
    padding: 32px;
  }
}
