/* ============================================================
   maxsheahan.com shared stylesheet
   Direction 4: dark + gold. Plus Jakarta Sans throughout.
   ============================================================ */

:root {
  --bg: #0e0f0e;
  --bg-elevated: #161716;
  --bg-raised: #1c1d1c;
  --ink: #f0ede3;
  --ink-soft: rgba(240, 237, 227, 0.72);
  --ink-quiet: rgba(240, 237, 227, 0.5);
  --ink-mute: rgba(240, 237, 227, 0.35);
  --accent: #c8a64b;
  --accent-hover: #d4b35a;
  --accent-soft: rgba(200, 166, 75, 0.16);
  --line: rgba(240, 237, 227, 0.10);
  --line-strong: rgba(240, 237, 227, 0.20);
  --positive: #8fc88c;
  --concern: #d68b7d;
  --shadow-photo: 0 1px 2px rgba(0,0,0,0.4), 0 16px 40px -16px rgba(0,0,0,0.5);
  --shadow-card-hover: 0 1px 2px rgba(0,0,0,0.4), 0 20px 44px -22px rgba(0,0,0,0.7);
  --easing: cubic-bezier(0.32, 0.72, 0, 1);

  /* 8px scale */
  --s-1: 8px;
  --s-2: 16px;
  --s-3: 24px;
  --s-4: 32px;
  --s-5: 40px;
  --s-6: 48px;
  --s-8: 64px;
  --s-10: 80px;

  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--bg); }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}
.skip-link:focus {
  left: 16px; top: 16px;
  background: var(--accent); color: var(--bg);
  padding: 8px 12px; border-radius: 6px; z-index: 30;
  font-weight: 600;
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   Typography
   ============================================================ */

.eyebrow {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-size: 0.72rem;
  margin: 0;
}

/* ============================================================
   Topbar (sticky, dark, gold "Book" link)
   ============================================================ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(14, 15, 14, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.topbar-mark {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.topbar-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.875rem;
  font-weight: 500;
}
.topbar-links a {
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.3s var(--easing);
}
.topbar-links a:hover { color: var(--ink); }
.topbar-links a.book-link {
  color: var(--accent);
  font-weight: 600;
}
.topbar-links a.current { color: var(--ink); }
@media (max-width: 600px) {
  .topbar-inner { height: 52px; }
  .topbar-links { gap: 8px; font-size: 0.75rem; }
  .topbar-links a { padding: 8px 4px; }
  .topbar-mark { font-size: 0.9rem; }
}
@media (max-width: 374px) {
  .topbar-links { gap: 6px; font-size: 0.7rem; }
  .topbar-links a { padding: 8px 2px; }
  .topbar-mark { font-size: 0.82rem; }
}

/* ============================================================
   Primary CTA: gold-on-dark pill
   ============================================================ */

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.94rem;
  line-height: 1;
  min-height: 44px;
  transition: background 0.3s var(--easing), transform 0.3s var(--easing);
  cursor: pointer;
  border: 1px solid var(--accent);
}
.cta:hover { background: var(--accent-hover); transform: translateY(-1px); }
.cta:active { transform: translateY(0); }
.cta svg {
  width: 14px; height: 14px;
  stroke: currentColor; stroke-width: 2.2; fill: none;
  transition: transform 0.3s var(--easing);
}
.cta:hover svg { transform: translateX(3px); }

.cta-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: transparent;
  color: var(--ink);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94rem;
  line-height: 1;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  transition: border-color 0.3s var(--easing), background 0.3s var(--easing), transform 0.3s var(--easing);
}
.cta-ghost:hover { border-color: var(--accent); background: rgba(200, 166, 75, 0.06); transform: translateY(-1px); }
.cta-ghost svg {
  width: 14px; height: 14px;
  stroke: currentColor; stroke-width: 2.2; fill: none;
  transition: transform 0.3s var(--easing);
}
.cta-ghost:hover svg { transform: translateX(3px); }

.quietlink {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding: 10px 0 2px;
  transition: color 0.3s var(--easing), border-color 0.3s var(--easing);
}
.quietlink:hover { color: var(--ink); border-color: var(--accent); }

/* ============================================================
   Section + page-head patterns
   ============================================================ */

.section {
  padding: var(--s-6) 0;
  border-top: 1px solid var(--line);
}
@media (min-width: 900px) { .section { padding: var(--s-8) 0; } }

.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  max-width: 38ch;
  margin-bottom: var(--s-4);
}
.section-title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.18;
  letter-spacing: -0.018em;
  margin: 0;
  color: var(--ink);
}

/* page-head: used at the top of about / work / consulting / contact pages */
.page-head {
  padding: var(--s-6) 0 var(--s-4);
}
@media (min-width: 900px) { .page-head { padding: var(--s-8) 0 var(--s-5); } }
.page-eyebrow { margin-bottom: var(--s-2); }
.page-title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: clamp(2.1rem, 4.6vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 var(--s-2) 0;
  color: var(--ink);
  max-width: 22ch;
}
.page-deck {
  font-size: clamp(1.02rem, 1.7vw, 1.18rem);
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
  max-width: 56ch;
}

/* ============================================================
   Cards (work-card, generic dark surface)
   ============================================================ */

.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
}
@media (min-width: 820px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); gap: var(--s-3); }
}
.work-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.4s var(--easing), box-shadow 0.4s var(--easing), border-color 0.4s var(--easing);
}
.work-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--line-strong);
}
.work-media {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--bg-raised) 0%, var(--bg-elevated) 100%);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.work-media img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.work-media-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: var(--ink-mute);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.85rem;
  line-height: 1.4;
}
.work-content {
  padding: var(--s-3);
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.work-label {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-size: 0.68rem;
  margin: 0;
}
.work-name {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 1.32rem;
  line-height: 1.22;
  letter-spacing: -0.012em;
  margin: 0;
  color: var(--ink);
}
.work-body {
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
  flex: 1;
}
.work-footer {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.work-footer svg {
  width: 12px; height: 12px;
  stroke: currentColor; stroke-width: 2; fill: none;
  transition: transform 0.3s var(--easing);
}
.work-card:hover .work-footer svg { transform: translateX(3px); }

/* Compact card variant (text-only, no screenshot) used for next-step cards */
.compact-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: var(--s-3);
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.4s var(--easing), box-shadow 0.4s var(--easing), border-color 0.4s var(--easing);
}
.compact-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--line-strong);
}
.compact-card .work-label { font-size: 0.66rem; }
.compact-card .work-name { font-size: 1.2rem; }
.compact-card .work-body { font-size: 0.9rem; }

/* ============================================================
   Iframe cards. Live interactive demos embedded in tiles.
   ============================================================ */

.work-iframe-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
}
@media (min-width: 720px) {
  .work-iframe-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .work-iframe-grid { grid-template-columns: repeat(3, 1fr); }
}

.work-iframe-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s var(--easing), box-shadow 0.4s var(--easing), border-color 0.4s var(--easing);
}
.work-iframe-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--line-strong);
}

.work-iframe-frame {
  position: relative;
  height: 320px;
  background: linear-gradient(135deg, var(--bg-raised) 0%, var(--bg-elevated) 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
@media (max-width: 480px) {
  .work-iframe-frame { height: 240px; }
}
@media (min-width: 720px) {
  .work-iframe-frame { height: 360px; }
}
@media (min-width: 1100px) {
  .work-iframe-frame { height: 380px; }
}
.work-iframe-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--bg);
}

/* Open-full-screen affordance. Always visible, top-right. */
.work-iframe-open {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(14, 15, 14, 0.78);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s var(--easing), border-color 0.2s var(--easing);
}
.work-iframe-open:hover {
  background: rgba(14, 15, 14, 0.92);
  border-color: var(--accent);
}
.work-iframe-open svg {
  width: 12px; height: 12px;
  stroke: currentColor; stroke-width: 2; fill: none;
}

/* On touch devices, capture taps on a transparent cover so the page scrolls
   instead of the iframe trapping the gesture. The Open button stays clickable. */
@media (hover: none) and (pointer: coarse) {
  .work-iframe-open {
    padding: 10px 14px;
    font-size: 0.78rem;
  }
  .work-iframe-cover {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: transparent;
  }
}
@media (hover: hover) and (pointer: fine) {
  .work-iframe-cover { display: none; }
}

.work-iframe-content {
  padding: var(--s-3);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

/* ============================================================
   Status badges (for work page cards)
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
}
.badge-live {
  color: var(--accent);
  border-color: rgba(200, 166, 75, 0.4);
  background: rgba(200, 166, 75, 0.08);
}
.badge-dev {
  color: var(--ink-quiet);
  border-color: var(--line-strong);
}

/* ============================================================
   Bio / body prose
   ============================================================ */

.prose { max-width: 62ch; }
.prose p {
  font-size: 1.04rem;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 var(--s-2) 0;
}
.prose p:last-child { margin-bottom: 0; }
.prose strong { font-weight: 600; color: var(--ink); }
.prose em {
  font-style: italic;
  color: var(--ink);
}
.prose a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(200, 166, 75, 0.3); }
.prose a:hover { border-bottom-color: var(--accent); }

/* ============================================================
   Form base (used on /before-we-meet)
   ============================================================ */

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 var(--s-4) 0;
}
.field label {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
}
.field .help {
  font-size: 0.85rem;
  color: var(--ink-quiet);
  margin: 0;
}
.field input[type="text"],
.field input[type="email"],
.field textarea,
.field select {
  background: var(--bg-elevated);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  width: 100%;
  transition: border-color 0.3s var(--easing), background 0.3s var(--easing);
}
.field input[type="text"]:focus,
.field input[type="email"]:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-raised);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-mute); }
.field textarea {
  min-height: 120px;
  resize: vertical;
}

.choice-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.3s var(--easing), background 0.3s var(--easing);
}
.choice:hover { border-color: var(--accent); }
.choice input[type="radio"],
.choice input[type="checkbox"] {
  accent-color: var(--accent);
  margin-top: 2px;
  flex: 0 0 auto;
}
.choice span {
  font-size: 0.96rem;
  line-height: 1.5;
  color: var(--ink);
}

.field-error {
  color: var(--concern);
  font-size: 0.85rem;
  margin: 4px 0 0 0;
}

/* Mic button (Web Speech API on /before-we-meet) */
.textarea-wrap {
  position: relative;
}
.mic-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(200, 166, 75, 0.1);
  border: 1px solid rgba(200, 166, 75, 0.3);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s var(--easing), border-color 0.3s var(--easing);
}
.mic-btn:hover { background: rgba(200, 166, 75, 0.2); }
.mic-btn.listening {
  background: var(--accent);
  color: var(--bg);
  animation: micPulse 1.4s var(--easing) infinite;
}
@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200, 166, 75, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(200, 166, 75, 0); }
}
.mic-btn svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; }
.mic-status {
  font-size: 0.85rem;
  color: var(--ink-quiet);
  margin: 6px 0 0 0;
}

/* ============================================================
   Embed wrap (Calendly iframe on /book)
   ============================================================ */

.embed-wrap {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  padding: 8px;
  box-shadow: var(--shadow-card-hover);
}
.embed-wrap iframe {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: #fff;
  min-height: 720px;
}
@media (max-width: 600px) {
  .embed-wrap iframe { min-height: 560px; }
}

/* ============================================================
   Footer
   ============================================================ */

footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 28px;
  font-size: 0.8125rem;
  color: var(--ink-mute);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-nav {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
}
.footer-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.3s var(--easing);
}
.footer-nav a:hover { color: var(--ink); }

/* ============================================================
   Motion (scroll-triggered fade up)
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--easing), transform 0.5s var(--easing);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal.d1 { transition-delay: 0.05s; }
.reveal.d2 { transition-delay: 0.1s; }
.reveal.d3 { transition-delay: 0.15s; }
.reveal.d4 { transition-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

::selection { background: rgba(200, 166, 75, 0.4); color: var(--ink); }
