/* ---------- Reset & base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

@font-face {
  font-family: 'Author';
  src: url('../assets/fonts/Author-Variable.woff2') format('woff2');
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}
/* Author has no ə/Ə — those two letters fall through to a tiny Inter subset, scaled to Author's x-height */
@font-face { font-family: 'Author Schwa'; src: url('../assets/fonts/Author-Schwa-300-s925b.woff2') format('woff2'); font-weight: 200 300; unicode-range: U+0259, U+018F; font-display: swap; }
@font-face { font-family: 'Author Schwa'; src: url('../assets/fonts/Author-Schwa-400-s925b.woff2') format('woff2'); font-weight: 400; unicode-range: U+0259, U+018F; font-display: swap; }
@font-face { font-family: 'Author Schwa'; src: url('../assets/fonts/Author-Schwa-500-s925b.woff2') format('woff2'); font-weight: 500; unicode-range: U+0259, U+018F; font-display: swap; }
@font-face { font-family: 'Author Schwa'; src: url('../assets/fonts/Author-Schwa-600-s925b.woff2') format('woff2'); font-weight: 600; unicode-range: U+0259, U+018F; font-display: swap; }
@font-face { font-family: 'Author Schwa'; src: url('../assets/fonts/Author-Schwa-800-s925b.woff2') format('woff2'); font-weight: 700 900; unicode-range: U+0259, U+018F; font-display: swap; }

:root {
  --bg: #ffffff;
  --surface-2: #f0f0f0;
  --border: #e2e2e2;
  --text: #111111;
  --muted: #888888;
  --red: #c8262f;
  --font-display: 'Anton', 'Inter', sans-serif;
  --font-body: 'Author', 'Author Schwa', 'Inter', sans-serif;
  --sidebar-w: 560px;
}

html { height: 100%; }
body.home {
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-variant-ligatures: none;
  -webkit-font-variant-ligatures: none;
}

a { color: inherit; text-decoration: none; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Entrance animations ---------- */
.reveal { opacity: 0; transform: translateY(-48px); transition: opacity 1.1s cubic-bezier(0.37, 0, 0.63, 1), transform 1.1s cubic-bezier(0.37, 0, 0.63, 1); }
.reveal.in { opacity: 1; transform: none; }
/* letter-by-letter headings: the heading itself only clips, letters do the moving */
.reveal.letters { opacity: 1; transform: none; transition: none; }
.letters .ltr { display: inline-block; opacity: 0; transform: translateX(-0.45em); transition: opacity 1.5s cubic-bezier(0.37, 0, 0.63, 1), transform 1.5s cubic-bezier(0.37, 0, 0.63, 1); }
.letters.in .ltr, .reveal.in .ltr { opacity: 1; transform: none; }
.grid .card.reveal:hover { transition-duration: 0.25s; }

/* ---------- Page ---------- */
.page {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* ---------- Sidebar ---------- */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 40px 56px 120px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.nav-link {
  font-size: 3.6rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  text-transform: uppercase;
  line-height: 0.95;
  padding: 0;
  transition: color 0.2s ease;
}
.nav-link:hover {
  color: var(--red);
}

/* ---------- Blank area ---------- */
.blank-area {
  flex: 1;
}

/* ---------- Home cover (from admin) ---------- */
.cover {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #000;
  overflow: hidden;
}
.cover:empty { display: none; }
.cover img, .cover video,
.hero img, .hero video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.home .page { position: relative; z-index: 1; }


/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .page { flex-direction: column; }
  .sidebar {
    width: 100%;
    flex: 1;
    justify-content: center;
    padding: 36px 28px;
  }
  .blank-area { display: none; }
}

/* ---------- About page ---------- */
/* Hamburger + drawer */
.menu-btn {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 30;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  mix-blend-mode: difference;
}
.menu-btn span {
  display: block;
  height: 2px;
  background: #fff;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.menu-open .menu-btn span:nth-child(1) { transform: translateY(11px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }

.drawer {
  position: fixed;
  inset: 0;
  z-index: 25;
  background: #000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 40px 56px 120px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.drawer .nav-link { color: #fff; }
.drawer .nav-link:hover { color: #999; }
.menu-open .drawer { opacity: 1; visibility: visible; }
.menu-open { overflow: hidden; }

@media (max-width: 640px) {
  .drawer { padding: 36px 28px; }
}

.hero {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #000;
  overflow: hidden;
}

.about {
  padding: 80px 40px 112px;
}
.about-head {
  text-align: left;
}
.about-name {
  font-size: clamp(2.6rem, 8vw, 5rem);
  font-weight: 400;
  line-height: 1;
}
.about-role {
  margin-top: 12px;
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--muted);
}
.about-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 64px;
  margin-top: 64px;
}
.about-heading {
  margin-bottom: 14px;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--red);
}
.about-text {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-line;
}

@media (max-width: 900px) {
  .about-cols { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 640px) {
  .about { padding: 56px 28px 80px; }
  .about-cols { margin-top: 44px; }
}

/* ---------- Academy page ---------- */
.academy-hero {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: var(--bg);
  overflow: hidden;
}
.academy-hero .hero { position: absolute; inset: 0; width: 100%; height: 100%; background: transparent; }
.academy-hero .hero:empty { display: none; }
.academy {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 900px;
  padding: 0 40px 0 120px;
}
.academy-headline {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 900px;
  white-space: pre-line;
}
.academy-text {
  margin-top: 32px;
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  font-weight: 400;
  line-height: 1.6;
  max-width: 640px;
  white-space: pre-line;
}
/* On top of a photo/video: white text with a soft shade from the left */
.has-cover .academy { color: #fff; }
.has-cover .academy-hero::before {
  content: '';
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.25) 55%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}
/* Programs */
.programs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 96px 40px 120px;
}
.program {
  display: flex;
  flex-direction: column;
  min-height: 600px;
  padding: 44px 40px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg);
}
.program-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 18px;
}
.program-text {
  font-size: 1.2rem;
  font-weight: 300;
  line-height: 1.65;
  flex: 1;
}
.program-text p + p, .program-text p + ul { margin-top: 14px; }
.program-logo { display: block; max-width: 200px; max-height: 110px; margin: 26px 0 22px; object-fit: contain; }
.program-text ul { list-style: none; padding: 0; }
.program-text li { position: relative; padding-left: 22px; font-size: 1.45rem; font-weight: 400; line-height: 1.65; }
.program-text li::before {
  content: '';
  position: absolute; left: 0; top: 0.72em;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--text);
}
.program-foot { display: flex; justify-content: flex-end; margin-top: 28px; min-height: 0; }
.program-price {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 20px;
  border: 1px solid var(--text);
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.2;
}
.program-price.is-free { background: var(--text); color: #fff; }
.program-btn {
  align-self: stretch;
  text-align: center;
  margin-top: 16px;
  padding: 17px 34px;
  border-radius: 12px;
  background: #111;
  color: #fff;
  font-size: 1.15rem;
  transition: opacity 0.2s ease;
}
.program-btn:hover { opacity: 0.85; }

/* Card colours */
.program--grey { background: var(--surface-2); border-color: var(--surface-2); }
.program--red { background: #1e293b; border-color: #1e293b; color: #fff; }
.program--black { background: #111; border-color: #111; color: #fff; }
.program--red .program-text li::before,
.program--black .program-text li::before { background: #fff; }
.program--red .program-price,
.program--black .program-price { border-color: #fff; }
.program--red .program-price.is-free,
.program--black .program-price.is-free { background: #fff; color: #111; }
.program--red .program-btn,
.program--black .program-btn { background: #fff; color: #111; }
@media (max-width: 900px) {
  .programs { grid-template-columns: 1fr; grid-auto-rows: 1fr; gap: 24px; }
  .program { padding: 44px 32px; }
}
@media (max-width: 640px) {
  .academy { padding: 0 28px; }
  .academy-text { margin-top: 20px; }
  .programs { padding: 64px 28px 80px; }
}

/* ---------- Contact page ---------- */
.contact {
  max-width: 1200px;
  padding: 120px 40px 120px 120px;
}
.contact-title {
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 56px;
}
.guest { margin-bottom: 56px; }
.guest-title {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 18px;
}
.guest-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.guest-list li { display: flex; align-items: center; gap: 14px; font-size: 1.25rem; }
.g-flag { font-size: 1.6rem; line-height: 1; }
.g-place { font-weight: 500; }
.g-dates { color: var(--muted); font-weight: 300; }

.socials {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 300px));
  gap: 16px;
  margin-bottom: 64px;
}
.socials a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  border: 1px solid var(--text);
  border-radius: 20px;
  font-size: 1.1rem;
  transition: background 0.2s ease, color 0.2s ease;
}
.socials a:hover { background: var(--text); color: #fff; }
.s-icon { display: inline-flex; width: 24px; height: 24px; flex-shrink: 0; }
.s-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.s-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.s-label { font-weight: 500; }
.s-handle { color: var(--muted); font-weight: 300; font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.socials a:hover .s-handle { color: rgba(255,255,255,0.7); }

.map { width: 100%; max-width: 616px; aspect-ratio: 16 / 10; border-radius: 20px; overflow: hidden; background: var(--surface-2); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.contact-page [hidden] { display: none !important; }

@media (max-width: 640px) {
  .contact { padding: 96px 28px 80px; }
  .socials { grid-template-columns: 1fr; }
  .map { aspect-ratio: 4 / 3; }
}

/* ---------- News page ---------- */
.news {
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 40px 120px;
}
.news-title {
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 48px;
}
.n-date { color: var(--muted); font-weight: 300; }
.n-cat {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  line-height: 1.2;
}
.n-cat:empty { display: none; }
.meta-row, .post-meta { display: flex; align-items: center; gap: 14px; font-size: 0.95rem; }

/* Featured card */
.featured {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.featured:hover { border-color: var(--text); transform: translateY(-2px); }
.featured-img {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1.91 / 1;
  background: var(--surface-2);
  overflow: hidden;
}
.featured-img img, .card-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.featured-body { padding: 32px 36px; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.featured-title {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 14px;
}

/* Other cards */
.news-cards { display: flex; flex-direction: column; gap: 16px; }
.news-card {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.news-card:hover { border-color: var(--text); transform: translateY(-2px); }
.card-thumb { position: relative; width: 100%; min-width: 0; aspect-ratio: 1.91 / 1; background: var(--surface-2); overflow: hidden; }
.card-head { font-size: 1.35rem; font-weight: 700; line-height: 1.25; margin-bottom: 12px; }
.card-info { padding: 22px 28px; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.news-empty { color: var(--muted); }
.views { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.9rem; font-weight: 300; }
.views svg { width: 18px; height: 18px; }
.featured, .news-card { position: relative; }
.featured > .views, .news-card > .views { position: absolute; right: 22px; bottom: 16px; }
.post-foot { display: flex; justify-content: flex-end; margin-top: 32px; }

/* Post modal */
.post-modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 24px; }
.post-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.6); }
.post-wrap {
  position: relative;
  width: 100%;
  max-width: 900px;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  display: flex;
}
.post {
  width: 100%;
  overflow-y: auto;
  background: var(--bg);
  border-radius: 20px;
  padding: 44px 56px 64px;
}
.post-open { overflow: hidden; }
.post-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 44px; height: 44px;
  border: 0; border-radius: 50%;
  background: var(--bg);
  font: inherit; font-size: 2rem; line-height: 1;
  color: var(--muted); cursor: pointer;
  z-index: 2;
}
.post-meta { padding-right: 52px; }
.post-close:hover { color: var(--text); }
.post-meta { margin-bottom: 18px; }
.n-link { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.lang-toggle { margin-left: auto; display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.lang-toggle button { border: 0; background: none; padding: 6px 12px; font: inherit; font-size: 0.8rem; font-weight: 500; letter-spacing: 0.06em; color: var(--muted); cursor: pointer; }
.lang-toggle button.is-on { background: #111; color: #fff; }
.lang-toggle[hidden] { display: none; }
.n-link:hover { color: var(--red); }
.post-cover { margin-bottom: 28px; }
.post-cimg { display: block; width: 100%; aspect-ratio: 1.91 / 1; object-fit: cover; border-radius: 16px; }
.post-title { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 700; line-height: 1.08; letter-spacing: -0.01em; margin-bottom: 22px; }
.post-text { font-size: 1.05rem; font-weight: 400; line-height: 1.5; max-width: 720px; }
.post-text p:first-child { text-indent: 1em; }
.post-text p + p { margin-top: 10px; }
.post-text p + ul, .post-text ul + p, .post-text img + p { margin-top: 12px; }
.post-text ul { padding-left: 20px; }
.post-text li + li { margin-top: 3px; }
.post-inline { display: block; width: auto; height: auto; max-width: 100%; max-height: 640px; border-radius: 16px; margin: 28px 0; }
.post-inline.float-left, .post-inline.float-right { width: 46%; max-height: none; margin: 4px 0 6px; }
.post-inline.float-left { float: left; margin-right: 18px; }
.post-inline.float-right { float: right; margin-left: 18px; }
.post-text img.float-left + p, .post-text img.float-right + p { margin-top: 0; }
.post-text::after { content: ''; display: block; clear: both; }
.post-gallery { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.post-gimg { display: block; height: auto; width: auto; max-width: 100%; max-height: 560px; border-radius: 16px; }
.news-page [hidden] { display: none !important; }

@media (max-width: 760px) {
  .news { padding: 96px 28px 80px; }
  .post-modal { padding: 0; align-items: stretch; }
  .post-wrap { max-width: none; max-height: none; height: 100%; }
  .post { border-radius: 0; padding: 28px 24px 48px; }
  .post-gimg, .post-inline { max-height: none; }
  .post-inline.float-left, .post-inline.float-right { float: none; width: 100%; margin: 20px 0; }
  /* meta: category and EN/AZ on one row, date under the category; × above everything in the corner */
  .post { padding-top: 48px; }
  .post-meta { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; padding-right: 0; }
  .post-meta .n-cat { grid-column: 1; grid-row: 1; justify-self: start; }
  .post-meta .n-date { grid-column: 1; grid-row: 2; }
  .post-meta .n-link { grid-column: 1; grid-row: 3; }
  .post-meta .lang-toggle { grid-column: 2; grid-row: 1; margin: 0; align-self: center; }
  .post-close { top: 10px; right: 12px; width: 28px; height: 28px; font-size: 1.35rem; background: none; border: 1px solid var(--border); border-radius: 8px; color: var(--text); }
  .lang-toggle button { padding: 5px 10px; }
  .featured { grid-template-columns: 1fr; }
  .featured-body { padding: 20px 22px 26px; }
  .featured-title { font-size: 1.4rem; }
  .news-card { grid-template-columns: 128px minmax(0, 1fr); }
  .card-thumb { aspect-ratio: auto; min-height: 100px; height: 100%; }
  .card-info { padding: 14px 44px 14px 14px; }
  .card-head { font-size: 1rem; margin-bottom: 8px; }
  .news-card .meta-row { gap: 8px; flex-wrap: wrap; font-size: 0.8rem; }
  .news-card .n-cat { padding: 4px 8px; font-size: 0.68rem; }
  .news-card > .views { right: 12px; bottom: 10px; font-size: 0.8rem; }
}

/* ---------- Portfolio page ---------- */
.portfolio-hero {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.portfolio-title {
  display: flex;
  flex-direction: column;
  font-size: clamp(3.5rem, 12vw, 9rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.02em;
}

/* ---------- Portfolio works ---------- */
.works {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 40px 96px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-bottom: 40px;
}
.filter {
  background: none;
  border: 0;
  padding: 6px 0;
  font: inherit;
  font-size: 1.05rem;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 1.5px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.filter:hover { color: var(--text); }
.filter.is-active { color: var(--text); border-bottom-color: var(--text); }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.card {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  transition: transform 0.25s ease;
}
a.card:hover { transform: translateY(-4px); }
.card[hidden] { display: none; }
.card-img {
  aspect-ratio: 3 / 4;
  background: #000;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-body {
  padding: 16px 18px 18px;
}
.card-title {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 4px;
}
.card-genre {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--muted);
}

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile: slideshow */
@media (max-width: 640px) {
  .works { padding: 16px 0 64px; }
  .filters {
    padding: 0 28px;
    margin-bottom: 28px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter { white-space: nowrap; }

  .grid {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0 28px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .grid::-webkit-scrollbar { display: none; }
  .card {
    flex: 0 0 80%;
    scroll-snap-align: center;
  }
}

/* ---------- Book now ---------- */
.portfolio-hero { flex-direction: column; gap: 28px; padding: 0 28px; }
.book-title { flex-direction: row; gap: 0.25em; }
.book-intro {
  max-width: 520px;
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--muted);
}
.book-intro:empty { display: none; }

.book {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 40px 120px;
}
.book-form { display: flex; flex-direction: column; gap: 22px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.bf-field { display: flex; flex-direction: column; gap: 8px; }
.bf-field > span { font-size: 0.9rem; color: var(--muted); }
.bf-field input, .bf-field select, .bf-field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  transition: border-color 0.2s ease;
}
.bf-field input:focus, .bf-field select:focus, .bf-field textarea:focus { outline: none; border-color: var(--text); }
.bf-field input:disabled { opacity: 0.45; }
.bf-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23111' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
.bf-field textarea { resize: vertical; line-height: 1.55; min-height: 130px; }
/* Calendar */
.cal {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}
.cal-empty { color: var(--muted); font-size: 0.95rem; text-align: center; padding: 28px 0; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 1rem; }
.cal-nav {
  width: 36px; height: 36px;
  border: 1px solid var(--border); border-radius: 8px; background: none;
  font: inherit; font-size: 1.2rem; cursor: pointer; color: var(--text);
}
.cal-nav:hover { border-color: var(--text); }
.cal-nav:disabled { opacity: 0.3; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-wd { text-align: center; font-size: 0.75rem; color: var(--muted); padding: 4px 0; }
.cal-day {
  aspect-ratio: 1;
  border: 0; border-radius: 8px;
  background: var(--surface-2);
  font: inherit; font-size: 0.95rem; color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.cal-day:hover { background: #ddd; }
.cal-day.is-out { background: none; color: #c8c8c8; cursor: default; }
.cal-day.is-full {
  background: repeating-linear-gradient(45deg, #eee 0 4px, #fff 4px 8px);
  color: #b0b0b0; text-decoration: line-through; cursor: not-allowed;
}
.cal-day.is-sel { background: #111; color: #fff; }
.cal-picked { display: flex; align-items: center; justify-content: space-between; font-size: 1rem; padding: 2px 4px; }
.cal-change { background: none; border: 0; font: inherit; font-size: 0.9rem; color: var(--muted); text-decoration: underline; cursor: pointer; }
.cal-change:hover { color: var(--text); }
.cal-legend { display: flex; gap: 18px; font-size: 0.8rem; color: var(--muted); }
.cal-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 5px; }
.lg-free { background: var(--surface-2); }
.lg-full { background: repeating-linear-gradient(45deg, #eee 0 3px, #fff 3px 6px); border: 1px solid #ddd; }
.lg-sel { background: #111; }

.bf-note { margin-top: -12px; font-size: 0.9rem; color: var(--muted); }
.bf-note:empty { display: none; }

.bf-images { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.bf-images.single { grid-template-columns: 1fr; max-width: 340px; }
.book [hidden], .academy-page [hidden] { display: none !important; }
.bf-upload { display: flex; flex-direction: column; gap: 8px; }
.bf-upload-label { font-size: 0.9rem; color: var(--muted); }
.bf-upload-label em { font-style: normal; color: var(--red); }
.bf-drop {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1px dashed #c8c8c8;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}
.bf-drop:hover { border-color: var(--text); }
.bf-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.has-file .bf-drop { border-style: solid; }

.bf-check { display: flex; align-items: center; gap: 12px; font-size: 0.95rem; cursor: pointer; }
.bf-check b { font-weight: 500; }
.bf-seminar { padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; }
.bf-seminar:has(input:checked) { border-color: var(--text); }
.bf-check input { width: 18px; height: 18px; accent-color: #111; flex-shrink: 0; }
.bf-hp { position: absolute; left: -9999px; }
.bf-error { color: var(--red); font-size: 0.95rem; }

.bf-submit {
  align-self: flex-start;
  padding: 16px 44px;
  background: #111;
  color: #fff;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: 1.05rem;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.bf-submit:hover { opacity: 0.85; }
.bf-submit:disabled { opacity: 0.5; cursor: default; }

.book-done { text-align: center; padding: 40px 0; }
.book-done h2 { font-size: 2rem; font-weight: 400; margin-bottom: 10px; }
.book-done p { color: var(--muted); }

@media (max-width: 640px) {
  .book-title { flex-direction: column; gap: 0; }
  .book { padding: 16px 28px 80px; }
  .row-2, .bf-images { grid-template-columns: 1fr; }
  .bf-submit { align-self: stretch; }
}
