/* A living paper magazine: one reading column, muted sage, warm paper and ink. */

:root {
  color-scheme: light;
  --paper: #eeece4;
  --ink: #292d27;
  --muted: #64685e;
  --line: #6f756349;
  --lime: #d4deaf;
  --display: "AppleMyungjo", "Noto Serif KR", "Batang", "Nanum Myeongjo", Georgia, serif;
  --tint: #e3e2d6a6;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --z-sticky: 10;
  --z-intro: 30;
  --z-skip: 40;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: #d0d2c6;
  scroll-padding-top: 24px;
  scroll-padding-bottom: calc(92px + env(safe-area-inset-bottom));
}

body {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.page {
  display: flow-root;
  width: 100%;
  max-width: 400px;
  min-height: 100dvh;
  margin-inline: auto;
  padding-bottom: calc(87px + env(safe-area-inset-bottom));
  background-color: var(--paper);
  background-image: linear-gradient(#eeece4bc, #eeece4bc), url("assets/magazine-paper-v1.webp");
  background-size: auto, 320px;
}

.cover-spread {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 94px;
  align-items: start;
  gap: 14px;
  margin: 20px 24px 0;
}

.living-cover {
  min-width: 0;
  margin: 0;
  padding: 4px;
  border: 3px double #72776ca6;
}

.lecture-frame {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #d7d8cf;
}

.living-cover video, .living-cover img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
  filter: saturate(.85) contrast(.98);
}

.living-cover .lecture-still { display: none; }

.countdown {
  min-width: 0;
  margin: 0;
  padding: 0;
  text-align: right;
}

.countdown-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
}

.day-mark {
  order: -1;
  font-family: var(--display);
  font-size: 50px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -1.5px;
  color: var(--ink);
  box-shadow: inset 0 -5px var(--lime);
}

.day-mark.is-date { font-size: 30px; }
.day-mark.is-today, .day-mark.is-started { font-size: 22px; }

.count-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin-top: 8px;
}

.count-grid > span {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 7px;
}

.count-grid b {
  display: inline-block;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -1.4px;
  font-variant-numeric: tabular-nums;
}

.count-grid small {
  min-width: 20px;
  text-align: left;
  color: var(--muted);
  font-size: 10px;
}

.poster {
  padding: 40px 24px 50px;
}

h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -.6px;
}

.title-art img {
  display: block;
  width: 100%;
  height: auto;
}

.editorial-lead {
  margin: 0;
}

.subscription {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: -.4px;
  word-break: keep-all;
}

.subscription strong {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -1px;
  box-shadow: inset 0 -5px var(--lime);
  white-space: nowrap;
}

.lead-copy, .practice-copy {
  margin: 0;
  font-size: 14px;
  line-height: 1.85;
  letter-spacing: -.25px;
  word-break: keep-all;
}

.practice-copy {
  margin-top: 24px;
}

.practice-copy strong {
  font-weight: 700;
}

.event-list { margin: 0; }
.event-list > div { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: baseline; gap: 20px; padding: 19px 0; border-bottom: 1px solid var(--line); }
.event-list > div:first-child { padding-top: 0; }
.event-list > div:last-child { border-bottom: 0; padding-bottom: 0; }
.event-list dt { color: var(--muted); font-size: 12px; white-space: nowrap; }
.event-list dt::after { content: " :"; }
.event-list dd { margin: 0; font-size: clamp(12px, 3.5vw, 14px); line-height: 1.7; text-align: right; white-space: nowrap; }
.event-list strong { font-weight: 650; }
.event-note { display: inline; color: var(--muted); font-size: .85em; margin-left: 6px; }
.event-list ul { display: flex; align-items: baseline; justify-content: flex-end; gap: 5px; margin: 0; padding: 0; list-style: none; }
.event-list ul li + li::before { content: "·"; margin-right: 5px; color: var(--muted); }
.event-steps { display: inline-grid; gap: 3px; margin: 0; padding: 0; list-style: none; counter-reset: step; text-align: left; }
.event-steps li { display: flex; align-items: baseline; counter-increment: step; }
.event-steps li::before { margin-right: 6px; color: var(--muted); content: counter(step) "."; }
.stars { margin-left: auto; padding-left: 14px; letter-spacing: 1px; }
.stars i { color: var(--line); font-style: normal; }
.steps-note { display: block; margin: 4px 0 0; }
.event-worth { display: block; margin-top: 3px; font-size: .92em; }
.event-worth strong { box-shadow: inset 0 -5px var(--lime); }

/* The venue photo opens the block; the map pin sits beside the venue name. */
.venue-photo { margin: 0 0 26px; }

.venue-photo img {
  display: block;
  width: 100%;
  height: auto;
  border: 3px double var(--line);
  filter: saturate(.6);
}

.venue-photo figcaption {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.map-link {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-left: 8px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  vertical-align: middle;
  transition: background-color .2s var(--ease-out);
}

/* Widens the tap area to 44px without growing the circle. */
.map-link::after {
  position: absolute;
  inset: -9px;
  content: "";
}

.map-link:hover, .map-link:focus-visible { background: var(--lime); }

.section {
  margin-inline: 24px;
  border-top: 1px solid var(--line);
}

h2 {
  margin: 0 0 18px;
  font-family: var(--display);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.38;
  letter-spacing: -.9px;
  word-break: keep-all;
  text-wrap: balance;
}

.application {
  padding-block: 46px 16px;
  scroll-margin-top: 24px;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
}

input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 45px;
  margin-bottom: 16px;
  padding: 11px 13px;
  border: 1px solid #929887;
  border-radius: 0;
  background: #f3f2eccc;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

input::placeholder {
  color: var(--muted);
  opacity: 1;
  font-size: 13px;
}

input:disabled {
  opacity: 1;
  -webkit-text-fill-color: var(--muted);
}

.optional {
  margin-left: 5px;
  color: var(--muted);
  font-size: 11px;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 6px 0 20px;
  font-size: 12px;
  line-height: 1.7;
}

.consent input, .interest-grid input {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  min-height: 0;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--ink);
}

/* Interest topics: any number of them, two to a row. */
.interests { margin-bottom: 18px; }

.interests legend {
  margin-bottom: 8px;
  padding: 0;
  font-size: 12px;
}

.interest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.interest-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 0;
  padding: 8px 11px;
  border: 1px solid #929887;
  background: #f3f2eccc;
  font-size: 13px;
  line-height: 1.35;
  letter-spacing: -.3px;
  word-break: keep-all;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease;
}

.interest-grid input { margin: 0; }

.interest-grid label:has(input:checked) {
  border-color: var(--ink);
  background: var(--lime);
}

.interest-grid label:has(input:disabled) {
  color: var(--muted);
  cursor: not-allowed;
}

.consent small {
  color: var(--muted);
  font-size: 11px;
}

/* The submit button shares .cta (sections.css); only the form-specific parts live here. */
#application-form button {
  width: 100%;
  border-radius: 0;
  font-family: inherit;
}

#application-form button:disabled {
  border-color: #929887;
  background: transparent;
  color: var(--muted);
  cursor: not-allowed;
  transform: none;
}

.privacy {
  margin-top: 17px;
}

.privacy summary {
  padding-block: 9px;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}

.privacy dl {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.75;
}

.privacy dl > div {
  margin-bottom: 13px;
}

.privacy dt {
  color: var(--muted);
}

.privacy dd {
  margin: 3px 0 0;
}

.privacy a {
  color: inherit;
  text-underline-offset: 3px;
}

.footer {
  margin: 30px 24px 0;
  padding: 22px 0 12px;
  border-top: 3px double var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.footer p {
  margin: 0 0 3px;
}

.footer strong {
  color: var(--ink);
}

.footer .copyright {
  margin-top: calc(12px + 2 * (1.8em + 3px));
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

/* The intro overlay only exists while intro.css has taken it over. */
.intro {
  display: none;
}

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

.skip-link {
  position: fixed;
  top: 8px;
  left: -10000px;
  z-index: var(--z-skip);
  padding: 10px 16px;
  background: var(--paper);
  color: var(--ink);
}

.skip-link:focus {
  left: 8px;
}

.reveal-ready {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .55s ease, transform .55s ease;
}

.reveal-ready.is-visible {
  opacity: 1;
  transform: none;
}

@media (min-width: 640px) {
  .page {
    margin-block: 20px;
    min-height: calc(100dvh - 40px);
  }
}

@media (max-width: 350px) {
  .cover-spread { margin-inline: 22px; grid-template-columns: minmax(0, 1fr) 80px; gap: 12px; }
  .poster {
    padding-inline: 22px;
  }
  .section, .footer {
    margin-inline: 22px;
  }
  .count-grid {
    gap: 3px;
  }
  .count-grid b {
    font-size: 26px;
  }
  .day-mark { font-size: 38px; }
  .subscription {
    font-size: 16px;
  }
  .subscription strong {
    font-size: 25px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .living-cover video { display: none; }
  .living-cover .lecture-still { display: block; }
  .reveal-ready {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.footer strong { font-family: var(--display); }
.application-status, .application-success { margin: 20px 0; font-size: 14px; }
.application-success { padding: 22px 20px 12px; border: 3px double #72776ca6; }
.application-success p { margin: 0 0 12px; word-break: keep-all; }
.application-success a { display: inline-block; margin-bottom: 12px; color: var(--ink); text-underline-offset: 4px; }
#payment-account { font-weight: 650; }
.success-title { font-family: var(--display); font-size: 20px; font-weight: 600; letter-spacing: -.6px; }
#application-form button:not(:disabled) { cursor: pointer; }

.masthead { padding: 24px 24px 0; }
@media (max-width: 350px) { .masthead { padding-inline: 22px; } }
