/* ==========================================================================
   Surnia Games — components (Elementor edition)
   --------------------------------------------------------------------------
   Elementor controls layout, spacing and most colours. This file covers the
   theme's own header and footer, and the two custom widgets — the card fan
   and the rank ladder — whose look has no Elementor equivalent.

   Loaded after Elementor's stylesheets so it wins on equal specificity.
   ========================================================================== */

:root{
  --maroon-deep:#3a0c14;
  --maroon:#5e1420;
  --gold:#c9a227;
  --gold-bright:#f2d98d;
  --ink:#140508;
  --bone:#e9e0cd;
  --bone-dim:#a89c86;
  --body-text:#cfc4ae;
  --studio-ink:#1b242e;
  --studio-amber:#e0a21f;
}

body{
  background:var(--ink);
  color:var(--bone);
  font-family:'IBM Plex Sans',system-ui,sans-serif;
  font-size:17px;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3{
  font-family:'Cinzel Decorative',Georgia,serif;
  font-weight:700;line-height:1.15;letter-spacing:.01em;
  color:var(--gold-bright);
}
a{color:var(--gold-bright)}
.wrap{width:min(1140px,92vw);margin-inline:auto}

/* --------------------------------------------------------------- header -- */
.site-header{
  position:sticky;top:0;z-index:50;
  background:rgba(20,5,8,.86);
  backdrop-filter:blur(10px);
  border-bottom:1px solid rgba(201,162,39,.22);
}
.bar{display:flex;align-items:center;justify-content:space-between;gap:2rem;padding:.85rem 0}
.studio{margin:0}
.studio a{
  font-family:Archivo,system-ui,sans-serif;font-weight:700;font-size:.82rem;
  letter-spacing:.14em;color:var(--bone-dim);text-decoration:none;
  display:inline-flex;align-items:center;gap:.55rem;
}
.studio a::before{
  content:"";width:7px;height:7px;background:var(--studio-amber);
  transform:rotate(45deg);flex:none;
}
.studio a:hover{color:var(--studio-amber)}
.site-nav{display:flex;gap:1.8rem;font-size:.92rem;list-style:none;margin:0;padding:0}
.site-nav li{list-style:none}
.site-nav a{color:var(--bone-dim);text-decoration:none;padding-bottom:2px;border-bottom:1px solid transparent}
.site-nav a:hover,.site-nav a:focus-visible{color:var(--gold-bright);border-color:var(--gold)}

/* ======================================================= widget: card fan ==
   Rendered by the "Card Fan" Elementor widget. Card width, gap, glow colour
   and the deal animation are all controls in the Elementor sidebar.
   ========================================================================= */
.hand{
  display:flex;justify-content:center;align-items:flex-end;
  gap:.7rem;margin:0 auto;perspective:1400px;
}
.card{
  width:116px;aspect-ratio:5/7;flex:none;
  border-radius:7px;position:relative;
  background:linear-gradient(165deg,#71182a 0%,#4a0f1a 58%,#30090f 100%);
  border:1px solid var(--gold);
  box-shadow:inset 0 0 0 3px rgba(20,5,8,.85), inset 0 0 0 4px rgba(201,162,39,.55), 0 14px 30px rgba(0,0,0,.55);
  overflow:hidden;
}
.card.black{background:linear-gradient(165deg,#2a2a2e 0%,#181819 58%,#0d0d0e 100%)}

/* a card holding art */
.card img{width:100%;height:100%;object-fit:cover;display:block;border-radius:6px}
.card:has(img){
  background:none;
  box-shadow:0 14px 30px rgba(0,0,0,.55);
  border-color:rgba(201,162,39,.55);
}
.card.key:has(img){
  border-color:var(--gold-bright);
  box-shadow:0 0 44px rgba(242,217,141,.45), 0 14px 30px rgba(0,0,0,.55);
}

/* a card with no art yet reads as a face-down back */
.card:not(:has(img)){
  background-image:
    repeating-linear-gradient(45deg, rgba(201,162,39,.10) 0 5px, transparent 5px 11px),
    linear-gradient(165deg,#71182a 0%,#4a0f1a 58%,#30090f 100%);
}
.card.black:not(:has(img)){
  background-image:
    repeating-linear-gradient(45deg, rgba(201,162,39,.08) 0 5px, transparent 5px 11px),
    linear-gradient(165deg,#2a2a2e 0%,#181819 58%,#0d0d0e 100%);
}

.card.hole{transform:translateY(14px) rotate(-3deg)}
.card.hole + .card.hole{transform:translateY(14px) rotate(3deg);margin-right:1.6rem}
.card.key{
  border-color:var(--gold-bright);
  box-shadow:inset 0 0 0 3px rgba(20,5,8,.85), inset 0 0 0 4px var(--gold-bright), 0 0 44px rgba(242,217,141,.45), 0 14px 30px rgba(0,0,0,.55);
}

.hand-note{
  font-family:'Cormorant Garamond',Georgia,serif;font-style:italic;
  color:var(--bone-dim);text-align:center;margin:.6rem 0 0;
}

@media(prefers-reduced-motion:no-preference){
  .hand:not(.no-deal) .card{animation:deal .5s cubic-bezier(.2,.7,.3,1) backwards}
  .hand:not(.no-deal) .card:nth-child(1){animation-delay:.05s}
  .hand:not(.no-deal) .card:nth-child(2){animation-delay:.14s}
  .hand:not(.no-deal) .card:nth-child(3){animation-delay:.26s}
  .hand:not(.no-deal) .card:nth-child(4){animation-delay:.35s}
  .hand:not(.no-deal) .card:nth-child(5){animation-delay:.44s}
  .hand:not(.no-deal) .card:nth-child(n+6){animation-delay:.52s}
  @keyframes deal{from{opacity:0;transform:translateY(-46px) rotateX(38deg) scale(.9)}}
  .hand:not(.no-deal) .card.hole{animation-name:dealHole}
  @keyframes dealHole{from{opacity:0;transform:translateY(-32px) rotate(0) scale(.9)}}
}

/* ==================================================== widget: rank ladder ==
   The staircase indent and the warming border colour are written inline by
   the widget, so adding or removing a tier re-spaces the whole ladder. Only
   the top tier is styled here, so the "Top tier colour" control can reach it.
   ========================================================================= */
.ladder{display:flex;flex-direction:column-reverse;gap:.4rem}
.rung{
  display:grid;grid-template-columns:2.1rem 1fr auto;align-items:center;gap:1.2rem;
  padding:.95rem 1.4rem;border-left:3px solid transparent;border-radius:0 6px 6px 0;
}
.rung .tier{font-family:'Cinzel Decorative',Georgia,serif;font-size:.95rem;color:var(--bone-dim)}
.rung .name{font-family:'Cinzel Decorative',Georgia,serif;font-weight:700;font-size:1.16rem;color:var(--bone)}
.rung .req{font-size:.9rem;color:var(--bone-dim);font-variant-numeric:tabular-nums;text-align:right}

.rung:last-child{
  border-left-color:var(--gold-bright);
  background:linear-gradient(90deg,rgba(242,217,141,.34),rgba(242,217,141,.04));
  box-shadow:0 0 34px rgba(242,217,141,.16);
}
.rung:last-child .name{color:var(--gold-bright);font-size:1.45rem}

.ladder-foot{font-size:.9rem;color:var(--bone-dim);max-width:60ch;margin:1.6rem 0 0}

/* --------------------------------------------------------------- footer -- */
.site-footer{background:var(--studio-ink);padding:2.2rem 0 1.8rem;border-top:1px solid rgba(224,162,31,.28)}
.foot-top{display:flex;justify-content:space-between;gap:1.5rem;flex-wrap:wrap;align-items:center}
.foot-links{display:flex;gap:1.4rem;flex-wrap:wrap;font-size:.9rem;list-style:none;margin:0;padding:0}
.foot-links li{list-style:none}
.foot-links a{color:#b9c0c8;text-decoration:none}
.foot-links a:hover{color:var(--studio-amber)}
.foot-legal{
  display:flex;align-items:center;gap:.9rem;flex-wrap:wrap;
  margin-top:1.3rem;padding-top:1.1rem;border-top:1px solid rgba(185,192,200,.16);
}
.disclaimer{flex:1 1 32ch;font-size:.74rem;color:#8b949e;line-height:1.55;max-width:68ch;margin:0}
.age{
  flex:none;
  display:inline-flex;align-items:center;justify-content:center;
  width:2rem;height:2rem;border:1.5px solid var(--studio-amber);border-radius:50%;
  color:var(--studio-amber);font-weight:700;font-size:.7rem;font-family:Archivo,system-ui,sans-serif;
}
.copy{flex:none;font-size:.74rem;color:#6f7780;margin:0}

/* ------------------------------------- pages not built with Elementor ---- */
.page-body{padding:4.5rem 0 5rem}
.page-body .wrap{max-width:72ch}
.page-body h1{font-size:clamp(2rem,4vw,2.9rem);margin:0 0 2rem}
.page-body h2{font-size:1.4rem;color:var(--gold);margin:2.4rem 0 .9rem}
.page-body h3{font-size:1.1rem;color:var(--bone);margin:1.8rem 0 .6rem}
.page-body p,.page-body li{color:var(--body-text)}
.page-body p{margin:0 0 1.1rem}
.page-body ul,.page-body ol{margin:0 0 1.2rem 1.4rem}
.page-body li{margin-bottom:.45rem}
.page-body table{width:100%;border-collapse:collapse;margin-bottom:1.5rem}
.page-body th,.page-body td{text-align:left;padding:.6rem .8rem;border-bottom:1px solid rgba(201,162,39,.2)}
.page-body th{color:var(--gold);font-weight:600}

/* ----------------------------------------------------------- responsive -- */
@media(max-width:640px){
  .hand{gap:.3rem}
  .card{width:58px}
  .card.hole + .card.hole{margin-right:.7rem}
  .hand-note{font-size:.95rem}
  .rung{grid-template-columns:1.6rem 1fr;row-gap:.2rem;padding:.8rem 1rem}
  .rung .req{grid-column:2;text-align:left}
  .rung[style]{margin-right:0 !important}
  .bar{flex-wrap:wrap;gap:.8rem}
  .site-nav{gap:1.2rem;font-size:.86rem}
  .foot-top{align-items:flex-start}
  .copy{flex:1 1 100%}
}

/* ------------------------------------------- inside the Elementor editor -- */
/* Stop the deal animation replaying on every edit, which is distracting. */
.elementor-editor-active .hand .card{animation:none !important}
