/* commerce.talosha.com: the Order's partnership page (its own elements, copied into commerce/elements) on the Talosha
   ground, with the application form below it drawn in the same gold and Cinzel. */

.cm { background: var(--ground); }
#content { padding-top: var(--header); overflow-x: clip; }

/* top of the page: 40px between the header and the first section (the Order's hero centres itself in 92vh) */
#cm-hero talosha-hero.tal-hero, #cm-hero talosha-hero-mobile { min-height: 0; }
#cm-hero .tal-hero-grid { padding-top: 40px; padding-bottom: 72px; }
/* the mark sits centred in its rings, level with the text block (the rings are 440px, so the box keeps 480px) */
#cm-hero .tal-visual { min-height: 480px; align-self: center; }
#cm-hero talosha-hero-mobile > *:first-child { padding-top: 40px; }

/* introduction video panel */
.hero-video { padding: 24px 24px 0; background: transparent; box-sizing: border-box; }
.hero-video[hidden] { display: none; }
.hero-video-frame {
  position: relative;
  width: min(100%, 970px);
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(225, 233, 241, .72);
  border-radius: 12px;
  background: #05070a;
  box-sizing: border-box;
}
.hero-video-frame video { display: block; width: 100%; height: 100%; object-fit: contain; background: #05070a; }
.hero-video-play {
  position: absolute; top: 50%; left: 50%;
  display: grid; place-items: center;
  width: 62px; height: 62px; padding: 0;
  border: 2px solid #fff; border-radius: 50%;
  background: rgba(0, 0, 0, .48); color: #fff; cursor: pointer;
  transform: translate(-50%, -50%);
  transition: background .2s ease, opacity .2s ease;
}
.hero-video-play svg { width: 25px; height: 25px; margin-left: 4px; fill: currentColor; }
.hero-video-play:hover { background: rgba(0, 0, 0, .7); }
.hero-video-play:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.hero-video-frame.is-playing .hero-video-play { opacity: 0; pointer-events: none; }
.hero-video-status { position: absolute; left: 0; right: 0; bottom: 16px; margin: 0; color: #fff; text-align: center; font: 14px 'Barlow', sans-serif; }
@media (max-width: 740px) {
  .hero-video { padding: 0; }
  .hero-video-frame { width: 100%; border-radius: 0; }
  .hero-video-play { width: 56px; height: 56px; }
}
.cm :focus-visible { outline-color: #c9a86a; }
.cm ::selection { background: rgba(201, 168, 106, 0.25); color: #fff; }

/* the application */
.cm-apply {
  --gold: #c9a86a;
  --gold-soft: #e8d9b8;
  max-width: 1020px;
  margin: 0 auto;
  padding: clamp(72px, 12vh, 120px) 24px clamp(80px, 14vh, 150px);
  font-family: 'Playfair Display', serif;
  color: #c4d0e4;
}
.cm-apply__head { text-align: center; margin-bottom: clamp(36px, 6vh, 56px); }
.cm-apply__title { margin: 0 0 22px; font-family: 'Cinzel', serif; font-weight: 500; font-size: clamp(2rem, 4.4vw, 3.4rem); color: var(--gold); text-shadow: 0 0 45px rgba(201, 168, 106, 0.35); }
.cm-apply__sub { margin: 0 auto; max-width: 40rem; font-size: 1.15rem; line-height: 1.75; color: #c4d0e4; text-wrap: pretty; }

/* the form: the clean grouped layout it had before (legends, two columns, pill button), on the Commerce ground */
.cm-apply {
  --accent: #d9d3c4;
  --accent-soft: rgba(217, 211, 196, 0.12);
  --line: rgba(205, 215, 226, 0.16);
  --line-strong: rgba(205, 215, 226, 0.42);
  --muted: #93a6ba;
  --body: #cdd7e2;
  --ink: #f5f5f0;
}
.cm-apply .apply__form { max-width: 46rem; margin: 0 auto; padding: 0; border: 0; background: none; }
.apply__group { margin: 0 0 clamp(28px, 4.5vh, 44px); padding: 0; border: 0; min-width: 0; }
.apply__group > legend {
  width: 100%; padding: 0 0 12px; margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  font-family: 'Cinzel', serif; font-size: 0.82rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
}
.apply__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.apply__field { display: block; margin-bottom: 18px; }
.apply__field > span { display: block; margin-bottom: 7px; font: 500 13px/1.3 'Barlow', system-ui, sans-serif; letter-spacing: 0.04em; color: var(--body); }
.apply__field > span b { color: var(--accent); font-weight: 500; }
.apply__field > span i { font-style: normal; color: var(--muted); }
.apply__field small { display: block; margin-top: 6px; font: 12.5px/1.4 'Barlow', system-ui, sans-serif; color: var(--muted); }

.apply input[type="text"], .apply input[type="email"], .apply input[type="date"], .apply input[type="number"], .apply textarea {
  display: block; width: 100%; padding: 12px 14px;
  font: 400 16px/1.4 'Barlow', system-ui, sans-serif; /* 16px keeps iOS from zooming on focus */
  color: var(--ink);
  background: rgba(8, 18, 28, 0.55);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.apply textarea { resize: vertical; min-height: 7.5rem; }
.apply input::placeholder { color: rgba(147, 166, 186, 0.6); }
.apply input:hover, .apply textarea:hover { border-color: rgba(205, 215, 226, 0.6); }
.apply input:focus, .apply textarea:focus { outline: none; border-color: var(--accent); background: rgba(8, 18, 28, 0.8); }
.apply input[aria-invalid="true"], .apply textarea[aria-invalid="true"] { border-color: #e0846f; }
.apply input[type="date"] { color-scheme: dark; }
.apply__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.apply__msg { margin: 4px 0 16px; padding: 12px 14px; border: 1px solid rgba(224, 132, 111, 0.5); border-radius: 8px; background: rgba(224, 132, 111, 0.08); color: var(--ink); font: 15px/1.5 'Barlow', system-ui, sans-serif; }
.apply__msg[hidden] { display: none; }

.apply__submit {
  appearance: none; display: block; width: 100%; padding: 16px 22px;
  font: 500 13px/1 'Barlow', system-ui, sans-serif; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink); background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 999px; cursor: pointer;
  transition: background-color .24s var(--ease), transform .12s var(--ease), opacity .2s;
}
.apply__submit:hover { background: rgba(217, 211, 196, 0.24); }
.apply__submit:active { transform: translateY(1px); }
.apply__submit[disabled] { opacity: .6; cursor: progress; }

.apply__note { margin: 20px 0 0; text-align: center; font: 13.5px/1.7 'Barlow', system-ui, sans-serif; color: var(--muted); text-wrap: balance; }

.apply__done { text-align: center; padding-top: clamp(24px, 6vh, 64px); }
.apply__done[hidden], .apply__form[hidden] { display: none; }
.apply__title { margin: 0; font-family: 'Cinzel', serif; font-weight: 500; font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: 0.06em; color: var(--ink); }
.apply__title--sm { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.apply__lede { margin: 14px auto 0; max-width: 34rem; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.3rem; line-height: 1.5; color: var(--body); }
.apply__link { display: inline-block; margin-top: 28px; font: 500 12.5px/1 'Barlow', system-ui, sans-serif; letter-spacing: 0.16em; text-transform: uppercase; color: var(--body); border-bottom: 1px solid var(--line-strong); padding-bottom: 6px; }
.apply__link:hover { color: var(--ink); border-color: var(--accent); }

@media (max-width: 620px) {
  .apply__row { grid-template-columns: minmax(0, 1fr); }
  .cm-apply .apply__form { padding: 22px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .apply * { transition: none !important; }
}

/* hero buttons (from the first version of this page) */
.cm-actions { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }
.cm-btn {
  display: inline-block; padding: 15px 28px;
  font: 500 13px/1 'Barlow', system-ui, sans-serif; letter-spacing: 0.16em; text-transform: uppercase;
  color: #0d1b2a; background: #ece7da; border-radius: 999px; text-decoration: none;
  transition: background-color .24s var(--ease), transform .12s var(--ease);
}
.cm-btn:hover { background: #fff; }
.cm-btn:active { transform: translateY(1px); }
.cm-link {
  font: 500 13px/1.4 'Barlow', system-ui, sans-serif; letter-spacing: 0.1em; color: #cdd7e2; text-decoration: none;
  border-bottom: 1px solid rgba(205, 215, 226, 0.42); padding-bottom: 4px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.cm-link:hover { color: #fff; border-color: #ece7da; }
@media (max-width: 960px) { #cm-hero .cm-actions { justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .cm-btn, .cm-link { transition: none; } }
