/* Delora Studio — landing page (hero + chapters). Tokens from app.css + theme.css. */

@font-face {
  font-family: "Italiana";
  src: url("/fonts/Italiana-Regular.ttf") format("truetype");
  font-display: swap;
}

/* ScrollTrigger measures scroll positions directly; smooth CSS scrolling would fight the pin. */
html:has(body.is-home) { scroll-behavior: auto; }

/* The hero sits under the floating header. */
.is-home .site-header { position: fixed; inset: 0 0 auto; z-index: 50; }

/* ---------- hero ---------- */
.hx { position: relative; background: radial-gradient(90% 70% at 22% 30%, rgb(var(--accent-rgb) / 0.28), transparent 70%), var(--bg); overflow: clip; }
.hx-stage { position: relative; height: 100svh; min-height: 680px; max-height: 1100px; overflow: hidden; isolation: isolate; }

.hx-word {
  position: absolute; inset: auto 0 9%; z-index: 1; direction: ltr; display: flex; justify-content: center; gap: 0.01em;
  font-family: "Italiana", serif; font-size: clamp(7rem, 24vw, 24rem); line-height: 0.82; letter-spacing: 0.01em; color: transparent;
  -webkit-text-stroke: 1px rgb(var(--brand-rgb) / 0.26); user-select: none; pointer-events: none; white-space: nowrap;
}
.hx-word span { display: inline-block; will-change: transform; }

.hx-arch {
  position: absolute; z-index: 2; margin: 0; inset-block: 96px 11%; inset-inline-end: 7vw; width: min(36vw, 560px);
  border-radius: 999px 999px 28px 28px; overflow: hidden; background: var(--media-2);
  box-shadow: 0 40px 90px -40px rgb(var(--shade-rgb) / 0.65); will-change: clip-path, transform;
}
.hx-arch::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 58%, rgb(var(--shade-rgb) / 0.32)); pointer-events: none; }
.hx-arch img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; will-change: transform; }

.hx-copy { position: absolute; z-index: 3; inset-inline-start: max(5vw, calc((100vw - var(--container)) / 2)); top: 50%; translate: 0 -54%; width: min(520px, 46vw); }
.hx-copy h1 { margin: 0 0 18px; font-size: clamp(2.6rem, 5.4vw, 5rem); line-height: 1.16; font-weight: 300; letter-spacing: -0.015em; }
.hx-copy h1 .ln { display: block; overflow: hidden; padding-block: 0.08em 0.24em; margin-bottom: -0.16em; }
.hx-copy h1 .ln > span { display: block; }
.hx-copy h1 .accent-text { font-weight: 700; color: var(--cyan); background: none; -webkit-text-fill-color: currentColor; }
.hx-copy p { margin: 0 0 26px; color: var(--text-2); font-size: clamp(1rem, 1.3vw, 1.15rem); max-width: 44ch; }


.hx-reformer { position: absolute; z-index: 3; inset: auto 0 3%; width: 100%; height: auto; max-height: 120px; direction: ltr; overflow: visible; pointer-events: none; }
.hx-reformer .rail, .hx-reformer .spring { fill: none; stroke: var(--cyan); stroke-width: 2; stroke-linecap: round; }
.hx-reformer .spring { stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.hx-reformer .carriage { fill: var(--fill); }
.hx-reformer .wheel { fill: var(--surface); stroke: var(--cyan); stroke-width: 2; }

.hx-scroll { position: absolute; z-index: 4; inset-inline-start: 50%; bottom: 14px; translate: 50% 0; width: 26px; height: 40px; border: 1.5px solid var(--border-strong); border-radius: 14px; display: none; }
.hx-scroll span { position: absolute; top: 7px; inset-inline-start: 50%; translate: 50% 0; width: 3px; height: 8px; border-radius: 2px; background: var(--cyan); animation: wheel 1.8s infinite var(--ease); }
@keyframes wheel { 60% { transform: translateY(10px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }
@media (min-width: 1000px) and (min-height: 760px) { .hx-scroll { display: block; } }

@media (max-width: 860px) {
  .hx-stage { height: auto; max-height: none; min-height: 0; padding: 104px 20px 96px; display: flex; flex-direction: column; gap: 26px; }
  .hx-copy { position: relative; inset: auto; translate: none; width: auto; order: 1; text-align: start; }
  .hx-arch { position: relative; inset: auto; order: 2; width: min(100%, 420px); aspect-ratio: 4 / 5; margin-inline: auto; }
  .hx-word { inset: auto 0 62px; font-size: 27vw; -webkit-text-stroke-width: 1px; }
  .hx-reformer { bottom: 14px; }
}

/* ---------- ribbon ---------- */
.ribbon { overflow: hidden; background: var(--fill); color: var(--on-fill); padding-block: 13px; direction: ltr; }
.ribbon-track { display: flex; align-items: center; gap: 28px; width: max-content; animation: ribbon 34s linear infinite; font-size: 1.02rem; font-weight: 500; }
.ribbon i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.6; }
@keyframes ribbon { to { transform: translateX(-50%); } }

/* ---------- why ---------- */
.why-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 7vw, 96px); align-items: start; }
.why-side { position: sticky; top: calc(var(--header-h) + 40px); }
.why-side h2 { font-size: clamp(1.8rem, 3.4vw, 2.9rem); font-weight: 400; line-height: 1.3; margin: 8px 0 24px; text-wrap: balance; }
.why-list { list-style: none; margin: 0; padding: 0; }
.why-list li { display: grid; grid-template-columns: auto 1fr; gap: 26px; padding-block: 34px; border-top: 1px solid var(--border-strong); }
.why-list li:last-child { border-bottom: 1px solid var(--border-strong); }
.why-n { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 200; color: var(--cyan); line-height: 1; }
.why-list h3 { margin: 0 0 8px; font-size: 1.3rem; }
.why-list p { margin: 0; color: var(--text-2); }
@media (max-width: 860px) { .why-grid { grid-template-columns: minmax(0, 1fr); } .why-side { position: static; } }

/* ---------- classes ---------- */
.class-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.class-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 28px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); transition: transform 0.35s var(--ease), border-color 0.25s, box-shadow 0.35s var(--ease); }
.class-card:only-child { max-width: 520px; }
.class-card:hover { transform: translateY(-5px); border-color: rgb(var(--brand-rgb) / 0.4); box-shadow: var(--shadow); }
.class-card .ico { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; background: var(--cyan-soft); color: var(--cyan); }
.class-card h3 { margin: 8px 0 0; font-size: 1.3rem; }
.class-card p { margin: 0; color: var(--text-2); flex: 1; }
.class-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 14px; margin: 8px 0 0; padding: 0; color: var(--muted); font-size: 0.88rem; }
.class-facts li { display: inline-flex; align-items: center; gap: 6px; }
.class-facts .i { width: 16px; height: 16px; }
.class-go { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--cyan); font-weight: 700; }
.class-go .i { width: 18px; height: 18px; transition: transform 0.3s var(--ease); }
.class-card:hover .class-go .i { transform: translateX(-5px); }

/* ---------- weekly plan ---------- */
.plan { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 10px; align-items: start; }
.plan-day { padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.plan-day h3 { margin: 0 0 12px; font-size: 1rem; }
.plan-day ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.plan-slot { min-height: 44px; padding: 8px 12px; border-radius: 12px; background: var(--bg-2); display: grid; align-items: center; }
.plan-slot span { font-weight: 800; }
.plan-day small { color: var(--muted); font-size: 0.78rem; }

/* ---------- packages ---------- */
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; align-items: center; }
.pack { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 30px 26px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.pack.is-featured { padding-block: 42px; border-color: rgb(var(--brand-rgb) / 0.5); box-shadow: var(--shadow); }
.pack-flag { position: absolute; top: -13px; inset-inline-start: 24px; padding: 3px 14px; border-radius: 999px; background: var(--fill); color: var(--on-fill); font-size: 0.78rem; font-weight: 700; }
.pack h3 { margin: 0; font-size: 1.1rem; }
.pack p { margin: 0; }
.pack-num b { font-size: 3rem; font-weight: 300; line-height: 1.1; color: var(--cyan); }
.pack-valid { color: var(--muted); font-size: 0.9rem; }
.pack .btn { margin-top: 14px; }

/* ---------- coach & gallery ---------- */
.coach-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 80px); align-items: center; }
.coach-photo { margin: 0; border-radius: 999px 999px 24px 24px; overflow: hidden; }
.coach-photo img { width: 100%; height: 100%; object-fit: cover; }
.coach h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); font-weight: 400; margin: 6px 0 14px; }
.coach p { color: var(--text-2); white-space: pre-line; }
@media (max-width: 760px) { .coach-grid { grid-template-columns: minmax(0, 1fr); } }
.gallery { columns: 3 240px; column-gap: 12px; }
.gallery figure { margin: 0 0 12px; break-inside: avoid; border-radius: var(--radius); overflow: hidden; }
.gallery img { width: 100%; height: auto; transition: transform 0.6s var(--ease); }
.gallery figure:hover img { transform: scale(1.04); }

/* ---------- mobile booking bar ---------- */
.mobile-book { display: none; }
@media (max-width: 720px) {
  .mobile-book { display: block; position: fixed; inset: auto 0 0; z-index: 40; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgb(var(--base-rgb) / 0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--border); }
  .is-home .site-footer { padding-bottom: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  .ribbon-track, .hx-scroll span { animation: none; }
}
