/* ============================================================
   Bear Land Company. Production website
   Self-contained stylesheet (tokens + layout + components).
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* Brand */
  --blue:        #5d8aa8;
  --blue-600:    #4f7892;
  --blue-700:    #436578;
  --blue-900:    #2f4a5c;
  --blue-050:    #e7eef3;
  --gold:        #eede95;
  --gold-500:    #e3d086;
  --gold-600:    #cdb965;
  --gold-050:    #fbf6e3;
  --sage:        #6d8473;
  --tan:         #b2a992;
  --brick:       #915b5b;

  /* Neutrals */
  --ink-900:     #2b2c2d;
  --ink-800:     #3a3b3c;
  --ink-700:     #4e4f50;
  --ink-500:     #6f767c;
  --ink-400:     #89939d;
  --ink-200:     #cdd3d8;
  --ink-100:     #e4e7ea;
  --ink-050:     #f1f3f4;
  --paper:       #f7f6f2;
  --white:       #ffffff;
  --offwhite:    #e9e9e9;

  /* Type */
  --font-display: 'Cinzel', Georgia, serif;
  --font-sans:    'Poppins', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, Menlo, monospace;

  /* Shadow */
  --shadow-sm:  0 1px 3px rgba(47,74,92,.10), 0 1px 2px rgba(47,74,92,.06);
  --shadow-md:  0 4px 12px rgba(47,74,92,.10), 0 2px 4px rgba(47,74,92,.06);
  --shadow-lg:  0 14px 32px rgba(47,74,92,.16), 0 4px 8px rgba(47,74,92,.06);

  --ease:       cubic-bezier(.22,.61,.36,1);
  --maxw:       1180px;
  --gutter:     32px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink-700);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; color: var(--ink-900); }

/* ---- Utility ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding: clamp(64px, 9vw, 104px) 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue-700);
}
.eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--gold-600); }
.eyebrow.on-dark { color: var(--gold); }
.eyebrow.on-dark::before { background: var(--gold); }

.display {
  font-family: var(--font-display); font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; line-height: 1.08;
}
.lede { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.7; color: var(--ink-700); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-sans); font-weight: 600; font-size: 15px; letter-spacing: .01em;
  padding: 13px 26px; border-radius: 4px; border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .12s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--gold); color: var(--blue-900); border-color: var(--gold); }
.btn-accent:hover { background: var(--gold-500); border-color: var(--gold-500); }
.btn-primary { background: var(--blue); color: var(--white); border-color: var(--blue); }
.btn-primary:hover { background: var(--blue-600); border-color: var(--blue-600); }
.btn-outline { background: transparent; color: var(--blue-700); border-color: var(--tan); }
.btn-outline:hover { background: var(--blue-050); border-color: var(--blue); }
.btn-ghost-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,.45); }
.btn-ghost-light:hover { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.8); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-lg { padding: 16px 32px; font-size: 16px; }

/* ---- Tag (speech-bubble chip) ---- */
.tag {
  display: inline-flex; align-items: center; font-size: 13px; font-weight: 500;
  padding: 7px 15px; background: var(--white); color: var(--blue-900);
  border: 1.5px solid var(--ink-900);
  border-radius: 14px 13px 15px 12px / 13px 15px 12px 14px;
  white-space: nowrap;
}
.tag.on-blue { background: rgba(255,255,255,.96); }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(93,138,168,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--blue-600);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand .mark { width: 38px; height: 38px; color: var(--gold); flex: none; }
.brand .wordmark { font-family: var(--font-display); font-weight: 600; letter-spacing: .07em; font-size: 19px; color: var(--gold); white-space: nowrap; }
.brand .wordmark small { font-family: var(--font-sans); font-weight: 400; font-size: 12px; color: var(--white); opacity: .85; margin-left: 6px; letter-spacing: 0; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { padding: 9px 14px; font-size: 14.5px; font-weight: 500; color: var(--white); text-decoration: none; border-radius: 4px; transition: color .2s; }
.nav a:hover { color: var(--gold); }
.nav .btn { margin-left: 12px; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--white); margin: 5px 0; transition: .2s; }

/* ---- Hero ---- */
.hero { background: var(--blue); color: var(--white); position: relative; overflow: hidden; }
.hero-ghost { position: absolute; right: -140px; top: 50%; transform: translateY(-50%); width: 620px; height: 620px; color: var(--white); opacity: .07; pointer-events: none; }
.hero .wrap { position: relative; padding-top: clamp(76px,10vw,128px); padding-bottom: clamp(76px,10vw,128px); }
.hero-copy { max-width: 760px; }
.hero h1 { font-family: var(--font-sans); font-weight: 300; font-size: clamp(40px, 6vw, 72px); line-height: 1.05; letter-spacing: -.01em; color: var(--white); }
.hero h1 .em { font-family: var(--font-display); font-weight: 600; letter-spacing: .03em; color: var(--gold); }
.hero p { max-width: 480px; opacity: .94; }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero .scopes { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 32px; }

/* ---- Services ---- */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 44px; }
.svc {
  background: var(--white); border: 1px solid var(--ink-100); border-radius: 12px;
  padding: 30px 26px; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.svc:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.svc .num { font-family: var(--font-mono); font-size: 12px; color: var(--blue); letter-spacing: .05em; }
.svc h3 { font-size: 21px; margin: 14px 0 6px; }
.svc .tagline { font-style: italic; color: var(--blue-700); font-size: 14.5px; margin-bottom: 18px; }
.svc ul { list-style: none; margin: 0; padding: 0; }
.svc li { position: relative; padding-left: 22px; font-size: 14.5px; color: var(--ink-700); margin-bottom: 9px; line-height: 1.5; }
.svc li::before { content: ""; position: absolute; left: 0; top: 8px; width: 9px; height: 9px; border-right: 2px solid var(--gold-600); border-bottom: 2px solid var(--gold-600); transform: rotate(-45deg); }

/* ---- Work ---- */
.section-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 18px; }
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 44px; }
.proj {
  background: var(--white); border: 1px solid var(--ink-100); border-radius: 12px; overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  text-decoration: none; color: inherit; display: block;
}
.proj:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.proj .thumb { aspect-ratio: 4 / 3; background: var(--blue); overflow: hidden; position: relative; }
.proj .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.proj:hover .thumb img { transform: scale(1.04); }
.proj .thumb.branded { display: flex; align-items: center; justify-content: center; }
.proj .thumb.branded svg { width: 96px; height: 96px; color: rgba(238,222,149,.4); }
.proj .body { padding: 20px 22px; }
.proj h3 { font-size: 18px; margin-bottom: 10px; }
.proj .meta { display: flex; gap: 16px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-400); }
.proj .meta b { color: var(--blue-700); font-weight: 500; }

/* ---- About ---- */
.about { background: var(--blue-900); color: var(--offwhite); }
.about .wrap { display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: center; }
.about-photo { border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-lg); background: var(--gold); }
.about-photo img { width: 100%; }
.about-id { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: baseline; margin-top: 18px; font-family: var(--font-mono); font-size: 13px; color: var(--gold); }
.about h2 { color: var(--white); font-size: clamp(26px, 3.4vw, 38px); }
.about .kicker { font-family: var(--font-display); font-weight: 500; letter-spacing: .04em; font-style: italic; color: var(--gold); font-size: 18px; margin: 14px 0 18px; text-transform: none; }
.about p { color: rgba(233,233,233,.88); margin: 0 0 16px; }
.about p strong { color: var(--white); }
.about .name { font-family: var(--font-display); letter-spacing: .04em; font-weight: 600; color: var(--white); font-size: 20px; }

/* ---- Writing teaser ---- */
.writing-teaser { background: var(--gold-050); }
.writing-teaser .wrap { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }

/* ---- Contact form ---- */
.contact { background: var(--gold-050); }
.contact .wrap { display: grid; grid-template-columns: .82fr 1.18fr; gap: 56px; align-items: start; }
.contact-intro .lede { color: var(--ink-700); }
.contact-meta { margin-top: 24px; font-family: var(--font-mono); font-size: 13.5px; color: var(--ink-700); line-height: 2; }
.contact-meta a { color: var(--blue-700); text-decoration: none; }
.contact-meta a:hover { color: var(--blue); }
.contact-alt { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--gold-500); }
.contact-card { background: var(--white); border: 1px solid var(--ink-100); border-radius: 12px; padding: clamp(24px,3vw,36px); box-shadow: var(--shadow-md); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-900); }
.field label .req { color: var(--brick); }
.field input, .field textarea {
  font-family: var(--font-sans); font-size: 15px; color: var(--ink-900);
  background: var(--white); border: 1.5px solid var(--ink-200); border-radius: 4px;
  width: 100%; max-width: 100%; min-width: 0;
  padding: 11px 13px; transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-050); }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-400); }
.scope-options { display: flex; flex-wrap: wrap; gap: 9px; }
.scope-chip { position: relative; cursor: pointer; }
.scope-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.scope-chip span {
  display: inline-flex; align-items: center; font-size: 13px; font-weight: 500;
  padding: 8px 16px; background: var(--white); color: var(--blue-900);
  border: 1.5px solid var(--ink-900);
  border-radius: 14px 13px 15px 12px / 13px 15px 12px 14px;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.scope-chip input:checked + span { background: var(--blue-900); color: var(--gold); }
.scope-chip input:focus-visible + span { box-shadow: 0 0 0 3px var(--blue-050); }
.form-note { font-size: 12.5px; color: var(--ink-400); margin-top: 14px; }

/* ---- Book / CTA band ---- */
.book { background: var(--blue); color: var(--white); text-align: center; }
.book h2 { color: var(--white); font-size: clamp(28px, 4vw, 44px); }
.book p { max-width: 560px; margin: 16px auto 28px; opacity: .92; font-size: 18px; }

/* ---- Footer ---- */
.site-footer { background: var(--ink-900); color: var(--offwhite); padding: 56px 0 36px; }
.site-footer .top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 32px; }
.site-footer .mark { width: 34px; height: 34px; color: var(--gold); }
.site-footer .cols { display: flex; gap: 56px; flex-wrap: wrap; }
.fcol h4 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.fcol a, .fcol span { display: block; font-size: 14px; color: var(--offwhite); opacity: .8; text-decoration: none; margin-bottom: 9px; }
.fcol a:hover { opacity: 1; color: var(--gold); }
.site-footer .legal {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 13px; opacity: .6; font-family: var(--font-mono);
}

/* ---- Writing page ---- */
.writing-hero { background: var(--blue); color: var(--white); }
.writing-hero h1 { font-family: var(--font-display); color: var(--gold); font-size: clamp(40px,6vw,72px); letter-spacing: .05em; }
.writing-hero p { max-width: 620px; margin-top: 16px; opacity: .92; font-size: 18px; }
.paper-list { display: grid; gap: 20px; margin-top: 40px; }
.paper {
  background: var(--white); border: 1px solid var(--ink-100); border-radius: 12px;
  padding: 30px; box-shadow: var(--shadow-sm); display: flex; flex-wrap: wrap;
  justify-content: space-between; align-items: center; gap: 20px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.paper:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.paper h3 { font-size: 22px; margin-bottom: 8px; }
.paper .desc { max-width: 560px; font-size: 15px; }
.paper .status { font-family: var(--font-mono); font-size: 12px; color: var(--ink-400); margin-top: 10px; }
.cat-label { font-family: var(--font-display); font-style: italic; letter-spacing: .03em; color: var(--blue-700); font-size: 22px; margin: 36px 0 4px; }

/* ---- Substack feed ---- */
.feed-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 36px 0 18px; }
.feed-head .cat-label { margin: 0; }
.feed-note { font-size: 13.5px; color: var(--ink-400); }
.feed-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.feed-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--ink-100); border-radius: 12px; padding: 24px 26px; box-shadow: var(--shadow-sm); text-decoration: none; color: inherit; transition: transform .25s var(--ease), box-shadow .25s var(--ease); min-width: 0; }
.feed-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.feed-card .date { font-family: var(--font-mono); font-size: 12px; color: var(--blue); letter-spacing: .04em; }
.feed-card h3 { font-size: 19px; line-height: 1.3; margin: 10px 0 8px; color: var(--ink-900); }
.feed-card p { font-size: 14.5px; line-height: 1.6; color: var(--ink-700); margin: 0 0 16px; }
.feed-card .more { margin-top: auto; font-size: 13.5px; font-weight: 600; color: var(--blue-700); }
.feed-card:hover .more { color: var(--blue); }
.feed-loading { font-size: 14px; color: var(--ink-400); padding: 8px 0; }
.feed-cta { margin-top: 22px; }
@media (max-width: 720px) { .feed-grid { grid-template-columns: 1fr; } }

/* ---- Work page: feature rows ---- */
.work-hero { background: var(--blue); color: var(--white); }
.work-hero h1 { font-family: var(--font-display); color: var(--gold); font-size: clamp(40px,6vw,72px); letter-spacing: .05em; }
.work-hero p { max-width: 620px; margin-top: 16px; opacity: .92; font-size: 18px; }
.feature { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding: clamp(48px,6vw,72px) 0; border-bottom: 1px solid var(--ink-100); }
.feature:last-child { border-bottom: none; }
.feature.flip .feature-media { order: 2; }
.feature-media { border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-md); border: 1px solid var(--ink-100); background: var(--ink-050); }
.feature-media img { width: 100%; display: block; }
.feature-media.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: transparent; border: none; box-shadow: none; }
.feature-media.duo img { border-radius: 10px; box-shadow: var(--shadow-sm); border: 1px solid var(--ink-100); }
.feature-media.trio { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: transparent; border: none; box-shadow: none; }
.feature-media.trio img { border-radius: 10px; box-shadow: var(--shadow-sm); border: 1px solid var(--ink-100); }
.feature-media.trio img:first-child { grid-column: 1 / -1; }
.feature .kicker { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }
.feature h2 { font-size: clamp(24px,3vw,34px); margin: 12px 0 0; }
.feature .meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 16px 0 18px; font-family: var(--font-mono); font-size: 13px; color: var(--ink-400); }
.feature .meta b { color: var(--blue-700); font-weight: 500; }
.feature p { font-size: 15.5px; line-height: 1.7; margin: 0; }

/* ---- Scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .hero-ghost { width: 440px; right: -160px; opacity: .06; }
  .svc-grid, .work-grid { grid-template-columns: repeat(2, 1fr); }
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 24px; }
  .feature.flip .feature-media { order: 0; }
  .contact .wrap { grid-template-columns: 1fr; gap: 32px; }
  .about .wrap { grid-template-columns: 1fr; gap: 32px; }
  .about-photo { max-width: 360px; }
}
@media (max-width: 720px) {
  .nav { position: fixed; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--blue); padding: 12px; gap: 4px; border-bottom: 1px solid var(--blue-600);
    transform: translateY(-130%); transition: transform .3s var(--ease); }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 12px 14px; }
  .nav .btn { margin: 6px 0 0; }
  .nav-toggle { display: block; }
  .svc-grid, .work-grid { grid-template-columns: 1fr; }
  .writing-teaser .wrap { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
