/* =========================================================================
   école de ballet MK
   Design spine: the square. The school's own teaching is that the body is
   held square, the studio is square, the barre sits at a right angle or
   parallel to it, the mirror is set in an L. Every structural device here
   is a right angle, an axis, or a level — never decoration.
   ========================================================================= */

/* ---------- tokens ---------- */
:root {
    /* sampled directly out of brand-logo.png — these are the logo's own inks */
    --carmine: #b42230;
    --carmine-deep: #8c1c26;
    --rose: #cc7878;

    /* studio materials: marley floor, wall under north light */
    --ink: #1a1a1d;
    --marley: #53575e;
    --marley-soft: #8b8f96;
    --ground: #e8e9eb;
    --paper: #fafafa;
    --rule: #cfd1d5;

    --axis-w: 1px;

    --font-display: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
    --font-body: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;

    /* mobile-first type scale */
    --t-hero: clamp(1.75rem, 6.4vw, 4rem);
    --t-h1: clamp(1.5rem, 5vw, 2.5rem);
    --t-h2: clamp(1.25rem, 3.6vw, 1.75rem);
    --t-h3: clamp(1.0625rem, 2.6vw, 1.25rem);
    --t-body: clamp(0.9375rem, 2.4vw, 1.0625rem);
    --t-small: clamp(0.8125rem, 2vw, 0.875rem);
    --t-label: 0.6875rem;

    /* the axis sits this far in; everything squares to it */
    --rail: 1.25rem;
    --gutter: 1.25rem;
    --measure: 34rem;
}

@media (min-width: 48rem) {
    :root {
        --rail: 3.5rem;
        --gutter: 2.5rem;
    }
}

@media (min-width: 75rem) {
    :root {
        --rail: 6rem;
        --gutter: 4rem;
    }
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: var(--t-body);
    line-height: 1.9; /* Japanese text needs the air */
    font-feature-settings: "palt" 1; /* proportional kana metrics */
    -webkit-font-smoothing: antialiased;
}

img,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--carmine);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.25em;
}

a:hover {
    color: var(--carmine-deep);
}

:focus-visible {
    outline: 2px solid var(--carmine);
    outline-offset: 3px;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.5;
    margin: 0;
    letter-spacing: 0.02em;
}

p {
    margin: 0 0 1.4em;
}

p:last-child {
    margin-bottom: 0;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- skip link ---------- */
.skip {
    position: absolute;
    left: -999px;
    top: 0;
    z-index: 100;
    background: var(--ink);
    color: var(--paper);
    padding: 0.75em 1.25em;
}

.skip:focus {
    left: 0;
}

/* ---------- the axis ----------
   One hairline running the height of the page. Content squares to it. */
.axis {
    position: fixed;
    top: 0;
    bottom: 0;
    left: var(--rail);
    width: var(--axis-w);
    background: var(--rule);
    z-index: 1;
    pointer-events: none;
}

/* ---------- masthead ---------- */
.masthead {
    position: relative;
    z-index: 3;
    padding: 1.25rem var(--gutter) 0.5rem calc(var(--rail) + 1.25rem);
    display: flex;
    align-items: center;
    justify-content: flex-end; /* holds on the homepage, where there is no logo here */
    gap: 1rem;
}

.masthead .wordmark {
    margin-right: auto;
}

.wordmark {
    display: block;
    line-height: 0;
    flex: none;
}

/* The mark has a dancer plus two lines of script — below about 44px it turns
   to mush, so this is the floor, not a preference. */
.wordmark img {
    width: auto;
    height: clamp(2.75rem, 11vw, 3.5rem);
}

.wordmark:hover img {
    opacity: 0.82;
}

/* nav toggle — mobile only */
.nav-toggle {
    appearance: none;
    border: 1px solid var(--rule);
    background: transparent;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: var(--t-label);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 0.7em 1em;
    cursor: pointer;
    border-radius: 0;
}

.nav-toggle:hover {
    border-color: var(--carmine);
    color: var(--carmine);
}

.nav {
    display: none;
}

.nav.is-open {
    display: block;
    position: absolute;
    top: 100%;
    left: var(--rail);
    right: var(--gutter);
    background: var(--paper);
    border: 1px solid var(--rule);
    border-left: 2px solid var(--carmine);
    padding: 0.5rem 0;
}

.nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav a {
    display: block;
    padding: 0.85em 1.5em;
    color: var(--ink);
    text-decoration: none;
    font-size: var(--t-small);
    letter-spacing: 0.06em;
}

.nav a:hover,
.nav a[aria-current="page"] {
    color: var(--carmine);
    background: var(--ground);
}

@media (min-width: 56rem) {
    .nav-toggle {
        display: none;
    }

    .nav,
    .nav.is-open {
        display: block;
        position: static;
        background: none;
        border: 0;
        padding: 0;
    }

    .nav ul {
        display: flex;
        gap: clamp(1rem, 2.4vw, 2rem);
    }

    .nav a {
        padding: 0.25em 0;
        font-size: var(--t-small);
    }

    .nav a:hover,
    .nav a[aria-current="page"] {
        background: none;
        box-shadow: inset 0 -1px 0 var(--carmine);
    }
}

/* ---------- page shell ---------- */
.shell {
    position: relative;
    z-index: 2;
    padding-left: calc(var(--rail) + 1.25rem);
    padding-right: var(--gutter);
}

.measure {
    max-width: var(--measure);
}

/* ---------- hero ----------
   The signature: a plumb line and a level line that draw themselves into a
   cross in a band of their own above the mark. They square the page; they
   never overlap the logo or the text. */
.hero {
    position: relative;
    padding: 0 0 clamp(3rem, 10vh, 6rem);
}

/* Its own band at the top of the hero — not an overlay on anything. */
.hero-frame {
    display: block;
    width: 100%;
    height: clamp(2.75rem, 6vh, 4rem);
    margin-bottom: clamp(2.25rem, 7vh, 3.5rem);
    pointer-events: none;
    overflow: visible;
}

.hero-frame line {
    stroke: var(--rose);
    stroke-width: 1;
    opacity: 0.55;
}

/* The mark is the hero on the homepage, so it gets clear space on both
   sides — the cross above it, the statement below. */
.hero-logo {
    position: relative;
    z-index: 1;
    width: min(26rem, 74vw);
    margin: 0 0 clamp(2.25rem, 7vh, 3.5rem);
}

.hero-statement {
    position: relative;
    padding-top: clamp(0.5rem, 2vh, 1rem);
}

.hero-eyebrow {
    font-family: var(--font-body);
    font-size: var(--t-label);
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--marley-soft);
    margin: 0 0 clamp(1rem, 3vh, 1.5rem);
}

.hero-thesis {
    position: relative;
    font-family: var(--font-display);
    font-size: var(--t-hero);
    font-weight: 400;
    line-height: 1.7;
    letter-spacing: 0.04em;
    max-width: 22em;
    margin: 0;
    text-indent: -0.4em; /* hang the opening 「 */
}

.hero-thesis .accent {
    color: var(--carmine);
}

.hero-attrib {
    margin: clamp(1.75rem, 5vh, 2.75rem) 0 0;
    font-size: var(--t-small);
    color: var(--marley);
    letter-spacing: 0.08em;
}

.hero-attrib strong {
    font-weight: 500;
    color: var(--ink);
}

/* ---------- section ----------
   Right-angle mark, not a number. The content is not a sequence. */
.section {
    padding: clamp(2.75rem, 9vh, 5rem) 0;
    border-top: 1px solid var(--rule);
}

.section-head {
    margin: 0 0 clamp(1.5rem, 4vh, 2.25rem);
}

.section-label {
    display: flex;
    align-items: center;
    gap: 0.75em;
    font-family: var(--font-body);
    font-size: var(--t-label);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--marley-soft);
    margin: 0 0 0.9em;
}

.section-label::before {
    content: "";
    width: 0.65em;
    height: 0.65em;
    border-left: 1px solid var(--carmine);
    border-top: 1px solid var(--carmine);
    flex: none;
}

.section-title {
    font-size: var(--t-h1);
}

.section-lede {
    margin-top: 0.9em;
    color: var(--marley);
}

/* ---------- prose ---------- */
.prose {
    max-width: var(--measure);
}

.prose p + p {
    margin-top: 0;
}

/* ---------- tenets: the 設備 trio ---------- */
.tenets {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
}

/* auto-fit, not repeat(3) — the 鏡 tenet is commented out, and a fixed three
   columns left an empty track sitting there as a grey box. This reflows to
   however many tenets are actually present. */
@media (min-width: 52rem) {
    .tenets {
        grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    }
}

.tenet {
    background: var(--paper);
    padding: clamp(1.5rem, 4vw, 2.25rem);
}

.tenet-mark {
    width: 1.5rem;
    height: 1.5rem;
    margin-bottom: 1.25rem;
    border-left: 1px solid var(--carmine);
    border-top: 1px solid var(--carmine);
}

/* Keyed by class, not nth-child: commenting a tenet out used to shift these
   onto the wrong card. Each mark is drawn as the geometry its item describes.

   the mirror sits in an L — its mark is rotated to say so */
.tenet--mirror .tenet-mark {
    border-left: 1px solid var(--carmine);
    border-top: 0;
    border-bottom: 1px solid var(--carmine);
}

/* the floor is a plane — a level line */
.tenet--floor .tenet-mark {
    border: 0;
    border-bottom: 1px solid var(--carmine);
    height: 0.75rem;
}

.tenet h3 {
    font-size: var(--t-h3);
    margin-bottom: 0.7em;
}

.tenet p {
    font-size: var(--t-small);
    color: var(--marley);
    line-height: 1.95;
}

/* ---------- locations ---------- */
.locations {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 52rem) {
    .locations {
        grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    }
}

.location {
    background: var(--paper);
    border: 1px solid var(--rule);
    padding: clamp(1.25rem, 3.5vw, 1.75rem);
}

.location h3 {
    font-size: var(--t-h3);
    margin-bottom: 0.5em;
}

.location p {
    font-size: var(--t-small);
    color: var(--marley);
    margin-bottom: 0;
}

/* The postal address is the point of the card, so it reads at body size in ink
   while the access line stays secondary. <address> italicises by default. */
.location address {
    font-style: normal;
    line-height: 1.8;
    margin-bottom: 0.75em;
}

/* keep-all stops the line wrapping inside a katakana run — without it
   「東武アーバンパークライン」 splits mid-word, which reads as a typo. */
.location .access {
    font-size: var(--t-small);
    color: var(--marley);
    margin-bottom: 0;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

/* ---------- contact ---------- */
.contact-card {
    background: var(--ink);
    color: var(--ground);
    padding: clamp(1.75rem, 6vw, 3rem);
    max-width: var(--measure);
}

.contact-card h2 {
    color: var(--paper);
    font-size: var(--t-h2);
    margin-bottom: 0.75em;
}

.contact-card p {
    color: #b9bcc1;
    font-size: var(--t-small);
}

.email-link {
    display: inline-block;
    margin-top: 0.5em;
    font-family: var(--font-display);
    font-size: clamp(1.0625rem, 3.6vw, 1.5rem);
    letter-spacing: 0.02em;
    color: var(--paper);
    text-decoration: none;
    border-bottom: 1px solid var(--rose);
    padding-bottom: 0.15em;
    word-break: break-all;
}

.email-link:hover {
    color: var(--rose);
    border-bottom-color: var(--paper);
}

/* ---------- footer ---------- */
.footer {
    border-top: 1px solid var(--rule);
    margin-top: clamp(2.75rem, 9vh, 5rem);
    padding: 2rem 0 3rem;
    font-size: var(--t-small);
    color: var(--marley-soft);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 2rem;
    justify-content: space-between;
}

.footer a {
    color: var(--marley);
    text-decoration: none;
}

.footer a:hover {
    color: var(--carmine);
}

/* ---------- motion ----------
   One orchestrated moment: the alignment is set, then the text settles. */
@media (prefers-reduced-motion: no-preference) {
    .hero-frame line {
        stroke-dasharray: var(--len);
        stroke-dashoffset: var(--len);
        animation: draw 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    }

    .hero-frame .level {
        animation-delay: 0.35s;
    }

    .hero-logo,
    .hero-eyebrow,
    .hero-thesis,
    .hero-attrib {
        opacity: 0;
        animation: settle 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
    }

    .hero-eyebrow {
        animation-delay: 0.5s;
    }

    .hero-thesis {
        animation-delay: 0.62s;
    }

    .hero-attrib {
        animation-delay: 0.78s;
    }
}

@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes settle {
    from {
        opacity: 0;
        transform: translateY(0.6rem);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* ---------- interior page head ---------- */
.page-head {
    padding: clamp(1.5rem, 5vh, 3rem) 0 clamp(1.75rem, 5vh, 2.75rem);
}

.page-title {
    font-size: var(--t-h1);
    margin: 0;
}

.page-lede {
    max-width: var(--measure);
    margin-top: 1em;
    color: var(--marley);
}

/* ---------- feature list ----------
   Not numbered: these are qualities held at once, not steps in a sequence. */
.features {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: var(--measure);
}

.features li {
    position: relative;
    padding: 1.1em 0 1.1em 2.25rem;
    border-bottom: 1px solid var(--rule);
}

.features li:first-child {
    border-top: 1px solid var(--rule);
}

.features li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.85em;
    width: 0.7rem;
    height: 0.7rem;
    border-left: 1px solid var(--carmine);
    border-top: 1px solid var(--carmine);
}

/* ---------- numbered detail (設備 breakdown) ---------- */
.detail {
    counter-reset: detail;
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: var(--measure);
}

.detail > li {
    counter-increment: detail;
    padding: clamp(1.25rem, 4vw, 1.75rem) 0;
    border-top: 1px solid var(--rule);
}

.detail > li:last-child {
    border-bottom: 1px solid var(--rule);
}

.detail h3 {
    display: flex;
    align-items: baseline;
    gap: 0.75em;
    font-size: var(--t-h3);
    margin-bottom: 0.6em;
}

.detail h3::before {
    content: counter(detail, decimal-leading-zero);
    font-family: var(--font-body);
    font-size: var(--t-label);
    letter-spacing: 0.18em;
    color: var(--rose);
    flex: none;
}

.detail p {
    color: var(--marley);
    margin-bottom: 0;
}

/* ---------- timeline (profile) ---------- */
.timeline {
    margin: 0;
    max-width: var(--measure);
}

.timeline div {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 0 1.25rem;
    padding: 0.7em 0;
    border-bottom: 1px solid var(--rule);
}

.timeline dt {
    font-family: var(--font-body);
    font-size: var(--t-small);
    color: var(--rose);
    letter-spacing: 0.04em;
}

.timeline dd {
    margin: 0;
    font-size: var(--t-small);
    line-height: 1.85;
}

/* ---------- note / pending state ---------- */
.note {
    max-width: var(--measure);
    background: var(--paper);
    border: 1px solid var(--rule);
    border-left: 2px solid var(--rose);
    padding: clamp(1.1rem, 3.5vw, 1.6rem);
}

.note p {
    font-size: var(--t-small);
    color: var(--marley);
}

/* ---------- portrait / figure ----------
   No page uses this yet — the site ships without photographs. Kept so that
   dropping an <img> into a <figure class="figure"> needs no CSS work. */
.figure {
    margin: 0 0 clamp(1.5rem, 4vh, 2.25rem);
    max-width: var(--measure);
}

.figure img {
    display: block;
    width: 100%;
    height: auto;
}

.figure figcaption {
    margin-top: 0.7em;
    font-size: var(--t-small);
    color: var(--marley-soft);
}
