/* ============================================================
   charlesdelacey.com — shared stylesheet
   Design tokens + components for all pages.
   Dark theme is the default; add class "light" to <body>
   for the softer client-facing theme.
   ============================================================ */

/* ---------- Design tokens (dark default) ---------- */
:root {
  --bg: #0b0616;
  --bg-raised: #150c26;
  --bg-card: #1b1030;
  --bg-card-hover: #251540;
  --border: rgba(168, 85, 247, 0.18);
  --border-strong: rgba(168, 85, 247, 0.35);

  --text: #ece6f7;
  --text-muted: #a89cc4;
  --text-dim: #7a6e97;

  --purple: #a855f7;
  --purple-bright: #c084fc;
  --purple-deep: #7c3aed;

  /* Apple Siri-inspired gradient */
  --siri: linear-gradient(
    90deg,
    #5ce1e6 0%,
    #7a5fff 30%,
    #b565ff 55%,
    #ff4fce 80%,
    #ff7a00 100%
  );

  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --glow-a: rgba(124, 58, 237, 0.25);
  --glow-b: rgba(255, 79, 206, 0.12);
  --nav-bg: rgba(11, 6, 22, 0.75);
  --link: var(--purple-bright);
}

/* ---------- Light theme (client-facing pages) ---------- */
body.light {
  --bg: #faf7f2;
  --bg-raised: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f6f0ff;
  --border: rgba(124, 58, 237, 0.14);
  --border-strong: rgba(124, 58, 237, 0.30);

  --text: #2b2140;
  --text-muted: #5d5378;
  --text-dim: #8a7fa8;

  --shadow: 0 10px 30px rgba(60, 30, 120, 0.08);
  --glow-a: rgba(124, 58, 237, 0.10);
  --glow-b: rgba(255, 79, 206, 0.07);
  --nav-bg: rgba(250, 247, 242, 0.8);
  --link: var(--purple-deep);
}

/* ---------- Warm theme (biography page) ----------
   Dark brown · cream/off-white · metallic gold.
   Deliberately gradient-free: gold stands alone here,
   no purple or blue anywhere on warm pages. */
body.warm {
  --bg: #1f150c;
  --bg-raised: #2a1d11;
  --bg-card: #322317;
  --bg-card-hover: #3d2c1c;
  --border: rgba(212, 175, 55, 0.20);
  --border-strong: rgba(212, 175, 55, 0.40);

  --text: #f3ecdc;
  --text-muted: #cbbfa5;
  --text-dim: #998a6e;

  --gold: #d4af37;
  --gold-bright: #e8c96a;
  --gold-deep: #a8842a;

  --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  --glow-a: rgba(212, 175, 55, 0.13);
  --glow-b: rgba(212, 175, 55, 0.06);
  --nav-bg: rgba(31, 21, 12, 0.78);
  --link: var(--gold-bright);
}
/* Ambient glow without the cyan accent of the default theme */
body.warm::before {
  background:
    radial-gradient(45% 40% at 80% 15%, var(--glow-a), transparent 62%),
    radial-gradient(38% 34% at 12% 85%, var(--glow-b), transparent 62%);
}
/* Warm pages get a breathing gold edge instead of the Siri colours —
   single colour, no gradient ring */
body.warm::after {
  background: var(--gold);
  animation: edgeBreatheSoft 7s ease-in-out infinite;
  opacity: 0.13;
}
body.warm .siri-bar { background: var(--gold); animation: none; }
body.warm .gradient-text { background: none; -webkit-background-clip: unset; background-clip: unset; color: var(--gold-bright); }
body.warm .eyebrow { color: var(--gold-bright); }
body.warm .brand-mark { background: var(--gold); box-shadow: 0 0 20px rgba(212, 175, 55, 0.45); }
body.warm .photo-frame {
  background: var(--gold);
  animation: breatheGold 7s ease-in-out infinite;
}
@keyframes breatheGold {
  0%, 100% { box-shadow: 0 0 35px rgba(212, 175, 55, 0.30); }
  50%      { box-shadow: 0 0 60px rgba(212, 175, 55, 0.50); }
}
body.warm .btn-primary { background: var(--gold-deep); color: #1c1207; }
body.warm .btn-primary:hover { background: var(--gold); color: #1c1207; }
body.warm .path-card::before,
body.warm .resource-card::before { background: var(--gold); }
body.warm .path-card .go,
body.warm .resource-card .visit,
body.warm .step-num,
body.warm footer .heart { color: var(--gold-bright); }
body.warm .note-box { border-left-color: var(--gold); }
body.warm .path-card:hover,
body.warm .resource-card:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 14px 34px rgba(212, 175, 55, 0.14);
}
body.warm input:focus,
body.warm textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
}

/* ---------- Reset-ish ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Atkinson Hyperlegible", "Inter", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--text); }

/* Ambient background glow — drifts very slowly, like slow breathing */
body::before {
  content: "";
  position: fixed;
  inset: -15%;
  background:
    radial-gradient(45% 40% at 80% 15%, var(--glow-a), transparent 62%),
    radial-gradient(38% 34% at 12% 85%, var(--glow-b), transparent 62%),
    radial-gradient(30% 28% at 50% 55%, rgba(92, 225, 230, 0.05), transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: auroraDrift 70s ease-in-out infinite alternate;
}
@keyframes auroraDrift {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50%  { transform: translate3d(2%, -1.5%, 0) rotate(1.5deg) scale(1.05); }
  100% { transform: translate3d(-2%, 1.5%, 0) rotate(-1.5deg) scale(1.02); }
}

/* ---------- Siri-style edge glow ----------
   A soft ring of the Siri colours around the outer edges of the
   viewport, slowly circling and breathing — like Siri listening.
   Pure CSS, no extra markup: lives on body::after on every page. */
@property --edge-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 30;
  background: conic-gradient(
    from var(--edge-angle, 0deg) at 50% 50%,
    #5ce1e6, #7a5fff, #b565ff, #ff4fce, #ff7a00, #ff4fce, #b565ff, #7a5fff, #5ce1e6
  );
  /* Only the outer rim shows; the middle stays fully clear.
     Two linear masks (one per axis) hug the rectangle of the
     viewport, rather than forming an oval. */
  -webkit-mask-image:
    linear-gradient(to right, #000 0, rgba(0,0,0,0.35) 4%, transparent 12%, transparent 88%, rgba(0,0,0,0.35) 96%, #000 100%),
    linear-gradient(to bottom, #000 0, rgba(0,0,0,0.35) 4%, transparent 12%, transparent 88%, rgba(0,0,0,0.35) 96%, #000 100%);
  mask-image:
    linear-gradient(to right, #000 0, rgba(0,0,0,0.35) 4%, transparent 12%, transparent 88%, rgba(0,0,0,0.35) 96%, #000 100%),
    linear-gradient(to bottom, #000 0, rgba(0,0,0,0.35) 4%, transparent 12%, transparent 88%, rgba(0,0,0,0.35) 96%, #000 100%);
  opacity: 0.3;
  animation: edgeSpin 26s linear infinite, edgeBreathe 7s ease-in-out infinite;
}
@keyframes edgeSpin {
  to { --edge-angle: 360deg; }
}
@keyframes edgeBreathe {
  0%, 100% { opacity: 0.20; }
  50%      { opacity: 0.38; }
}
@keyframes edgeBreatheSoft {
  0%, 100% { opacity: 0.08; }
  50%      { opacity: 0.18; }
}
body.light::after { opacity: 0.28; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

section {
  padding: 80px 0;
  position: relative;
  z-index: 1;
}
section + section {
  border-top: 1px solid var(--border);
  border-image: linear-gradient(90deg, transparent, var(--border-strong), transparent) 1;
}

h1, h2, h3 { font-family: "Inter", system-ui, sans-serif; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; margin: 0 0 16px; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 12px; }
h3 { font-size: 1.15rem; margin: 0 0 8px; }

.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--purple-bright);
  margin-bottom: 12px;
}
body.light .eyebrow { color: var(--purple-deep); }

.gradient-text {
  background: var(--siri);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Siri-gradient accent bar (top of page) */
.siri-bar {
  height: 3px;
  width: 100%;
  background: var(--siri);
  background-size: 200% 100%;
  animation: siriFlow 8s linear infinite;
}
@keyframes siriFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--nav-bg);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
  font-family: "Inter", sans-serif;
}
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--siri);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.45);
  flex-shrink: 0;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  font-family: "Inter", sans-serif;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }

@media (max-width: 640px) {
  .nav-links { gap: 14px; font-size: 0.9rem; }
  .brand span:last-child { display: none; } /* keep just the mark on tiny screens */
}

/* ---------- Hero ---------- */
.hero {
  padding-top: 90px;
  padding-bottom: 70px;
  position: relative;
  overflow: hidden;
}

/* Ambient artwork layer behind hero content.
   Usage: <div class="hero-art" style="background-image:url('/art/….webp')"></div>
   placed as the first child of the .hero section. Fades out toward the
   bottom so it melts into the page background. */
.hero-art {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.85;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.9) 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.9) 70%, transparent 100%);
}
body.light .hero-art { opacity: 0.9; }
.hero-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; text-align: center; }
}
.photo-frame {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  padding: 3px;
  background: var(--siri);
  margin: 0 auto;
  position: relative;
  box-shadow: 0 0 40px rgba(168, 85, 247, 0.35);
  animation: breathe 7s ease-in-out infinite;
}
/* A slow, breath-paced glow — fitting for a hypnotherapist */
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 35px rgba(168, 85, 247, 0.30); }
  50%      { box-shadow: 0 0 60px rgba(168, 85, 247, 0.50); }
}
.photo-frame .photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-raised);
}
.hero p.lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 60ch;
}
.hero .cta-row {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
@media (max-width: 760px) {
  .hero .cta-row { justify-content: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}
.btn-primary { background: var(--purple-deep); color: white; }
.btn-primary:hover { background: var(--purple); transform: translateY(-1px); color: white; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--bg-raised); color: var(--text); }

/* ---------- Section heading ---------- */
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head p { color: var(--text-muted); margin: 0; }

/* ---------- Cards: shared base ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  color: var(--text);
}

/* Subtle top-edge light + depth on all card types */
.card, .path-card, .resource-card, .info-card, .update-card {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 2px 8px rgba(0, 0, 0, 0.18);
}
body.light .card,
body.light .path-card,
body.light .resource-card,
body.light .info-card,
body.light .update-card {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), var(--shadow);
}
.path-card:hover, .resource-card:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 14px 34px rgba(124, 58, 237, 0.16);
}
body.light .path-card:hover, body.light .resource-card:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 14px 34px rgba(60, 30, 120, 0.13);
}

/* ---------- Path cards (landing page router) ---------- */
.path-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.path-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  color: var(--text);
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.path-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--siri);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.path-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
  color: var(--text);
}
.path-card:hover::before { opacity: 1; }
.path-card h3 { font-size: 1.35rem; margin-bottom: 8px; }
.path-card p { color: var(--text-muted); margin: 0 0 18px; flex-grow: 1; }
.path-card .go {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--purple-bright);
}
body.light .path-card .go { color: var(--purple-deep); }

/* ---------- Resource grid (toolkit page) ---------- */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.resource-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  position: relative;
  overflow: hidden;
}
.resource-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--siri);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.resource-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
  color: var(--text);
}
.resource-card:hover::before { opacity: 1; }
.resource-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #ffffff;
  padding: 8px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  object-fit: contain;
}
.resource-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.resource-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
  flex-grow: 1;
}
.resource-card .visit {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--purple-bright);
  font-family: "Inter", sans-serif;
  font-weight: 600;
}

/* ---------- Updates ---------- */
.update-list { display: flex; flex-direction: column; gap: 16px; }
.update-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.update-card .date {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-family: "Inter", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.update-card h3 { margin: 8px 0 10px; }
.update-card p { color: var(--text-muted); margin: 0; }

/* ---------- Info cards (client pages) ---------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.info-card h3 { margin-bottom: 8px; }
.info-card p { color: var(--text-muted); font-size: 0.97rem; margin: 0; }
.info-card .big {
  font-family: "Inter", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  background: var(--siri);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 6px;
}

/* ---------- Steps (session walkthrough) ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  position: relative;
  padding-bottom: 36px;
}
.step:last-child { padding-bottom: 0; }
.step::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 56px;
  bottom: 8px;
  width: 2px;
  background: var(--border-strong);
}
.step:last-child::before { display: none; }
.step-num {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--purple-bright);
  flex-shrink: 0;
}
body.light .step-num { color: var(--purple-deep); }
.step h3 { margin-top: 12px; }
.step p { color: var(--text-muted); margin: 0; max-width: 65ch; }

/* ---------- Prose blocks ---------- */
.prose { max-width: 68ch; }
.prose p { color: var(--text-muted); }
.prose strong { color: var(--text); }

/* ---------- Note / disclaimer box ---------- */
.note-box {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-left: 3px solid var(--purple);
  border-radius: 10px;
  padding: 18px 22px;
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 70ch;
  margin-top: 32px;
}

/* ---------- CTA band ---------- */
.cta-band {
  text-align: center;
  padding: 70px 0;
}
.cta-band p { color: var(--text-muted); max-width: 55ch; margin: 0 auto 24px; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr; }
}
form { display: flex; flex-direction: column; gap: 14px; }
label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: "Inter", sans-serif;
  font-weight: 500;
}
input, textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  color: var(--text);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  width: 100%;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.18);
}
textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: 0.85rem; color: var(--text-dim); margin-top: 6px; }

/* ---------- Footer ---------- */
footer {
  padding: 40px 0 60px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}
footer .heart { color: var(--purple-bright); }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .siri-bar { animation: none; }
  body::before { animation: none; }
  body::after { animation: none; opacity: 0.28; }
  .photo-frame { animation: none; }
  .reveal { opacity: 1; transform: none; }
  * { transition: none !important; }
}
