/* assets/css/raphaelmatch.css */

/* =========================
   THEME TOKENS
========================= */
:root{
  /* Deep night base */
  --bg1:#0b1220;
  --bg2:#0f1b36;

  /* Gold accents */
  --gold1:#d4af37;  /* classic gold */
  --gold2:#ffcf5a;  /* warm amber */
  --gold3:#b98b1d;  /* deeper gold */

  --card:#0e1730cc;
  --card-border:#ffffff1a;

  --text:#eaf0ff;
  --muted:#c9c2a8;

  --field:#0b1224;
  --field-border:#ffffff24;
  --field-border-focus:#ffcf5a;

  --shadow: 0 20px 60px rgba(0,0,0,.45);
  --radius: 18px;
}

/* =========================
   BASE
========================= */
*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color:var(--text);

  background:
    radial-gradient(1100px 600px at 18% 12%, rgba(212,175,55,.22) 0%, transparent 58%),
    linear-gradient(180deg, var(--bg1), var(--bg2));

  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px 16px;
}

/* Container (used on non-split pages) */
.rm-wrap{
  width: min(560px, 100%);
}

/* =========================
   BRAND HEADER
========================= */
.rm-brand{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:14px;
}

.rm-mark{
  width:40px;
  height:40px;
  border-radius:14px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.45) 0%, transparent 52%),
    linear-gradient(135deg, var(--gold1), var(--gold2));
  box-shadow: 0 10px 30px rgba(212,175,55,.18);
}

.rm-title{
  font-size: 22px;
  line-height: 1.15;
  margin:0;
  letter-spacing: .2px;
}

.rm-subtitle{
  margin:2px 0 0;
  color:var(--muted);
  font-size: 13px;
}

/* =========================
   CARD + TYPOGRAPHY
========================= */
.rm-card{
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  backdrop-filter: blur(10px);
}

.rm-h2{
  margin:0 0 6px;
  font-size: 20px;
  letter-spacing: .2px;
}

.rm-help{
  margin:0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

/* =========================
   FORM
========================= */
.rm-form{
  display:flex;
  flex-direction:column;
  gap: 12px;
}

.rm-label{
  font-size: 13px;
  color: var(--muted);
}

.rm-input{
  width:100%;
  padding: 14px 14px;
  font-size: 16px;
  color:var(--text);
  background: var(--field);
  border: 1px solid var(--field-border);
  border-radius: 14px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .05s ease;
}

.rm-input::placeholder{
  color: rgba(201,194,168,.72);
}

.rm-input:focus{
  border-color: var(--field-border-focus);
  box-shadow: 0 0 0 4px rgba(255,207,90,.20);
}

.rm-actions{
  display:flex;
  align-items:center;
  gap: 12px;
  margin-top: 2px;
}

.rm-btn{
  appearance:none;
  border:0;
  cursor:pointer;
  width:100%;
  padding: 13px 16px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .2px;
  color:#1a1204;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--gold1), var(--gold2));
  box-shadow: 0 16px 40px rgba(212,175,55,.18);
  transition: transform .08s ease, filter .15s ease, box-shadow .15s ease;
}

.rm-btn:hover{
  filter: brightness(1.03);
  box-shadow: 0 18px 48px rgba(255,207,90,.20);
}

.rm-btn:active{
  transform: translateY(1px);
}

.rm-foot{
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.rm-foot strong{
  color: var(--text);
  font-weight: 600;
}

/* =========================
   NEXT EVENT + COUNTDOWN
========================= */
.rm-event{
  margin-bottom: 16px;
}

.rm-event-row{
  display:flex;
  flex-direction: column;
  gap: 14px;
}

.rm-event-title{
  margin:0;
  font-size: 18px;
  letter-spacing: .2px;
}

.rm-event-meta{
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.rm-countdown-wrap{
  display:flex;
  flex-direction: column;
  gap: 8px;
}

.rm-countdown-label{
  margin:0;
  color: var(--muted);
  font-size: 13px;
}

.rm-countdown{
  display:grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 10px;
}

.rm-timebox{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,207,90,.22);
  border-radius: 14px;
  padding: 10px 12px;
  text-align:center;
  min-width: 70px;
}

.rm-timebox span{
  display:block;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: .3px;
}

.rm-timebox small{
  display:block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

.rm-countdown.is-done .rm-timebox{
  opacity: .85;
}

/* Small ET note + live ET clock (used on index split page) */
.rm-et-note{
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.rm-et-now{
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

@media (min-width: 520px){
  .rm-event-row{
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .rm-countdown-wrap{
    align-items: flex-end;
  }
}

/* =========================
   OPTIONAL HERO
========================= */
.rm-hero{
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  background: rgba(0,0,0,.35);
}

.rm-hero img{
  display:block;
  width:100%;
  height:auto;
}

/* =========================
   SPLIT HOMEPAGE (LEFT CONTENT / RIGHT IMAGE)
========================= */
body.rm-split{
  padding:0;
  display:grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  height:100vh;
  overflow:hidden;
  background:none;
}

.rm-leftpane{
  height:100vh;
  overflow:hidden;
  padding: 24px 16px;
  display:flex;
  align-items:center;
  justify-content:center;

  background:
    radial-gradient(1100px 600px at 18% 12%, rgba(212,175,55,.22) 0%, transparent 58%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
}

.rm-leftwrap{
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  overflow:auto;
  padding-right: 6px;
  margin: 0 auto;
}

/* RIGHT SIDE */
.rm-rightpane{
  height:100vh;
  min-height:100vh;
  position: relative;
  overflow:visible;      /* allow shadow to show */
  background:#ffffff;    /* letterbox background on desktop */
  padding: 22px;         /* space around the image card */

  display:flex;
  align-items:center;
  justify-content:center;
}

/* Desktop: show whole image (no cropping) + 3D card styling */
.rm-rightimg{
  width:100%;
  height:100%;
  object-fit: contain;
  object-position: center;
  display:block;

  border-radius: 22px;
  box-shadow:
    0 18px 50px rgba(0,0,0,.25),
    0 2px 10px rgba(0,0,0,.18);
  border: 1px solid rgba(0,0,0,.08);

  position: relative;
  z-index: 1; /* ensure it sits above overlay */
}

/* Overlay gradient (BEHIND the image so it doesn’t dull the 3D look) */
.rm-rightpane::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(90deg, rgba(11,18,32,.28), rgba(11,18,32,0));
  pointer-events:none;
  z-index: 0;
}

/* If the image fails, show a hint */
.rm-rightpane.rm-img-fail::after{
  content:"Image failed to load. Check: /assets/img/raphaelmatch-hero.png";
  position:absolute;
  left:12px;
  bottom:12px;
  padding:8px 10px;
  border-radius:12px;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.18);
  font-size: 12px;
  color: #fff;
  max-width: calc(100% - 24px);
  word-break: break-word;
  z-index: 2;
}

/* =========================
   MOBILE (FIXED)
   - Responsive image (keeps proportions)
   - Still shows as a “card” with rounded corners + shadow
========================= */
@media (max-width: 860px){
  body.rm-split{
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    height:auto;
    overflow:auto;
  }

  .rm-rightpane{
    height:auto;
    min-height:0;
    background:#ffffff;
    padding: 14px;
    display:block;
  }

  .rm-rightimg{
    width:100%;
    height:auto;        /* keep perfect proportions */
    max-height: 62vh;   /* don’t let it get insanely tall */
    object-fit: contain;
    border-radius: 18px;
  }

  .rm-leftpane{
    height:auto;
    overflow:visible;
    display:block;
    padding: 18px 14px;
  }

  .rm-leftwrap{
    max-height:none;
    overflow:visible;
    padding-right:0;
  }
}

/* =========================
   ACCESSIBILITY / PREFS
========================= */
@media (prefers-reduced-motion: reduce){
  .rm-input, .rm-btn{ transition:none; }
}

/* =========================
   LIGHT MODE
========================= */
@media (prefers-color-scheme: light){
  :root{
    --bg1:#fff8e6;
    --bg2:#f2e6c8;

    --card:#ffffffcc;
    --card-border:#1a120412;

    --text:#1a1204;
    --muted:#6a5a3a;

    --field:#ffffff;
    --field-border:#1a120422;
    --field-border-focus:#b98b1d;

    --shadow: 0 18px 55px rgba(40,30,10,.12);
  }

  body{
    background:
      radial-gradient(1100px 600px at 18% 12%, rgba(212,175,55,.18) 0%, transparent 60%),
      linear-gradient(180deg, var(--bg1), var(--bg2));
  }

  .rm-btn{ color:#1a1204; }

  /* Light-mode overlay */
  .rm-rightpane::before{
    background: linear-gradient(90deg, rgba(255,248,230,.10), rgba(255,248,230,0));
  }
}
