/* ---------------------------------------------
   jasonmatthewhowes.com — base styles
   Dark, moody, editorial. EdTech x travel-doc.
--------------------------------------------- */

:root {
  --bg: #15161b;
  --bg-alt: #1c1b24;
  --ink: #e9e7ee;
  --ink-dim: #9d9baa;
  --line: #302f3a;
  --accent: #caa6fc;
  --accent-2: #9bb4fc;
  --accent-dim: #5c4a7a;
  --max-w: 880px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  background: transparent;
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- ambient background art ----
   Fixed painting layer sitting behind all content. Very low opacity —
   present as texture, never as competition for the type. ---- */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("../assets/web/bluerose-bg.webp");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0.10;
  /* the painting is dark-on-dark; lift it so the bloom is legible at low opacity */
  filter: brightness(1.5) saturate(1.4);
  /* fade the edges so the composition drifts off rather than framing the page */
  -webkit-mask-image: radial-gradient(ellipse 120% 100% at 50% 42%, #000 35%, rgba(0, 0, 0, 0.35) 75%, transparent 100%);
  mask-image: radial-gradient(ellipse 120% 100% at 50% 42%, #000 35%, rgba(0, 0, 0, 0.35) 75%, transparent 100%);
}

/* narrow screens crop hard into the image; ease off so it reads as texture */
@media (max-width: 700px) {
  body::before { opacity: 0.08; }
}

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 0.4em;
  color: #fff;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
a:hover { border-color: var(--accent); }

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- header / nav ---- */

header.site-header {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.nav-row {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.brand {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand:hover { color: var(--accent); border: none; }

.brand-mark {
  height: 26px;
  width: auto;
  display: block;
  transition: transform 0.25s ease;
}
.brand:hover .brand-mark { transform: scale(1.06); }

nav.site-nav a {
  position: relative;
  color: var(--ink-dim);
  margin-left: 22px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: none;
  padding-bottom: 3px;
  transition: color 0.15s ease;
}
nav.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -1px;
  height: 1px;
  background: var(--accent);
  transition: right 0.25s cubic-bezier(0.2, 0.6, 0.2, 1);
}
nav.site-nav a:hover,
nav.site-nav a.active { color: var(--accent); }
nav.site-nav a:hover::after,
nav.site-nav a.active::after { right: 0; }

/* ---- hero ---- */

.hero {
  padding: 90px 0 70px;
  border-bottom: 1px solid var(--line);
}

.hero .kicker {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: var(--accent);
  background-image: linear-gradient(90deg, var(--accent-2), var(--accent), var(--accent-2));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 18px;
}

.hero p.lede {
  font-size: 1.2rem;
  color: var(--ink-dim);
  max-width: 620px;
}

/* ---- hero load-in animation (pure CSS, no JS required) ---- */

@media (prefers-reduced-motion: no-preference) {
  .hero .kicker {
    animation: hero-up 0.7s cubic-bezier(0.2, 0.6, 0.2, 1) both 0.08s,
               kicker-shimmer 7s ease-in-out infinite alternate 0.8s;
  }
  .hero h1 {
    animation: hero-up 0.8s cubic-bezier(0.2, 0.6, 0.2, 1) both 0.16s;
  }
  .hero p.lede {
    animation: hero-up 0.8s cubic-bezier(0.2, 0.6, 0.2, 1) both;
  }
  .hero p.lede:nth-of-type(1) { animation-delay: 0.24s; }
  .hero p.lede:nth-of-type(2) { animation-delay: 0.30s; }
  .hero p.lede:nth-of-type(3) { animation-delay: 0.36s; }
  .hero p.lede:nth-of-type(4) { animation-delay: 0.42s; }
  .hero .btn-row {
    animation: hero-up 0.8s cubic-bezier(0.2, 0.6, 0.2, 1) both 0.46s;
  }
}

@keyframes hero-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes kicker-shimmer {
  from { background-position: 0% center; }
  to { background-position: 100% center; }
}

/* ---- sections ---- */

section.block {
  padding: 64px 0;
  border-bottom: 1px solid var(--line);
}
section.block:last-of-type { border-bottom: none; }

.section-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--ink-dim);
  margin-bottom: 22px;
}

/* ---- link-out cards ---- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.card {
  display: block;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  padding: 22px;
  border-radius: 4px;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-3px);
}

.card h3 {
  margin-bottom: 6px;
  color: var(--ink);
}

.card p {
  color: var(--ink-dim);
  font-size: 0.92rem;
  margin-bottom: 0;
}

.card .go {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

/* ---- buttons ---- */

.btn {
  display: inline-block;
  border: 1px solid var(--accent);
  color: var(--accent) !important;
  padding: 12px 24px;
  border-radius: 3px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom-width: 1px;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover {
  background: var(--accent);
  color: var(--bg) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -6px rgba(202, 166, 252, 0.45);
}

/* ---- placeholder notice ---- */

.placeholder {
  border-left: 3px solid var(--accent-dim);
  background: var(--bg-alt);
  padding: 14px 18px;
  font-size: 0.85rem;
  color: var(--ink-dim);
  margin-bottom: 28px;
}
.placeholder strong { color: var(--ink); }

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

footer {
  padding: 40px 0 60px;
  color: var(--ink-dim);
  font-size: 0.85rem;
}

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

/* ---- misc ---- */

.quick-facts {
  list-style: none;
  padding: 0;
  margin: 0;
}
.quick-facts li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
}
.quick-facts li:last-child { border-bottom: none; }
.quick-facts .k {
  color: var(--ink-dim);
  min-width: 120px;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding-top: 3px;
}

.avatar-slot {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1 / 1;
  border: 1px dashed var(--line);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-dim);
  font-size: 0.8rem;
  text-align: center;
  margin-bottom: 30px;
}

.avatar-photo {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
  display: block;
  margin-bottom: 30px;
}

/* ---- brand/product media (logos, video) inside project blocks ---- */

.media-panel {
  background: #f4f2ee;
  border-radius: 6px;
  padding: 20px;
  max-width: 420px;
  margin-bottom: 22px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.media-panel:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px -12px rgba(0, 0, 0, 0.5);
}

.media-panel img,
.media-panel video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 3px;
}

.media-caption {
  font-size: 0.78rem;
  color: var(--ink-dim);
  margin-top: 10px;
  text-align: center;
}

/* ---- button rows ---- */

.btn-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.btn.ghost {
  border-color: var(--line);
  color: var(--ink) !important;
}
.btn.ghost:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg) !important;
}

/* ---- topic / content blocks (no link, just prose) ---- */

.topic-block {
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
}
.topic-block:last-child { border-bottom: none; }

.topic-block h3 {
  color: #fff;
}

.topic-block p {
  color: var(--ink-dim);
}
.topic-block p:last-child { margin-bottom: 0; }

.topic-block .lead-line {
  color: var(--ink);
  font-style: italic;
}

/* ---- takeaway callout ---- */

.takeaway {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 18px;
  margin: 20px 0 0;
  font-style: italic;
  color: var(--ink);
}
.takeaway .label {
  display: block;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.7rem;
  color: var(--accent);
  margin-bottom: 6px;
}

/* ---- work / project entries ---- */

.category-heading {
  margin-top: 10px;
}

.project {
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
}
.project:last-child { border-bottom: none; }

.project .lead-line {
  color: var(--ink);
  font-style: italic;
  margin-bottom: 14px;
}

.project p { color: var(--ink-dim); }

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

.form-field {
  margin-bottom: 20px;
}

.form-field label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--ink-dim);
  margin-bottom: 8px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 12px 14px;
  border-radius: 3px;
  font-family: inherit;
  font-size: 0.95rem;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent-dim);
}

.form-field textarea {
  min-height: 120px;
  resize: vertical;
}

.form-submit {
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: 12px 28px;
  border-radius: 3px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  font-family: inherit;
}
.form-submit:hover { background: var(--accent-2); }

.form-submit[disabled] {
  opacity: 0.6;
  cursor: default;
}

.fs-field-error {
  display: block;
  color: #e07a7a;
  font-size: 0.78rem;
  margin-top: 6px;
}

.fs-message {
  display: none;
  border-radius: 4px;
  padding: 14px 18px;
  font-size: 0.9rem;
  margin-bottom: 20px;
}
.fs-message:not(:empty) { display: block; }

.fs-success {
  border-left: 3px solid var(--accent-2);
  background: var(--bg-alt);
  color: var(--ink);
}

.fs-error {
  border-left: 3px solid #e07a7a;
  background: var(--bg-alt);
  color: var(--ink);
}

/* ---- scroll-reveal (progressive enhancement) ----
   .js is added by an inline script in <head>. Without it (JS disabled/blocked),
   .reveal-scroll elements render normally with no hidden state. ---- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal-scroll {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s cubic-bezier(0.2, 0.6, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
  }
  .js .reveal-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- respect reduced-motion everywhere ---- */

@media (prefers-reduced-motion: reduce) {
  .hero .kicker,
  .hero h1,
  .hero p.lede,
  .hero .btn-row,
  .js .reveal-scroll {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    background-position: 0% center !important;
  }
  .brand-mark,
  .btn,
  .card,
  .media-panel {
    transition: none !important;
  }
  .btn:hover,
  .card:hover,
  .media-panel:hover,
  .brand:hover .brand-mark {
    transform: none !important;
  }
}
