/* ------------------------------------------------------------
   Towpath AI — AI Productivity without Risk
   Palette taken from the course slide decks
   ------------------------------------------------------------ */

:root {
  --blue-deep: #005493;   /* headings, primary buttons */
  --blue-sky:  #3494BA;   /* accents, links */
  --teal:      #58B6C0;
  --green:     #78C878;
  --gold:      #F2B233;   /* the lightbulb; used only for tiny highlights */
  --ink:       #373545;   /* body text */
  --ink-soft:  #5f5e6b;
  --tint:      #EAF4F8;   /* pale section background */
  --line:      #D6E4EC;
  --white:     #ffffff;

  --font: "Source Sans 3", "Segoe UI", Calibri, system-ui, sans-serif;
  --wrap: 1120px;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { color: var(--blue-deep); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
a { color: var(--blue-sky); }
a:hover { color: var(--blue-deep); }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--blue-deep); color: #fff; padding: .5rem 1rem; border-radius: var(--radius);
  z-index: 100;
}
.skip-link:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: .8rem 1.5rem; border-radius: var(--radius);
  font-weight: 600; text-decoration: none; border: 2px solid transparent; cursor: pointer;
  font-family: inherit; font-size: 1rem; line-height: 1.2;
}
.btn-primary { background: var(--blue-deep); color: #fff; border-color: var(--blue-deep); }
.btn-primary:hover { background: #003f70; border-color: #003f70; color: #fff; }
.btn-ghost { color: var(--blue-deep); border-color: var(--blue-sky); background: transparent; }
.btn-ghost:hover { background: var(--tint); color: var(--blue-deep); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--blue-deep); font-weight: 700; font-size: 1.15rem; }
.brand img { height: 40px; width: auto; }
.site-nav { display: flex; gap: 1.6rem; align-items: center; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1rem; }
.site-nav a:hover { color: var(--blue-deep); }
.site-nav .nav-cta { color: var(--blue-deep); border: 2px solid var(--blue-sky); padding: .4rem .9rem; border-radius: var(--radius); }
.site-nav .nav-cta:hover { background: var(--tint); }

.nav-toggle {
  display: none; background: none; border: 0; padding: .5rem; cursor: pointer;
  flex-direction: column; gap: 5px;
}
.nav-toggle .bar { display: block; width: 24px; height: 2px; background: var(--blue-deep); }

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .9rem 1.25rem; border-top: 1px solid var(--line); }
  .site-nav .nav-cta { border: 0; border-top: 1px solid var(--line); border-radius: 0; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 4rem 0 0; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 3rem; align-items: center; padding-bottom: 6rem; }
.hero-kicker { color: var(--blue-sky); font-weight: 600; margin-bottom: .75rem; }
.hero-sub { font-size: clamp(1.3rem, 2.4vw, 1.75rem); color: var(--blue-sky); margin: -.25rem 0 1rem; font-weight: 400; }
.hero-lede { color: var(--ink-soft); font-weight: 600; letter-spacing: .01em; }
.hero-body { max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.hero-art img { width: 100%; }

.swoosh { position: absolute; left: 0; right: 0; bottom: 0; line-height: 0; pointer-events: none; }
.swoosh svg { width: 100%; height: 110px; display: block; }

@media (max-width: 860px) {
  .hero { padding-top: 2.5rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 1.5rem; padding-bottom: 5rem; }
  .hero-art { order: -1; }
}

/* ---------- Sections ---------- */
.section { padding: 5rem 0; }
.section-tint { background: var(--tint); }
.section-dark { background: var(--ink); color: #fff; }
.section-dark h2 { color: #fff; }
.section-dark a { color: #b7dcec; }
.section-head { max-width: 40em; margin-bottom: 2.5rem; }
.section-head p { color: var(--ink-soft); font-size: 1.2rem; margin: 0; }

/* Impact list — five short items, two columns on wide screens */
.impact-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 4rem; max-width: 60em;
}
.impact-list li { padding: 1.1rem 0; border-top: 1px solid var(--line); }
.impact-list h3 { margin-bottom: .25em; font-size: 1.25rem; }
.impact-list p { margin: 0; color: var(--ink-soft); }
@media (max-width: 700px) { .impact-list { grid-template-columns: 1fr; gap: 0; } }


/* Audience cards */
.audience { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.audience article { border-top: 4px solid var(--blue-sky); padding-top: 1.1rem; }
.audience article:nth-child(2) { border-top-color: var(--teal); }
.audience article:nth-child(3) { border-top-color: var(--green); }
.audience h3 { font-size: 1.2rem; margin-bottom: .4em; }
.audience p { margin: 0; color: var(--ink-soft); }
@media (max-width: 800px) { .audience { grid-template-columns: 1fr; gap: 1.5rem; } }

/* Guardrails */
.guardrails { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 3rem; }
.guardrails article { background: var(--tint); padding: 1.75rem; border-radius: var(--radius); }
.guardrails h3 { font-size: 1.2rem; margin-bottom: .4em; }
.guardrails p { margin: 0; }
@media (max-width: 800px) { .guardrails { grid-template-columns: 1fr; gap: 1.25rem; } }


/* How we help — three ordered steps */
.how-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.how-steps li { position: relative; padding-top: .5rem; }
.how-num {
  display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: var(--blue-deep); color: #fff; font-weight: 700; font-size: 1.2rem; margin-bottom: 1rem;
}
.how-steps h3 { font-size: 1.5rem; margin-bottom: .1em; }
.how-tag { color: var(--blue-sky); font-weight: 600; font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .75em; }
.how-steps p:last-child { margin: 0; color: var(--ink-soft); }
@media (max-width: 800px) { .how-steps { grid-template-columns: 1fr; gap: 2rem; } }

/* Quote band */
.quote-band { background: var(--ink); color: #fff; padding: 4.5rem 0; }
.quote-band blockquote { margin: 0 auto; max-width: 42em; text-align: center; }
.quote-band p { font-size: clamp(1.4rem, 2.8vw, 2rem); line-height: 1.35; font-weight: 400; margin-bottom: 1.25rem; }
.quote-band cite { font-style: normal; color: var(--teal); font-weight: 600; }

/* Objectives */
.objectives { list-style: none; padding: 0; margin: 0; max-width: 46em; font-size: 1.3rem; }
.objectives li { padding: .9rem 0 .9rem 2.2rem; position: relative; border-bottom: 1px solid var(--line); }
.objectives li:last-child { border-bottom: 0; }
.objectives li::before {
  content: ""; position: absolute; left: 0; top: 1.4rem;
  width: 14px; height: 14px; border-radius: 50%; background: var(--green);
}

/* Modules */
.modules { display: grid; gap: 2.5rem; }
.module { display: grid; grid-template-columns: 5rem 1fr; gap: 1.5rem; align-items: start; }
.module-num {
  font-size: 3.5rem; font-weight: 700; line-height: 1; color: var(--blue-sky);
  border-right: 3px solid var(--line); padding-right: 1rem; text-align: right;
}
.module-body h3 { font-size: 1.6rem; margin-bottom: .2em; }
.module-tag { color: var(--ink-soft); font-style: italic; margin-bottom: .75em; }
.module-body ul { margin: 0; padding-left: 1.2rem; }
.module-body li { margin-bottom: .45em; }
@media (max-width: 600px) {
  .module { grid-template-columns: 3.5rem 1fr; gap: 1rem; }
  .module-num { font-size: 2.4rem; }
}

/* Prompting teaser */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 3rem; } }

.abcd { margin: 1.5rem 0 0; }
.abcd > div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; padding: .85rem 0; border-top: 1px solid var(--line); }
.abcd dt { font-weight: 700; color: var(--blue-deep); display: flex; align-items: center; gap: .6rem; }
.abcd dt span {
  display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: var(--radius);
  background: var(--blue-deep); color: #fff; font-weight: 700;
}
.abcd dd { margin: 0; }
.abcd dd em { display: block; color: var(--ink-soft); margin-top: .2rem; }
@media (max-width: 480px) { .abcd > div { grid-template-columns: 1fr; gap: .35rem; } }

.verify { margin: 1.5rem 0 0; padding-left: 1.6rem; }
.verify li { margin-bottom: .8em; padding-left: .3rem; }
.verify li::marker { color: var(--blue-sky); font-weight: 700; }
.verify strong { color: var(--blue-deep); }

/* About */
.about { display: grid; grid-template-columns: 300px 1fr; gap: 3.5rem; align-items: start; }
.about-photo img { border-radius: var(--radius); }
.about-copy h3 { font-size: 1.15rem; margin-top: 1.4rem; margin-bottom: .25em; color: var(--blue-sky); }
@media (max-width: 760px) {
  .about { grid-template-columns: 1fr; gap: 2rem; }
  .about-photo { max-width: 240px; }
}

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: 3.5rem; align-items: start; }
.contact-copy p { color: #d7dbe3; }
.contact-alt { margin-top: 2rem; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; gap: 2.5rem; } }

.contact-form { background: #fff; color: var(--ink); padding: 2rem; border-radius: var(--radius); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; color: var(--blue-deep); }
.field input, .field textarea {
  width: 100%; font: inherit; padding: .7rem .8rem; border: 1px solid #b8c6cf; border-radius: var(--radius);
  background: #fff; color: var(--ink);
}
.field input:focus, .field textarea:focus { border-color: var(--blue-sky); outline: 3px solid rgba(52,148,186,.25); outline-offset: 0; }
.field textarea { resize: vertical; }
.hidden-field { display: none; }


/* Credits */
.section-narrow { padding-top: 3.5rem; padding-bottom: 3.5rem; border-top: 1px solid var(--line); }
.section-narrow h2 { font-size: 1.5rem; }
.section-narrow > .wrap > p { color: var(--ink-soft); max-width: 46em; }
.credits { list-style: none; padding: 0; margin: 1.5rem 0 0; max-width: 52em; font-size: 1rem; color: var(--ink-soft); }
.credits li { padding: .9rem 0; border-top: 1px solid var(--line); }
.credits strong { color: var(--ink); }


/* ---------- Guardrails page ---------- */
.page-hero { position: relative; padding: 3.5rem 0 0; overflow: hidden; }
.page-hero .wrap { padding-bottom: 5.5rem; }
.page-hero h1 { font-size: clamp(2.2rem, 4.5vw, 3.1rem); margin-bottom: .5em; }
.page-lede { max-width: 44em; font-size: 1.2rem; color: var(--ink); }

/* Starter block */
.starter { display: grid; grid-template-columns: 1fr 1.25fr; gap: 3rem; align-items: start; }
.starter h2 { margin-bottom: .4em; }
.starter-note { color: var(--ink-soft); font-size: 1rem; }
.starter-block pre {
  background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--green);
  border-radius: var(--radius); padding: 1.5rem; margin: 0 0 1rem;
  font-family: inherit; font-size: 1.02rem; line-height: 1.6; white-space: pre-wrap;
}
@media (max-width: 860px) { .starter { grid-template-columns: 1fr; gap: 1.75rem; } }

/* Tabs */
.tab-list { display: flex; flex-wrap: wrap; gap: .5rem; border-bottom: 2px solid var(--line); margin-bottom: 2rem; }
.tab-list button {
  font: inherit; font-weight: 600; font-size: 1rem; cursor: pointer;
  background: none; border: 0; border-bottom: 3px solid transparent;
  padding: .75rem 1rem; margin-bottom: -2px; color: var(--ink-soft); border-radius: var(--radius) var(--radius) 0 0;
}
.tab-list button:hover { color: var(--blue-deep); background: var(--tint); }
.tab-list button[aria-selected="true"] { color: var(--blue-deep); border-bottom-color: var(--blue-deep); }
.panel-intro { max-width: 46em; color: var(--ink-soft); margin-bottom: 2rem; }

/* Risk / prompt pairs */
.pair-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; }
.pair {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem;
  display: flex; flex-direction: column; gap: .75rem;
}
.pair h3 {
  font-size: .85rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-soft); margin: 0; font-weight: 700;
}
.pair .say {
  margin: 0; font-size: 1.1rem; line-height: 1.45; color: var(--ink);
  border-left: 4px solid var(--blue-sky); padding-left: 1rem; flex: 1;
}
.link-btn {
  align-self: flex-start; background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-size: .95rem; font-weight: 600; color: var(--blue-sky);
}
.link-btn:hover { color: var(--blue-deep); text-decoration: underline; }

/* Closing */
.closing-cta { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; }
.closing-cta h3 { margin-bottom: .4em; }
.closing-cta .btn { width: 100%; text-align: center; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 1rem);
  background: var(--ink); color: #fff; padding: .7rem 1.25rem; border-radius: var(--radius);
  font-size: .95rem; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 80;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }


/* ---------- Exercise page ---------- */
.exercise-wrap { max-width: 54em; }
.ex-steps { margin: 0 0 2.5rem; padding-left: 1.6rem; }
.ex-steps li { margin-bottom: .6em; padding-left: .3rem; }
.ex-steps li::marker { color: var(--blue-sky); font-weight: 700; }

.panel { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 2rem; }
.panel-header { background: #fff; border-bottom: 1px solid var(--line); padding: .85rem 1.25rem; font-weight: 700; color: var(--blue-deep); }
.panel-body { background: var(--tint); padding: 1.35rem; }
#promptTemplate { font-size: 1.02rem; line-height: 1.55; white-space: pre-wrap; }
#promptTemplate .placeholder { background: #FFF2C4; border-radius: 3px; padding: 0 .25em; font-weight: 600; }

.field-label { display: block; font-weight: 600; margin-bottom: .45rem; color: var(--blue-deep); }
#ideaInput {
  width: 100%; min-height: 140px; font: inherit; line-height: 1.5;
  padding: .85rem 1rem; border: 1px solid #b8c6cf; border-radius: var(--radius);
  background: #fff; color: var(--ink); resize: vertical;
}
#ideaInput:focus { border-color: var(--blue-sky); outline: 3px solid rgba(52,148,186,.25); outline-offset: 0; }

.ex-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.4rem; }
#status { font-weight: 600; font-size: .95rem; color: #137A33; opacity: 0; transition: opacity .2s; }
#status.show { opacity: 1; }
#status.error { color: #c62828; }
.preview-note { font-size: .95rem; color: var(--ink-soft); margin-top: .75rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 2.5rem 0; font-size: .95rem; color: var(--ink-soft); }
.footer-inner { display: grid; grid-template-columns: auto 1fr; gap: 2.5rem; align-items: start; }
.footer-brand img { height: 44px; width: auto; margin-bottom: .6rem; }
.footer-brand p { margin: 0; }
.footer-note { margin: 0; max-width: 60em; }
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr; gap: 1.25rem; } }
