/* Landing page */

/* ---------- Hero band ---------- */
.hero {
  position: relative;
  /* pure black, the same black as the logo, so the emblem sits in the band seamlessly */
  background: #000;
  color: var(--band-ink);
  padding-bottom: 3.2rem;
  overflow: hidden;
}
.hero-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: 1rem;
}
.corner-logo {
  display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--band-ink);
  font-family: var(--f-head); font-weight: 700; font-size: 1.15rem;
}
.corner-logo img { width: 40px; height: 40px; border-radius: 8px; }
.hero-actions { display: flex; align-items: center; gap: .6rem; }
.hero-actions .theme-switch { color: #d9c7a6; border-color: rgba(217, 199, 166, .45); }
.hero-link {
  color: var(--band-ink); text-decoration: none; font-family: var(--f-type); font-weight: 700;
  font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; padding: .5rem .4rem;
}
.hero-link:hover { color: var(--gold); }
.hero .btn-gold { --b-bg: #c8963a; }

.hero-body { display: grid; justify-items: center; text-align: center; padding-top: .5rem; }

/* ---------- Logo animation stage ---------- */
.stage {
  position: relative;
  width: min(100%, 560px);
  height: clamp(270px, 66vw, 370px);
  margin-bottom: .8rem;
}
.emblem {
  --s: clamp(200px, 50vw, 290px);
  position: absolute; left: 50%; top: 50%;
  width: var(--s); height: var(--s);
  transform: translate(-50%, -50%);
  background: url("/assets/img/logo-480.webp") center / cover no-repeat;
  border-radius: 14px;
}
.emblem.pieces { background: none; }
.piece {
  position: absolute;
  width: 25%; height: 25%;
  background-image: url("/assets/img/logo-480.webp");
  background-size: 400% 400%;
  animation: piece 14s infinite;
  will-change: transform, opacity;
}
@keyframes piece {
  0%   { opacity: 0;   transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(.82); animation-timing-function: ease-out; }
  7%   { opacity: .85; transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(.82); animation-timing-function: cubic-bezier(.3, .1, .2, 1); }
  40%  { opacity: 1;   transform: none; }
  86%  { opacity: 1;   transform: none; animation-timing-function: ease-in; }
  94%, 100% { opacity: 0; transform: none; }
}

.door-pop {
  position: absolute; margin: 0; display: grid; justify-items: center; gap: .3rem;
  color: var(--gold); font-family: var(--f-type); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  opacity: 0;
}
.door-pop .badge-ring { --size: clamp(58px, 13vw, 78px); background: rgba(239, 228, 207, .04); border-color: rgba(200, 150, 58, .55); color: var(--gold); }
.door-pop .badge-ring::before { border-color: rgba(200, 150, 58, .45); }
.door-pop .badge-ring img { filter: invert(66%) sepia(52%) saturate(520%) hue-rotate(2deg) brightness(92%); }
.door-pop figcaption { color: #d9c7a6; }
.d1 { left: 0; top: 0; animation: door1 14s infinite; }
.d2 { right: 0; top: 0; animation: door2 14s infinite; }
.d3 { left: 0; bottom: 0; animation: door3 14s infinite; }
.d4 { right: 0; bottom: 0; animation: door4 14s infinite; }
@keyframes door1 { 0%, 44% { opacity: 0; transform: scale(.3); } 47% { opacity: 1; transform: scale(1.12); } 49%, 86% { opacity: 1; transform: scale(1); } 93%, 100% { opacity: 0; transform: scale(1); } }
@keyframes door2 { 0%, 49% { opacity: 0; transform: scale(.3); } 52% { opacity: 1; transform: scale(1.12); } 54%, 86% { opacity: 1; transform: scale(1); } 93%, 100% { opacity: 0; transform: scale(1); } }
@keyframes door3 { 0%, 54% { opacity: 0; transform: scale(.3); } 57% { opacity: 1; transform: scale(1.12); } 59%, 86% { opacity: 1; transform: scale(1); } 93%, 100% { opacity: 0; transform: scale(1); } }
@keyframes door4 { 0%, 59% { opacity: 0; transform: scale(.3); } 62% { opacity: 1; transform: scale(1.12); } 64%, 86% { opacity: 1; transform: scale(1); } 93%, 100% { opacity: 0; transform: scale(1); } }

/* Still version: reduced motion, or a slow device */
.stage.still .piece, .stage.still .door-pop { animation: none; opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .piece, .door-pop { animation: none !important; opacity: 1 !important; transform: none !important; }
}

.headline {
  font-size: clamp(1.18rem, 5.1vw, 3.2rem);
  white-space: nowrap;
  color: #f4e7c9;
  letter-spacing: -0.01em;
  margin-top: .4rem;
}
.intro {
  max-width: 44rem; margin-top: 1rem; color: #d8cab2; font-size: clamp(1rem, 2.2vw, 1.15rem);
}
.hero-cta { display: flex; gap: .7rem; flex-wrap: wrap; justify-content: center; margin-top: 1.6rem; }
.hero-ghost { --b-bg: transparent; --b-ink: #efe4cf; --b-line: rgba(239, 228, 207, .55); box-shadow: none; }

/* scalloped paper edge where the band meets the page */
.hero-edge {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 14px;
  background: radial-gradient(circle at 10px -2px, transparent 11px, var(--paper) 12px) 0 0 / 20px 14px repeat-x;
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(3rem, 7vw, 5rem); }
.section-head { text-align: center; margin-bottom: 2.4rem; }
.section-head .kicker { margin-bottom: .5rem; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Doors */
.doors { display: grid; gap: 2.2rem 2.6rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.door { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: start; }
.door .badge-ring { --size: 92px; }
.door h3 { font-size: 1.4rem; }
.door-sub { font-family: var(--f-type); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-text); margin: .15rem 0 .55rem; font-weight: 700; }
.door p + p { margin-top: .5rem; }
.door .not { font-size: .95rem; color: var(--ink-soft); border-left: 3px solid var(--line); padding-left: .7rem; }
.door-cta {
  display: inline-flex; gap: .4rem; margin-top: .8rem; font-family: var(--f-type); font-weight: 700;
  font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--wood); text-decoration: none;
  border-bottom: 1.5px solid currentColor; padding-bottom: 2px;
}
.door-cta:hover { color: var(--gold-text); }
@media (max-width: 520px) {
  .door { grid-template-columns: 1fr; }
  .door .badge-ring { --size: 76px; }
}

/* Steps */
.steps { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); counter-reset: step; }
.step { position: relative; padding: 1.4rem 1.2rem 1.2rem; text-align: center; }
.step-n {
  display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto .9rem; border-radius: 50%;
  font-family: var(--f-head); font-weight: 800; font-size: 1.7rem; color: var(--paper);
  background: var(--wood); box-shadow: 0 0 0 4px var(--paper), 0 0 0 5.5px var(--wood);
}
:root[data-theme="dark"] .step-n { color: #1b130b; background: var(--gold); box-shadow: 0 0 0 4px var(--paper), 0 0 0 5.5px var(--gold); }
.step h3 { font-size: 1.18rem; margin-bottom: .35rem; }
.step p { color: var(--ink-soft); font-size: .98rem; }
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 3.4rem; right: -1.1rem; width: 1.6rem; height: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 10'%3E%3Cpath d='M1 5h22M18 1l5 4-5 4' fill='none' stroke='%23c8963a' stroke-width='1.6'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (max-width: 980px) { .step::after { display: none; } }

/* Trio */
.trio-section { padding-top: 0; }
.trio { display: grid; gap: 1.2rem; grid-template-columns: 1fr 1fr 1.35fr; }
@media (max-width: 900px) { .trio { grid-template-columns: 1fr; } }
.trio-card { border-radius: var(--r); padding: 1.6rem; min-height: 260px; }
.trio-never { background: var(--wood-deep); color: #f0e3cc; }
:root[data-theme="dark"] .trio-never { background: #2a1d14; }
.trio-script { font-size: 2.6rem; color: var(--gold); line-height: 1; margin-bottom: .9rem; }
.trio-never ul { display: grid; gap: .55rem; }
.trio-never li { padding-left: 1.6rem; position: relative; font-size: 1.05rem; }
.trio-never li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: .9rem; height: .9rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 2l8 8M10 2l-8 8' stroke='%23c8963a' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.trio-rules { background: var(--paper-2); border: 1px solid var(--line); display: grid; align-content: center; gap: .7rem; }
.trio-big { font-family: var(--f-head); font-weight: 700; font-size: 1.55rem; line-height: 1.2; }
.trio-motto { padding: .55rem; display: grid; }
.card-stitch { border: 1.5px dashed rgba(251, 243, 230, .6); border-radius: 8px; padding: 1.6rem; display: grid; align-content: center; justify-items: center; text-align: center; gap: .3rem; }
.trio-motto-script { font-size: 2.7rem; line-height: 1; color: #fbf3e6; }
.trio-motto .arrow-rule { color: #fbf3e6; margin: .2rem auto .6rem; }
.trio-motto-line { font-family: var(--f-type); font-weight: 700; font-size: 1.25rem; letter-spacing: .14em; text-transform: uppercase; }
.trio-motto .small { max-width: 26rem; opacity: .92; }

/* Reality check */
.reality { text-align: center; padding: 2.4rem 1.8rem; }
.reality .kicker { margin-bottom: .4rem; }
.reality-figure { font-family: var(--f-head); font-weight: 800; font-size: clamp(2.4rem, 7vw, 3.6rem); color: var(--bad); margin: .6rem 0 .2rem; line-height: 1.1; }
.reality p + p { margin-top: .8rem; }

.closing h2 { margin-bottom: .4rem; }
.closing .btn { margin-top: 1rem; }

/* ---------- Footer ---------- */
.site-foot { position: relative; background: var(--wood-deep); color: #e8d9c0; margin-top: 2rem; }
:root[data-theme="dark"] .site-foot { background: #0c0907; }
.foot-edge {
  position: absolute; left: 0; right: 0; top: -12px; height: 12px;
  background: linear-gradient(135deg, transparent 50%, var(--wood-deep) 50%) 0 0 / 14px 12px repeat-x,
              linear-gradient(225deg, transparent 50%, var(--wood-deep) 50%) 0 0 / 14px 12px repeat-x;
}
:root[data-theme="dark"] .foot-edge { background: linear-gradient(135deg, transparent 50%, #0c0907 50%) 0 0 / 14px 12px repeat-x, linear-gradient(225deg, transparent 50%, #0c0907 50%) 0 0 / 14px 12px repeat-x; }
.foot-grid { display: grid; gap: 2rem; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; padding-block: 3rem 2rem; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-brand { display: flex; gap: .7rem; align-items: center; margin-bottom: .8rem; }
.foot-brand img { border-radius: 8px; }
.foot-brand strong { display: block; font-family: var(--f-head); font-size: 1.25rem; color: #f6ead4; }
.foot-brand .hand { color: var(--gold); font-size: 1.2rem; }
.foot-h { font-family: var(--f-type); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: #f6ead4; margin-bottom: .8rem; }
.site-foot ul { display: grid; gap: .4rem; }
.site-foot a { color: #e8d9c0; text-decoration: none; border-bottom: 1px solid rgba(232, 217, 192, .3); }
.site-foot a:hover { color: var(--gold); border-color: var(--gold); }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; padding-block: 1.2rem 1.6rem; border-top: 1px solid rgba(232, 217, 192, .18); color: #cdbb9d; }

@media (max-width: 560px) {
  .hero-actions { gap: .35rem; }
  .hero-actions .theme-switch span { display: none; }
  .hero-actions .theme-switch { padding: .3rem .55rem; }
  .hero-actions .btn-sm { padding: .35rem .6rem; }
}
@media (max-width: 400px) {
  .corner-logo span { display: none; }
}
