/* Cadenza Legacy — design pass (v1). A sibling of the America site: same fonts and buttons,
   its own forest, brass and paper. Motion states apply only once legacy-design.js adds classes. */

/* One type pair, shared with America */
:root { --display: 'Instrument Serif', Georgia, serif; --ui: 'DM Sans', system-ui, sans-serif; --script: 'Instrument Serif', Georgia, serif; --brass-ink: #a7894f; }

/* Rounded buttons in sentence case, like America */
#app .btn { border-radius: 999px; text-transform: none; letter-spacing: .005em; font-size: 14px; font-weight: 500; padding-left: 24px; padding-right: 24px; }
#app .place-host-link { text-transform: none; letter-spacing: .01em; font-size: 13px; }
#app .america-site-switch { border-radius: 999px; background: transparent; color: inherit; border-color: #2a2b2140; padding: 6px 14px; min-height: 40px; }
#app .america-site-switch small { color: #6b6656; }
#app .america-site-switch:hover { background: #26231b; color: #fff; }
#app .america-site-switch:hover small { color: #d8d2c2; }
.score-index { display: none !important; }

/* Footer logo reads on the dark ground */
.site-foot img[src*="cadenza-america-logo"] { filter: brightness(0) invert(.92) sepia(.25); }

/* ---------- Hero: a readable opening, independent of the photo crop ---------- */
.place-hero picture:first-of-type .place-hero-photo { z-index: -4; }
.place-hero-fg .place-hero-photo { z-index: -2; }
.place-hero-fg { display: contents; }
.place-hero-shade { z-index: -1; }
.place-hero-word { position: absolute; z-index: 1; right: 5%; top: clamp(24px, 6svh, 64px); margin: 0; pointer-events: none;
  font: italic 400 clamp(88px, 12vw, 220px)/1 var(--display); letter-spacing: -.02em; color: #e8d4a7; opacity: 0; white-space: nowrap;
  text-shadow: 0 2px 24px #10171066; }
.place-hero-copy { position: relative; z-index: 2; }
.place-hero .place-brand { display: flex; align-items: center; gap: 12px; margin: 0 0 24px;
  font: 600 14px/1.5 var(--ui); letter-spacing: .12em; color: #faf6ed; }
.place-brand::before { content: ""; width: 28px; height: 1px; background: #e8d4a7; flex: 0 0 auto; }
@media (prefers-reduced-motion: no-preference) {
  .lg-moment .place-hero-word { animation: lg-word 5.8s cubic-bezier(.16,1,.3,1) .15s both; }
  @keyframes lg-word { 0% { opacity: 0; transform: translateY(18px); } 12% { opacity: 1; transform: none; } 82% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-8px); } }
  .lg-moment .place-hero-copy > * { animation: lg-copy .7s cubic-bezier(.16,1,.3,1) both; }
  .lg-moment .place-hero-copy > :nth-child(1) { animation-delay: .1s; }
  .lg-moment .place-hero-copy > :nth-child(2) { animation-delay: .2s; }
  .lg-moment .place-hero-copy > :nth-child(3) { animation-delay: .3s; }
  .lg-moment .place-hero-copy > :nth-child(4) { animation-delay: .4s; }
  .lg-moment .place-hero-copy > :nth-child(n+5) { animation-delay: .5s; }
  @keyframes lg-copy { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  .place-hero-word { display: none; }
  .place-hero-copy > *, .lg-moment .place-hero-copy > * { animation: none !important; }
}

/* Phone: the words sit on the photograph, not in a block below it */
@media (max-width:540px) {
  .place-hero { display: flex; align-items: flex-end; min-height: calc(100svh - 64px); }
  .place-hero .place-hero-photo { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; object-position: 30% 40%; }
  .place-hero-shade { display: block; background: linear-gradient(0deg, #101710f2 0%, #101710d9 38%, #10171066 62%, #10171000 82%); }
  .place-hero-copy { padding: 150px 22px 34px; }
  .place-hero h1 { font-size: 64px; margin-bottom: 18px; }
  .place-rule { margin-bottom: 16px; }
  .place-intro { margin-bottom: 20px; }
  .place-hero-word { right: 7%; top: 28px; font-size: clamp(76px, 20vw, 108px); }
  .place-hero .place-brand { font-size: 12px; margin-bottom: 18px; }
}

/* ---------- The pause: lit word by word ---------- */
.legacy-pause { position: relative; }
@media (min-width:0px) {
  .lg-motion [data-scrub] .w { color: #cfc6b3; transition: color .35s ease; }
  .lg-motion [data-scrub] em .w { color: #d8cdb4; }
  .lg-motion [data-scrub] .w.is-lit { color: inherit; }
}

/* ---------- The brass string ---------- */
[data-view="home"] { position: relative; }
.lg-thread { position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; overflow: visible; }
.lg-thread path { fill: none; stroke: #b99a5b; stroke-width: 1.25; stroke-linecap: round; }
.lg-thread-tip { fill: #ecd8a8; opacity: 0; transition: opacity .3s ease; filter: drop-shadow(0 0 5px #e7c98acc); }
.lg-thread-tip.is-on { opacity: 1; }
.lg-thread-knot { fill: #b99a5b; opacity: 0; transition: opacity .4s ease; }
.lg-thread-knot.is-on { opacity: 1; }
@media (min-width:0px) {
  [data-view="home"] .cta .btn-brass.lg-arrived { box-shadow: 0 0 0 1px #b99a5b, 0 0 24px #d9bf8466; transition: box-shadow .6s ease; }
}

/* ---------- Seams: dark meets light over a short distance ---------- */
.lg-seam { position: absolute; left: 0; right: 0; top: 0; height: clamp(70px, 11vh, 130px); z-index: -1; pointer-events: none; }
.lg-seamed { position: relative; isolation: isolate; }

@media print { .lg-thread, .lg-seam, .place-hero-word { display: none; } }

/* Phone header: the America link and the main button fit on one line */
@media (max-width:540px) {
  #app .site-head .america-site-switch { min-height: 36px; padding: 4px 9px; gap: 5px; font-size: 12px; }
  #app .site-head .america-site-switch small { display: none; }
  #app .site-head .btn { white-space: nowrap; min-height: 40px; padding: 0 13px; font-size: 13px; margin-top: 0; }
  #app .site-head .nav { gap: 8px; }
  #app .site-head .head-in { gap: 8px; }
  #app .site-head .logo.inst-only img { width: 78px; height: auto; }
}
@media (max-width:420px) {
  /* institutions page: Contact stays in the page and footer; the header keeps the two actions */
  #app .site-head .nav:not(.open) > .navlink:not(.america-site-switch):not(.site-only) { display: none; }
}
#app .menu-btn { border-radius: 50%; }

/* ===================== Design pass v2: one language across every Legacy screen ===================== */
/* Section labels: the headings carry the hierarchy; no decorative eyebrows or staff lines */
#app .eyebrow { display: none; }
#app .page-head::after, .site-foot::before { display: none; }
/* Small category tags and data labels read in sentence case, not spaced capitals */
#app .tag, #app .k, #app .kv dt, #app .card .tag, #app [class*="label"] { letter-spacing: .01em; text-transform: none; }
#app .tag { font-size: 13px; font-weight: 500; color: #6f6a5a; }

/* Buttons: same shape, weight and feedback everywhere */
#app .btn { min-height: 48px; transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s cubic-bezier(.16,1,.3,1), box-shadow .2s ease; }
#app .btn:hover { box-shadow: 0 6px 18px #1d1a141f; }
#app .btn:active { transform: scale(.97); }
#app .btn:focus-visible, #app button:focus-visible, #app a:focus-visible { outline: 2px solid #26231b; outline-offset: 3px; }
#app .btn-ghost { background: transparent; border: 1px solid currentColor; }
#app .textlink { text-transform: none; letter-spacing: .01em; font-size: 15px; font-weight: 500; }

/* Fields: one style for every input, select and text area (16px, so phones do not zoom in) */
#app input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]), #app select, #app textarea {
  box-sizing: border-box; width: 100%; min-height: 50px; padding: 13px 14px; font: 400 16px/1.4 var(--ui);
  color: #24211a; background: #fffdf8; border: 1px solid #c9c4b7; border-radius: 12px; transition: border-color .2s, box-shadow .2s;
}
#app textarea { min-height: 120px; resize: vertical; }
#app input:not([type=checkbox]):not([type=radio]):focus, #app select:focus, #app textarea:focus { outline: none; border-color: #26231b; box-shadow: 0 0 0 3px #26231b1a; }
#app input[aria-invalid=true], #app textarea[aria-invalid=true], #app select[aria-invalid=true] { border-color: #a3321f; }
#app input[type=checkbox], #app input[type=radio] { accent-color: #3d4a35; width: 18px; height: 18px; }
#app label { font-family: var(--ui); }
#app .field > label, #app .fl label { font-size: 14px; font-weight: 500; color: #24211a; }

/* Choice cards in the forms (radio and checkbox options) */
#app .opt, #app .choice, #app .radio-card { border-radius: 14px; transition: border-color .2s, box-shadow .2s, background .2s; }
#app .opt:has(input:checked), #app .choice:has(input:checked), #app .radio-card:has(input:checked) { box-shadow: inset 0 0 0 1px #26231b; border-color: #26231b; }

/* Cards and panels: rounded, quiet */
#app .card, #app .aside, #app .path, #app .imp, #app .wiz-shell > *, #app .trust > div, #app .note, #app .prelaunch { border-radius: 18px; }
#app .card img, #app .imp-media, #app .imp-media img { border-radius: 14px; }
#app .card { transition: transform .4s cubic-bezier(.16,1,.3,1), box-shadow .4s ease; }
@media (hover:hover) and (pointer:fine) and (min-width:0px) { #app .card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px #1d1a1414; } }

/* Example-project badge as a pill */
#app .badge, #app .example-badge, #app [class*="ex-flag"] { border-radius: 999px; letter-spacing: .02em; text-transform: none; }

@media (max-width:0px) { #app .btn, #app .card { transition: none; } #app .btn:active { transform: none; } }
#app .status { border-radius: 999px; text-transform: none; letter-spacing: .01em; font-size: 13px; padding: 6px 12px; display: inline-block; }
#app .radios label { border-radius: 14px; }
#app .radios label:has(input:checked) { border-color: #26231b; box-shadow: inset 0 0 0 1px #26231b; background: #fbf8f0; }

/* ===================== v4: one language with America ===================== */
/* Pill buttons and chips everywhere (the page's own .btn radius rule is !important) */
#app .btn { border-radius: 999px !important; }
#app .chip { border-radius: 999px; letter-spacing: .01em; }
/* Labels in sentence case, never under 12px */
#app .example, #app .goal span, #app .trust h3, #app .foot-grid h3, #app .foot-base, #app .back,
#app figcaption, #app figcaption span, #app .dedication-label, #app .dedication-example { text-transform: none; letter-spacing: .01em; }
#app .example, #app figcaption, #app figcaption span, #app .dedication-label, #app .dedication-example { font-size: 12px; }
#app .trust h3, #app .foot-grid h3 { font-size: 13px; font-weight: 600; }

/* Lighter paper: halve the distance from the previous warm background to white. */
:root{--paper:#fbf9f6;--paper-2:#fefdfa}
#app .legacy-backbar{background:var(--paper)}
.site-head{background:rgba(251,249,246,.96)}
.legacy-pause,.letter-section,.dedication-editorial{background:var(--paper)}
.letter-photograph{background:#fffdf8}
.apply-hero .ah-media img{object-position:50% 55%}
@media(prefers-reduced-motion:no-preference){.view.is-active .a{animation-duration:.45s;animation-delay:calc(var(--i,0)*40ms)}}
