@font-face {
  font-family: "IBM Plex Mono";
  src: url("./assets/IBMPlexMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("./assets/IBMPlexMono-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  /* LOOP's app palette lives in lib/theme/tokens.ts. */
  color-scheme: light;
  --ivory: #f6f0e6;
  --paper: #f0e7da;
  --ink: #25221f;
  --secondary: #49423b;
  --muted: #665b51;
  --rust: #9d412b;
  --deep-rust: #7e301e;
  --light-rust: #eedbd0;
  --line: #c5b8a9;
  --strong-line: #74675b;
  --green: #426040;
  --light-green: #e1e7d9;
  --white: #fffaf2;
  --gutter: clamp(1.125rem, 4.45vw, 5rem);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  background: var(--ivory);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
::selection { color: var(--white); background: var(--rust); }

h1, h2, h3, h4, p { margin: 0; }
p { line-height: 1.65; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; font: inherit; }
a { color: inherit; text-underline-offset: .25em; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

.wrap {
  width: min(calc(100% - 2 * var(--gutter)), 82rem);
  margin-inline: auto;
}

.visually-hidden, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: .75rem;
  left: var(--gutter);
  z-index: 2;
  padding: .6rem 1rem;
  background: var(--white);
}

.site-header { border-bottom: 1px solid var(--line); }

.header-inner, .footer-inner {
  min-height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand { flex: none; display: inline-block; }
.brand img { width: 6rem; }

.site-header nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .5rem clamp(1rem, 2.4vw, 2.5rem);
  font-size: .875rem;
  font-weight: 700;
}

.site-header nav > a:not(.button), .site-footer a:not(.brand) { text-decoration: none; }
.site-header nav > a:not(.button):hover, .site-footer a:not(.brand):hover { text-decoration: underline; }

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: .8rem 1.25rem;
  min-height: 3.125rem;
  max-width: 100%;
  border: 1px solid var(--rust);
  border-radius: 2px;
  background: var(--rust);
  color: var(--white);
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button:hover { background: var(--deep-rust); }
.button:focus-visible { outline-color: var(--deep-rust); }
.button-small { min-height: 2.75rem; padding: .5rem .9rem; font-size: .875rem; }
.button-outline { background: transparent; border-color: var(--strong-line); color: var(--ink); }
.button-outline:hover { background: var(--paper); }
.button-light { background: var(--ivory); border-color: var(--ivory); color: var(--deep-rust); }
.button-light:hover { background: var(--white); }
.button-inverse { background: transparent; border-color: var(--light-rust); }
.button-inverse:hover { background: var(--ivory); color: var(--deep-rust); }

.hero {
  display: grid;
  grid-template-columns: .94fr 1.06fr;
  align-items: stretch;
  gap: clamp(1.5rem, 4vw, 4.25rem);
  padding-block: 2.5rem 3rem;
}

.hero-copy {
  align-self: center;
  padding-block: 2.75rem;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: var(--rust);
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 1.2rem;
  height: .7rem;
  flex: none;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  transform: rotate(-24deg);
}

.hero h1 {
  margin-block: 1.2rem 1.55rem;
  font-size: clamp(2.5rem, 4.8vw, 5rem);
  font-weight: 700;
  line-height: 1.01;
  letter-spacing: -.087em;
}

.hero h1 em { color: var(--rust); font-style: normal; }
.hero-description { max-width: 34rem; font-size: clamp(1rem, 1.27vw, 1.1875rem); color: var(--secondary); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.9rem; }

.hero-visual {
  min-width: 0;
  align-self: center;
  background: var(--paper);
  border: 1px solid var(--strong-line);
  box-shadow: .35rem .35rem 0 var(--line);
}

.preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .25rem 1rem;
  padding: .8rem clamp(.75rem, 1.5vw, 1.3rem);
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
}

.preview-bar p { display: flex; align-items: center; gap: .6rem; font-size: .9375rem; font-weight: 700; }
.preview-bar img { width: .95rem; }
.preview-bar span { color: var(--muted); font-size: .875rem; }

.preview-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11.5rem), 1fr));
  gap: .65rem;
  padding: clamp(.65rem, 1.2vw, 1rem);
}

.preview-panel {
  min-width: 0;
  background: var(--ivory);
  border: 1px solid var(--line);
}

.preview-heading {
  padding: .75rem clamp(.55rem, 1.1vw, 1rem);
  border-bottom: 1px solid var(--line);
}

.preview-heading h2 { margin: .12rem 0; font-size: 1.125rem; letter-spacing: -.05em; }
.preview-heading p { color: var(--muted); font-size: .875rem; }
.preview-heading .preview-role { color: var(--rust); font-weight: 700; }

.preview-week {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .875rem;
}

.preview-week li {
  display: grid;
  grid-template-columns: 6ch 1fr;
  align-items: baseline;
  gap: .45rem;
  padding: .52rem clamp(.55rem, 1.1vw, 1rem);
}

.preview-week li + li { border-top: 1px solid var(--line); }
.preview-week time { color: var(--muted); font-size: .8125rem; white-space: nowrap; }
.preview-week .preview-tuesday {
  background: var(--light-rust);
  box-shadow: inset 3px 0 var(--rust);
  color: var(--deep-rust);
}

.preview-tuesday time { color: inherit; }

.preview-workout { padding: .75rem clamp(.55rem, 1.1vw, 1rem); }
.preview-workout h3 { color: var(--deep-rust); font-size: 1.0625rem; letter-spacing: -.055em; }
.preview-workout p, .preview-workout dl { font-size: .875rem; line-height: 1.45; }
.preview-workout p { margin-top: .25rem; color: var(--muted); }
.preview-workout dl { margin: .65rem 0 0; }
.preview-workout dt { padding-top: .45rem; border-top: 1px solid var(--line); font-weight: 700; }
.preview-workout dd { margin: .1rem 0 .45rem; color: var(--secondary); }
.preview-workout dd:last-child { margin-bottom: 0; }

.feature-band { border-block: 1px solid var(--line); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-grid article { padding: 1.6rem clamp(1rem, 2.5vw, 2.5rem); }
.feature-grid article:first-child { padding-left: 0; }
.feature-grid article:last-child { padding-right: 0; }
.feature-grid article + article { border-left: 1px solid var(--line); }

.feature-grid h2 { font-size: 1.0625rem; letter-spacing: -.04em; }
.feature-grid p { max-width: 26rem; margin-top: .4rem; color: var(--muted); }

.demo-section {
  background: var(--paper);
  padding-block: clamp(3.5rem, 7vw, 7rem);
}

.demo-layout {
  display: grid;
  align-items: start;
  grid-template-columns: .72fr 1.28fr;
  gap: clamp(2rem, 5vw, 5rem);
}

.demo-intro h2, .join-intro h2 {
  margin-block: 1rem 1.2rem;
  font-size: clamp(2.25rem, 4vw, 4.125rem);
  line-height: 1.08;
  letter-spacing: -.085em;
}

.demo-intro > p:not(.eyebrow) { max-width: 29rem; color: var(--secondary); }

.role-switch {
  display: inline-flex;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  border: 1px solid var(--strong-line);
}

.role-switch button {
  border: 0;
  min-height: 2.75rem;
  padding: .5rem .8rem;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  font-size: .875rem;
}

.role-switch button + button { border-left: 1px solid var(--strong-line); }
.role-switch button:hover, .week button:hover { background: var(--light-rust); }
.role-switch button[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.role-switch button:focus-visible, .week button:focus-visible { outline-color: var(--deep-rust); z-index: 1; }

.training-board {
  min-width: 0;
  background: var(--ivory);
  border: 1px solid var(--strong-line);
  box-shadow: .35rem .35rem 0 var(--line);
}

.board-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  padding: .75rem clamp(.8rem, 2.2vw, 1.6rem);
  border-bottom: 1px solid var(--line);
}

.board-top p { display: flex; align-items: center; gap: .65rem; font-size: .9375rem; font-weight: 700; }
.board-top img { width: 1rem; }
.sample-label { color: var(--muted); font-size: .875rem; }
.board-body { padding: clamp(.8rem, 2.2vw, 1.6rem); }

.board-heading, .session-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: .55rem 1rem; }
.board-heading { flex-wrap: wrap; }
.board-heading h3 { font-size: clamp(1.25rem, 2.4vw, 2rem); letter-spacing: -.075em; }
.board-heading p { margin-top: .15rem; color: var(--muted); font-size: .875rem; }

.board-badge, .session-tag {
  flex-shrink: 0;
  padding: .28rem .55rem;
  background: var(--light-green);
  color: var(--green);
  font-size: .875rem;
  font-weight: 700;
}

.week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-top: 1.15rem;
  border: 1px solid var(--line);
}

.week button {
  display: grid;
  justify-items: center;
  gap: .2rem;
  min-height: 3.45rem;
  padding: .4rem .05rem;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: .875rem;
  cursor: pointer;
  position: relative;
}

.week button + button { border-left: 1px solid var(--line); }
.week b { color: var(--ink); font-size: 1rem; }
.week button[aria-pressed="true"] { background: var(--rust); color: var(--white); }
.week button[aria-pressed="true"] b { color: inherit; }

.session {
  --session-color: var(--rust);
  --session-bg: var(--light-rust);
  margin-top: 1rem;
  padding: .9rem clamp(.6rem, 1.5vw, 1rem);
  border: 1px solid var(--line);
  border-left: 3px solid var(--session-color);
  background: var(--white);
}

.session[data-intensity="easy"] { --session-color: var(--green); --session-bg: var(--light-green); }
.session[data-intensity="rest"] { --session-color: var(--muted); --session-bg: var(--paper); }

.session h4 { margin-top: .15rem; font-size: 1.1rem; letter-spacing: -.035em; }
.session p { color: var(--muted); font-size: .875rem; }
.session-tag { background: var(--session-bg); color: var(--session-color); }

.session details { margin-top: .75rem; }
.session summary {
  width: fit-content;
  min-height: 2.25rem;
  align-content: center;
  color: var(--deep-rust);
  cursor: pointer;
  font-size: .875rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .2em;
}

.session ul { display: grid; gap: .3rem; margin: .3rem 0 0; padding-left: 1.2rem; font-size: .875rem; line-height: 1.55; }
.completion { margin-top: .6rem; display: flex; align-items: center; gap: .5rem 1rem; flex-wrap: wrap; }
.completion span { color: var(--green); font-size: .875rem; font-weight: 700; }

.join-section {
  padding-block: clamp(3rem, 6vw, 6rem);
  background: var(--deep-rust);
  color: var(--ivory);
}

.join-layout {
  display: grid;
  grid-template-columns: .72fr 1.28fr;
  gap: clamp(2rem, 5vw, 5rem);
}

.join-intro .eyebrow { color: var(--light-rust); }
.join-intro h2 { margin-bottom: 0; }

.join-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid #c28d79;
}

.join-options article {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.15rem clamp(.8rem, 2vw, 1.8rem) 0;
}

.join-options article:first-child { padding-left: 0; }
.join-options article:last-child { padding-right: 0; border-left: 1px solid #c28d79; }
.join-options h3 { font-size: 1.125rem; letter-spacing: -.045em; }
.join-options p { margin-block: .6rem 1.3rem; color: var(--white); }
.join-options .button { margin-top: auto; }
.join-options .button:focus-visible { outline-color: var(--white); }

.footer-inner { justify-content: flex-start; flex-wrap: wrap; gap: .6rem 1.5rem; padding-block: .85rem; }
.site-footer .brand { margin-right: auto; }
.site-footer .brand img { width: 4.5rem; }
.site-footer { font-size: .875rem; }

@media (max-width: 65rem) {
  .hero { grid-template-columns: 1fr 1fr; }
  .hero h1 { letter-spacing: -.085em; }
  .join-layout { grid-template-columns: .62fr 1.38fr; }
}

@media (max-width: 57rem) {
  .hero { grid-template-columns: 1fr; gap: 1.7rem; }
  .hero-copy { padding-block: 0; }
}

@media (max-width: 49rem) {
  .hero { padding-block: 2.65rem 1.65rem; }
  .hero h1 { font-size: clamp(2.5rem, 8vw, 4.5rem); }
  .demo-layout, .join-layout { grid-template-columns: 1fr; }
  .feature-grid article { padding-block: 1.25rem; }
}

@media (max-width: 36rem) {
  .header-inner { min-height: 4.5rem; }
  .site-header .brand img { width: 5rem; }
  .site-header .nav-secondary { display: none; }
  .hero-description { max-width: 30rem; }
  .hero h1 { margin-block: .95rem 1.05rem; }
  .actions { margin-top: 1.35rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-grid article { padding: .95rem 0; }
  .feature-grid article + article { border-left: 0; border-top: 1px solid var(--line); }
  .feature-grid p { margin-top: .26rem; }
  .join-options { grid-template-columns: 1fr; }
  .join-options article + article { padding: 1.15rem 0 0; margin-top: 1.4rem; border: 0; border-top: 1px solid #c28d79; }
}
