/* ============================================================
   THE LOOK OF THE PAGE
   The colours are set once here, at the top.
   Change a colour here and it changes everywhere.
   ============================================================ */

:root {
  /* The 3 main colours: off-white, near-black, and greys made from it */
  --paper: #F6F5F2;
  --white: #FFFFFF;
  --ink: #121417;
  --ink-soft: #5E636B;
  --line: #E6E3DD;
  --chip: #EFEDE8;

  /* Piste colours, used only for levels */
  --green: #2E9E5B;
  --blue: #1F6FD1;
  --red: #D7373F;
  --black: #121417;
  --yellow: #F2C200;        /* Off-piste / freeride */
  --yellow-text: #9A7400;   /* A darker yellow, readable on white */

  --font: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- Basics ---------- */

* {
  box-sizing: border-box;
}

/* Anything marked "hidden" stays hidden, whatever other styles say */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
}

h1, h2, h3, p, dl, dd {
  margin: 0;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  height: 74vh;
  min-height: 520px;
  max-height: 760px;
  background: var(--ink);   /* Shows while the photo loads, or if there's no photo */
  color: var(--white);
  overflow: hidden;
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;   /* Fill the space without stretching the photo */
  object-position: center 40%;
}

/* A dark fade over the photo so the white words are easy to read */
.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 12, 15, 0.45) 0%,
    rgba(10, 12, 15, 0) 20%,
    rgba(10, 12, 15, 0.15) 30%,
    rgba(10, 12, 15, 0.7) 45%,
    rgba(10, 12, 15, 0.88) 65%,
    rgba(10, 12, 15, 0.95) 100%
  );
}

.hero-content {
  position: relative;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);   /* Extra help reading words on bright snow */
  height: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* The school logo, rebuilt as text */
.logo {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  align-self: flex-start;
  line-height: 1;
}

.logo-top {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.logo-bottom {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.logo-star {
  width: 11px;
  height: 11px;
  fill: currentColor;
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.8;
}

.headline {
  margin-top: 8px;
  font-size: 48px;
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.story {
  margin-top: 12px;
  font-size: 18px;
  line-height: 1.4;
  opacity: 0.9;
}

/* The 3 stats in a row */
.stats {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  display: grid;
  grid-template-columns: auto auto auto;
  justify-content: space-between;
  gap: 12px;
}

.stats dt {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
}

.stats dd {
  margin-top: 2px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

/* ---------- Main page area ---------- */

.page {
  max-width: 520px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

section + section {
  margin-top: 16px;
}

.card {
  background: var(--white);
  border-radius: 20px;
  padding: 24px 22px;
  box-shadow: 0 1px 2px rgba(18, 20, 23, 0.04), 0 4px 16px rgba(18, 20, 23, 0.04);
}

.label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.section-title {
  margin: 36px 4px 14px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.big-text {
  margin-top: 8px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

/* ---------- Level up ---------- */

.level-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}

.level-name {
  margin-top: 6px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.level-count {
  font-size: 44px;
  font-weight: 800;
  line-height: 0.9;
  color: var(--level-text);
  white-space: nowrap;
}

.level-of {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink-soft);
}

/* The level card takes the colour of the client's current piste */
.level-green  { --level: var(--green);  --level-text: var(--green); }
.level-blue   { --level: var(--blue);   --level-text: var(--blue); }
.level-red    { --level: var(--red);    --level-text: var(--red); }
.level-black  { --level: var(--black);  --level-text: var(--black); }
.level-yellow { --level: var(--yellow); --level-text: var(--yellow-text); }

/* One segment per level in the current colour */
.segments {
  margin-top: 20px;
  display: flex;
  gap: 6px;
}

.segment {
  flex: 1;
  height: 12px;
  border-radius: 6px;
  background: var(--chip);
  overflow: hidden;
}

/* Each segment starts empty. Adding "filled" slides the colour in. */
.segment-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--level);
  border-radius: 6px;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.segment-fill.filled {
  width: 100%;
}

.level-notes {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 15px;
  color: var(--ink-soft);
}

.level-notes strong {
  color: var(--ink);
  font-weight: 600;
}

/* Piste journey */
.journey {
  padding-block: 20px;
}

.pistes {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  position: relative;
}

/* The thin line joining the 5 dots */
.pistes::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--line);
}

.piste {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.piste-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid var(--paper);
  box-sizing: content-box;
  margin-top: -3px;
}

.piste-green .piste-dot { background: var(--green); }
.piste-blue .piste-dot { background: var(--blue); }
.piste-red .piste-dot { background: var(--red); }
.piste-black .piste-dot { background: var(--black); }
.piste-yellow .piste-dot { background: var(--yellow); }

.piste-name {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 600;
}

.piste.ahead {
  opacity: 0.35;
}

.piste.here .piste-dot {
  box-shadow: 0 0 0 4px var(--line);
}

.piste-here {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- Kids' level card: Pip the pup ---------- */

.kid-card {
  text-align: center;
}

.kid-card .level-name {
  color: var(--level-text);
  font-size: 32px;
}

.pip {
  display: block;
  width: 100%;
  max-width: 260px;
  margin: 8px auto 0;
}

/* Gear earned today pops in, one piece after another */
.gear-new {
  transform-box: fill-box;
  transform-origin: center;
  animation: pop-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes pop-in {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.kid-card .level-notes {
  justify-content: center;
  flex-direction: column;
  align-items: center;
}

/* ---------- Off-piste safety ---------- */

.safety {
  border-left: 6px solid var(--yellow);
}

.safety-text {
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.5;
}

/* ---------- Unlocks: one tip per card ---------- */

.unlocks {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.unlock-number {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.unlock h3 {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
}

.unlock-tip {
  margin-top: 8px;
  color: var(--ink-soft);
}

.unlock-tag {
  display: inline-block;
  margin-top: 14px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--chip);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

/* ---------- Video placeholder ---------- */

.video {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  aspect-ratio: 16 / 10;
  border-radius: 20px;
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
  cursor: pointer;
}

.play {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 2px solid var(--white);
  position: relative;
}

/* The triangle inside the play button */
.play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent var(--white);
}

.video-label {
  font-size: 16px;
  font-weight: 600;
  opacity: 0.85;
}

/* ---------- Next time (dark card) ---------- */

.card-dark {
  background: var(--ink);
  color: var(--white);
}

.card-dark .label {
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- Sign-off ---------- */

.page .sign-off {
  margin-top: 40px;
  padding: 0 4px;
}

.sign-off-text {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.4;
}

.instructor {
  margin-top: 16px;
  font-size: 22px;
  font-weight: 800;
}

.instructor-role {
  font-size: 15px;
  color: var(--ink-soft);
}

/* ---------- For parents ---------- */

.page .parent-note {
  margin-top: 28px;
}

.parent-note-text {
  margin-top: 8px;
  font-size: 16px;
}

/* ---------- Buttons ---------- */

.page .buttons {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 0 20px;
  border-radius: 14px;
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button-main {
  background: var(--ink);
  color: var(--white);
}

.button:active {
  transform: scale(0.98);
}

.share-message {
  text-align: center;
  font-size: 15px;
  color: var(--ink-soft);
  min-height: 1.5em;
}

/* ---------- Client picker ---------- */

.picker {
  padding-top: calc(48px + env(safe-area-inset-top, 0px));
}

.picker-title {
  margin-top: 6px;
  font-size: 36px;
  font-weight: 800;
  line-height: 1.1;
}

.picker-message {
  margin-top: 12px;
  color: var(--red);
  font-weight: 600;
}

.picker-list {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ============================================================
   INSTRUCTOR APP (instructor.html)
   ============================================================ */

.screen-title {
  margin-top: 24px;
  font-size: 36px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.screen-subtitle {
  margin-top: 4px;
  font-size: 15px;
  color: var(--ink-soft);
}

.back {
  padding: 8px 0;
  border: 0;
  background: none;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

/* ---------- Today: lesson cards ---------- */

.lesson-list {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lesson {
  width: 100%;
  border: 0;
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 14px;
  text-align: left;
  font-family: var(--font);
  font-size: 17px;
  color: var(--ink);
  cursor: pointer;
}

.lesson:active {
  transform: scale(0.99);
}

.lesson-time strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
}

.lesson-time span {
  font-size: 14px;
  color: var(--ink-soft);
}

.lesson-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.lesson-meta {
  margin-top: 2px;
  font-size: 14px;
  color: var(--ink-soft);
}

.lesson-person {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

.level-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-green  { background: var(--green); }
.dot-blue   { background: var(--blue); }
.dot-red    { background: var(--red); }
.dot-black  { background: var(--black); }
.dot-yellow { background: var(--yellow); }

.lesson-tags {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 3px 10px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.tag-done {
  border-color: var(--green);
  background: var(--green);
  color: var(--white);
}

.lesson-arrow {
  align-self: center;
  font-size: 28px;
  color: var(--ink-soft);
}

/* ---------- Record ---------- */

.prompts {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.prompts li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: var(--white);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.prompts span {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--chip);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notes-card {
  margin-top: 16px;
  min-height: 140px;
}

.live-text {
  margin-top: 8px;
  font-size: 18px;
  line-height: 1.5;
}

.live-text.is-empty,
.interim {
  color: var(--ink-soft);
}

.notes-box {
  display: block;
  width: 100%;
  min-height: 180px;
  margin-top: 8px;
  padding: 12px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  resize: vertical;
}

.notes-box-big {
  min-height: 50vh;
  margin-top: 20px;
  background: var(--white);
}

.mic-message {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--red);
}

/* The mic area stays at the bottom of the screen */
.mic-dock {
  position: sticky;
  bottom: 0;
  margin-top: 8px;
  padding: 24px 0 calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to bottom, rgba(246, 245, 242, 0), var(--paper) 25%);
  text-align: center;
}

.lock-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--white);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s, transform 0.2s;
}

.lock-hint svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.is-listening .lock-hint {
  opacity: 1;
  transform: translateY(0);
}

.is-locked .lock-hint {
  background: var(--ink);
  color: var(--white);
}

.mic {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 12px auto 0;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  /* Stop the phone from selecting text or scrolling while you hold it */
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.mic-icon {
  width: 40px;
  height: 40px;
  fill: currentColor;
}

.stop-icon {
  display: none;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--white);
}

.is-listening .mic {
  background: var(--red);
  animation: pulse 1.4s ease-out infinite;
}

.is-locked .mic-icon {
  display: none;
}

.is-locked .stop-icon {
  display: block;
}

@keyframes pulse {
  from { box-shadow: 0 0 0 0 rgba(215, 55, 63, 0.45); }
  to   { box-shadow: 0 0 0 22px rgba(215, 55, 63, 0); }
}

.mic-help {
  margin-top: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
}

.is-typing .lock-hint,
.is-typing .mic,
.is-typing .mic-help {
  display: none;
}

.record-actions {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.text-button {
  padding: 12px 4px;
  border: 0;
  background: none;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  cursor: pointer;
}

.button-small {
  min-height: 48px;
  padding: 0 28px;
}

.button:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ---------- Check ---------- */

.check-actions {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.save-message {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
}

.save-message.is-error {
  color: var(--red);
}

/* ---------- Check: Claude's questions and the finished recap ---------- */

.question-card {
  margin-top: 12px;
}

.question-text {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.options {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option {
  min-height: 44px;
  padding: 8px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.option.is-picked {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.option-own {
  border-style: dashed;
}

.own-answer {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font-family: var(--font);
  font-size: 16px;
}

.recap-ready {
  margin-top: 16px;
}

.recap-links {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* The little spinning circle on "Creating your recap..." */
.spinner {
  display: none;
  width: 18px;
  height: 18px;
  margin-right: 10px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.is-busy .spinner {
  display: inline-block;
}

.button.is-busy:disabled {
  opacity: 0.8;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   HOMEPAGE (index.html)
   ============================================================ */

.home-hero {
  height: 88vh;
  max-height: 820px;
}

.home-hero .headline {
  font-size: 52px;
}

.button-light {
  margin-top: 24px;
  border-color: var(--white);
  background: var(--white);
  color: var(--ink);
  text-shadow: none;
}

.home-page {
  max-width: 1040px;
}

.home-video {
  aspect-ratio: 16 / 9;
}

.home-section {
  margin-top: 56px !important;
}

.home-title {
  margin-top: 8px;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

/* How it works: stacked on phones, side by side on wide screens */
.steps {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}

.step-number {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.step h3 {
  margin-top: 4px;
  font-size: 24px;
  font-weight: 800;
}

.step-text {
  margin-top: 6px;
  color: var(--ink-soft);
}

/* Screenshots and the sample recap sit in a simple phone frame */
.phone-shot,
.phone-frame {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 20px auto 0;
  border: 8px solid var(--ink);
  border-radius: 36px;
  background: var(--ink);
  box-shadow: 0 12px 40px rgba(18, 20, 23, 0.18);
}

.phone-frame {
  max-width: 360px;
  height: 720px;
  overflow: hidden;
}

.phone-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 28px;
  background: var(--paper);
}

.home-note {
  margin-top: 14px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
}

.home-note a {
  color: var(--ink);
}

.reasons {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.reason h3 {
  font-size: 20px;
  font-weight: 800;
}

.reason p {
  margin-top: 6px;
  color: var(--ink-soft);
}

.about {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

.about-body {
  flex: 1 1 260px;
}

.about-photo {
  flex: none;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
}

.about-photo-empty {
  background: var(--chip);
  border: 2px dashed var(--line);
}

.about-text {
  margin-top: 10px;
  font-size: 18px;
}

.contact {
  margin-top: 56px !important;
  text-align: center;
}

.contact .button {
  max-width: 320px;
  margin-inline: auto;
}

.contact-email {
  margin-top: 12px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
}

/* ---------- Footer ---------- */

.footer {
  padding: 8px 16px calc(32px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

/* If someone has asked their phone for less motion, skip the animation. */
@media (prefers-reduced-motion: reduce) {
  .segment-fill {
    transition: none;
  }
  .gear-new {
    animation: none;
  }
  .is-listening .mic {
    animation: none;
  }
}
