/* ------------------------------------------------------------
   Palette: "Coastal Vibes" (coolors.co)
   To try a new palette, change these five colors.
   ------------------------------------------------------------ */
:root {
  --deep:   #293241; /* text, dark sections */
  --brand:  #3D5A80; /* headings, primary */
  --soft:   #98C1D9; /* borders, path line */
  --pale:   #E0FBFC; /* page background */
  --pop:    #EE6C4D; /* progress, checks, highlights */

  --card:   #ffffff;
  --radius: 18px;
  --display: "Fraunces", Georgia, serif;
  --body: "DM Sans", system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--pale);
  color: var(--deep);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2 { font-family: var(--display); color: var(--brand); margin: 0; line-height: 1.1; }

main { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* ---------- Progress bar ---------- */
.progress {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 20px;
  background: color-mix(in srgb, var(--pale) 88%, transparent);
  backdrop-filter: blur(8px);
  font-size: 13px; color: var(--brand);
}
.progress__track { flex: 1; height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--soft) 45%, transparent); overflow: hidden; }
.progress__fill { height: 100%; width: calc(var(--p, 0) * 100%); background: var(--pop); border-radius: 99px; transition: width .15s linear; }
.progress__label { white-space: nowrap; }
.progress__pct { font-variant-numeric: tabular-nums; display: inline-block; min-width: 3.2ch; }

/* ---------- Hero ---------- */
.hero { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 90px 0 60px; }

.hero__photo {
  position: relative; width: 112px; height: 112px; border-radius: 50%;
  background: var(--brand); color: var(--pale);
  display: grid; place-items: center; overflow: hidden;
  box-shadow: 0 0 0 5px var(--pale), 0 0 0 9px var(--pop);
  margin-bottom: 28px;
}
.hero__initials { font-family: var(--display); font-size: 40px; }
.hero__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.chip {
  display: inline-block; margin: 0 0 14px;
  padding: 5px 12px; border-radius: 99px;
  background: var(--soft); color: var(--deep);
  font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}

.hero h1 { font-size: clamp(48px, 10vw, 84px); }
.hero__title { font-size: clamp(18px, 3vw, 22px); font-weight: 500; margin: 10px 0 26px; }

.meta { list-style: none; padding: 0; margin: 0 0 26px; display: flex; flex-wrap: wrap; gap: 10px; }
.meta li {
  background: var(--card); border: 2px solid var(--soft); border-radius: 12px;
  padding: 8px 14px; font-weight: 700; color: var(--brand);
}
.meta span { display: block; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--deep); opacity: .7; }

.hero__desc { max-width: 34em; margin: 0 0 30px; font-size: 18px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 24px; border-radius: 99px;
  background: var(--pop); color: #fff; text-decoration: none; font-weight: 700;
  box-shadow: 0 4px 0 var(--deep);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--deep); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--deep); }
.btn:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }

/* ---------- Learning path ---------- */
.path { position: relative; padding: 40px 0 80px; }

.path__line { position: absolute; left: 17px; top: 40px; bottom: 80px; width: 4px; border-radius: 4px; background: color-mix(in srgb, var(--soft) 55%, transparent); }
.path__line-fill { width: 100%; height: calc(var(--line, 0) * 100%); background: var(--pop); border-radius: 4px; }

.module { position: relative; display: grid; grid-template-columns: 38px 1fr; gap: 20px; margin-bottom: 32px; }

.module__check {
  position: relative; z-index: 1; width: 38px; height: 38px; margin-top: 22px; border-radius: 50%;
  background: var(--pale); border: 4px solid var(--soft);
  transition: background .3s ease, border-color .3s ease, transform .3s cubic-bezier(.3,1.6,.5,1);
}
.module__check::after {
  content: ""; position: absolute; left: 10px; top: 4px; width: 8px; height: 15px;
  border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg) scale(0);
  transition: transform .3s cubic-bezier(.3,1.6,.5,1) .05s;
}
.module.is-done .module__check { background: var(--pop); border-color: var(--pop); transform: scale(1.08); }
.module.is-done .module__check::after { transform: rotate(45deg) scale(1); }

.module__card {
  background: var(--card); border-radius: var(--radius); padding: 22px 24px;
  border: 2px solid transparent;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--deep) 8%, transparent), 0 10px 30px -18px var(--brand);
  opacity: 0; transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease, border-color .3s ease;
}
.module.is-visible .module__card { opacity: 1; transform: none; }
.module.is-done .module__card { border-color: color-mix(in srgb, var(--pop) 35%, transparent); }

.module__num { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--pop); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.module__num span { color: var(--deep); opacity: .65; letter-spacing: .02em; }
.module h2 { font-size: clamp(22px, 4vw, 27px); }
.module__org { margin: 6px 0 16px; color: var(--deep); opacity: .8; }

.module__takeaway {
  margin: 0; padding: 14px 16px; border-radius: 12px;
  background: var(--pale); border-left: 5px solid var(--pop);
  font-family: var(--display); font-size: 19px; color: var(--deep); line-height: 1.35;
}
.module__takeaway span { display: block; margin-bottom: 4px; font-family: var(--body); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }

/* ---------- Completion ---------- */
.complete { padding: 20px 0 100px; }
.complete__card {
  position: relative; text-align: center; padding: 56px 28px;
  background: var(--brand); color: var(--pale); border-radius: 28px;
  box-shadow: 0 6px 0 var(--deep);
}
.complete__card h2 { color: #fff; font-size: clamp(30px, 6vw, 44px); margin-bottom: 12px; }
.complete__card p { margin: 0 0 28px; font-size: 18px; }
.complete__card .chip { margin-bottom: 16px; }
.chip--light { background: var(--pale); color: var(--brand); }
.btn--light { background: var(--pop); }

.complete__badge {
  width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: 42px;
  background: var(--pale); box-shadow: 0 0 0 6px var(--pop);
  transform: scale(0) rotate(-30deg);
  transition: transform .6s cubic-bezier(.3,1.6,.5,1);
}
.complete.is-visible .complete__badge { transform: none; }

.footer { text-align: center; padding: 0 20px 40px; font-size: 14px; color: var(--brand); }

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  body { font-size: 16px; }
  main { padding: 0 16px; }
  .progress { padding: 10px 16px; }
  .module { grid-template-columns: 30px 1fr; gap: 12px; }
  .module__check { width: 30px; height: 30px; border-width: 3px; }
  .module__check::after { left: 8px; top: 3px; width: 7px; height: 13px; }
  .path__line { left: 13px; }
  .module__card { padding: 18px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .module__card { opacity: 1; transform: none; }
  .complete__badge { transform: none; }
}
