/* Strong Jon Inc — shared component styles.
   Pairs with assets/brand.js. Everything here is used on more than one page;
   page-specific styling stays in the page. */

:root {
  --sj-ink: #3D444E;
  --sj-slate: #565F6B;
  --sj-muted: #6A7280;
  --sj-line: #E2E5E9;
  --sj-salmon: #E78967;        /* fills only — white text on it is 2.6:1 */
  --sj-salmon-deep: #B45B3D;   /* text + button bg, 4.7:1 both directions */
  --sj-salmon-dk: #9E4C30;
  --sj-salmon-bg: #FDF3EF;
  --sj-cream: #E9C9A0;
  --sj-paper: #FAFAFA;
}

html { scroll-behavior: smooth; }
body { color: var(--sj-slate); background: var(--sj-paper); }

/* Headings carry the darker ink so body copy stays a step softer. */
h1, h2, h3, h4 { color: var(--sj-ink); }

/* ...except on the dark bands, where ink-on-ink would be invisible.
   Scoped to the background class so every page gets it without per-heading fixes. */
.bg-sj-ink h1, .bg-sj-ink h2, .bg-sj-ink h3, .bg-sj-ink h4,
.bg-sj-ink .sj-display { color: var(--sj-paper); }

/* ── Nav ──────────────────────────────────────────────────────────
   Dropdowns are native <details>/<summary>. No JavaScript, works with
   keyboard and screen readers for free.
   ponytail: <details> over a JS menu. Revisit only if we need hover-open. */

.sj-nav details > summary { list-style: none; cursor: pointer; }
.sj-nav details > summary::-webkit-details-marker { display: none; }

.sj-nav .sj-caret { transition: transform 0.18s ease; }
.sj-nav details[open] .sj-caret { transform: rotate(180deg); }

/* Desktop menus float; mobile menus push the page down so the panel
   never runs off a short viewport. */
@media (min-width: 768px) {
  .sj-nav .sj-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 260px;
    z-index: 50;
  }
}

/* Click anywhere outside an open desktop menu to close it. */
@media (min-width: 768px) {
  .sj-nav details[open] > summary::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 40;
    display: block;
    cursor: default;
  }
}

/* ── Links ────────────────────────────────────────────────────── */
.sj-link {
  color: var(--sj-slate);
  text-decoration: none;
  transition: color 0.15s ease;
}
.sj-link:hover { color: var(--sj-salmon-deep); }

/* ── Buttons ──────────────────────────────────────────────────── */
.sj-btn {
  display: inline-block;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 8px;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.sj-btn:active { transform: translateY(1px); }

.sj-btn-accent { background: var(--sj-salmon-deep); color: #fff; box-shadow: 0 4px 16px rgba(180,91,61,0.22); }
.sj-btn-accent:hover { background: var(--sj-salmon-dk); }

.sj-btn-ink { background: var(--sj-ink); color: var(--sj-paper); }
.sj-btn-ink:hover { background: var(--sj-slate); }

.sj-btn-outline { border: 1.5px solid var(--sj-line); color: var(--sj-ink); background: #fff; }
.sj-btn-outline:hover { border-color: var(--sj-salmon-deep); color: var(--sj-salmon-deep); }

/* ── Cards ────────────────────────────────────────────────────── */
.sj-card {
  background: #fff;
  border: 1px solid var(--sj-line);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(61,68,78,0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
a.sj-card:hover {
  box-shadow: 0 8px 30px rgba(61,68,78,0.12);
  border-color: #D6DBE1;
  transform: translateY(-2px);
}

/* ── Editorial type ───────────────────────────────────────────────
   Merriweather leads on display. Poppins drops to labels, UI, and body.
   This is what stops the site reading like a template. */

.sj-display {
  font-family: 'Merriweather', Georgia, serif;
  font-weight: 900;
  letter-spacing: -0.028em;
  line-height: 1.06;
  color: var(--sj-ink);
}

/* One display scale, four steps, ~1.4x apart. Do not add sizes between these. */
.sj-d1 { font-size: 2.4rem; }
.sj-d2 { font-size: 1.75rem; }
.sj-d3 { font-size: 1.3rem; }
@media (min-width: 768px) {
  .sj-d1 { font-size: 3.6rem; }
  .sj-d2 { font-size: 2.5rem; }
  .sj-d3 { font-size: 1.5rem; }
}

.sj-label {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* Editorial emphasis: Merriweather italic in salmon. Key phrases only. */
.sj-emph {
  font-family: 'Merriweather', Georgia, serif;
  font-style: italic;
  color: var(--sj-salmon);   /* dark sections only, at display sizes */
}

/* ── The plate-and-donut mark ─────────────────────────────────────
   Drawn in CSS so it sits inline at any size and recolors per section.
   Structural punctuation, not decoration. Set --mark-hole to the
   surrounding background. */
.sj-mark {
  display: inline-block;
  border-radius: 9999px;
  background: radial-gradient(circle at 34% 30%, #F0A58A 0%, #E78967 55%, #CC6F4F 100%);
  position: relative;
  flex-shrink: 0;
}
.sj-mark::after {
  content: '';
  position: absolute;
  inset: 34%;
  border-radius: 9999px;
  background: var(--mark-hole, var(--sj-paper));
}
.sj-mark-on-ink  { --mark-hole: #3D444E; }
.sj-mark-on-cream{ --mark-hole: #F6EADA; }

/* ── Photography ──────────────────────────────────────────────────
   Grade and grain live in CSS, never burned into the file, so the
   original stays untouched and both stay tunable.
   Put these on the wrapper; the img fills it absolutely. */
.sj-shot { position: relative; overflow: hidden; background: var(--sj-cream); }
.sj-shot > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.sj-shot::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(233,201,160,0.16) 0%, rgba(231,137,103,0.10) 55%, rgba(61,68,78,0.20) 100%);
}
.sj-shot::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.2;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

/* ── Photo frames ─────────────────────────────────────────────────
   Fixed aspect ratios so a future photo drops in without touching layout.
   Swap the <img> src, nothing else. */
.sj-photo { object-fit: cover; background: var(--sj-salmon-bg); border-radius: 14px; }
.sj-photo-portrait { aspect-ratio: 4 / 5; }
.sj-photo-square   { aspect-ratio: 1 / 1; }
.sj-photo-round    { aspect-ratio: 1 / 1; border-radius: 9999px; }

/* ── Section rhythm ───────────────────────────────────────────── */
.sj-section { padding-top: 4.5rem; padding-bottom: 4.5rem; }
@media (min-width: 768px) { .sj-section { padding-top: 6.5rem; padding-bottom: 6.5rem; } }

.sj-rule { height: 3px; width: 56px; background: var(--sj-salmon); border-radius: 2px; }

/* Respect the setting rather than animating over it. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
