/* =========================================================
   ICEMAN — THEME ENGINE (ice -> molten heat), MELT overlay,
   theme toggle button, and hidden ADMIN panel.
   ========================================================= */

/* ---------- HOT THEME (vars swap live behind the melt curtain) ---------- */
body.hot {
  --ice-deep:  #1a0603;
  --ice-navy:  #3a0f07;
  --ice-blue:  #c2410c;
  --ice-bright:#ff6a1a;
  --ice-cyan:  #ffb24d;
  --ice-white: #fff3ea;
  --frost:     #ffd8b3;
  --glow:      #ff7a2a;
  background: #140402;
}
body.hot::before {
  background: linear-gradient(180deg, rgba(26,4,2,.28), rgba(20,4,2,.6));
}

/* key photos are swapped to real fire art (see js/theme.js). Any photo
   we don't have a fire version for gets a light warm grade so the whole
   world still reads as molten. Swapped media is marked [data-fired]. */
img, .showcase-bg { transition: filter 1.2s ease; }
body.hot img:not([data-fired]) {
  filter: sepia(0.45) saturate(1.9) hue-rotate(-12deg) brightness(1.02) contrast(1.04);
}

/* big hard-coded blue gradients flipped to fire */
body.hot .title-x span,
body.hot .pre-logo,
body.hot .foot-big,
body.hot .page-wipe .pw-logo {
  background: linear-gradient(180deg, #fff7ec 0%, #ffd27a 32%, #ff8a2a 66%, #e8480f 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
body.hot .section-title { background: linear-gradient(180deg,#fff,#ff9b4d); -webkit-background-clip:text; background-clip:text; color:transparent; }
body.hot .scroll-prog { background: linear-gradient(90deg,#e8480f,#ff8a2a,#ffd27a); box-shadow: 0 0 16px #ff7a2a; }
body.hot .hero-x-fade {
  background:
    radial-gradient(58% 58% at 50% 42%, transparent 0%, rgba(26,4,2,.3) 68%, rgba(20,4,2,.92) 100%),
    linear-gradient(180deg, rgba(26,4,2,.55) 0%, transparent 28%, rgba(20,4,2,.97) 100%);
}
body.hot .freeze-meter .tube i { background: linear-gradient(180deg,#ffd27a,#ff6a1a,#e8480f); }

/* spinning snowflake brand mark shouldn't spin once it's a flame */
body.hot .brand .flake { animation: none; filter: drop-shadow(0 0 8px #ff7a2a); }

/* ---------- MELT REVEAL (canvas frost-melt lives in js/melt.js) ---------- */
/* fullscreen heat flash beneath the melting ice for extra punch */
.melt-flash { position: fixed; inset: 0; z-index: 9998; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 50% 62%, rgba(255,150,40,.5), transparent 62%); }
.melt-flash.go { animation: heatflash 1.6s ease-out forwards; }
@keyframes heatflash { 0% { opacity: 0; } 35% { opacity: .85; } 100% { opacity: 0; } }

/* ---------- DISCREET ADMIN TRIGGER (very bottom) ---------- */
.admin-dot { display: inline-flex; align-items: center; gap: 6px; margin-left: 14px; padding: 3px 10px;
  border-radius: 99px; font-size: .68rem; letter-spacing: 2px; text-transform: uppercase;
  color: var(--frost); opacity: .55; border: 1px solid rgba(143,227,255,.22);
  background: rgba(143,227,255,.06); cursor: pointer; vertical-align: middle;
  transition: opacity .3s, background .3s, border-color .3s, color .3s; }
.admin-dot::before { content: "\1F512"; font-size: .7rem; }
.admin-dot:hover { opacity: 1; color: #fff; background: rgba(70,180,255,.16); border-color: var(--ice-bright); }
body.hot .admin-dot:hover { background: rgba(255,138,42,.16); border-color: var(--ice-bright); }

/* ---------- ADMIN MODAL / DASHBOARD ---------- */
.admin-modal { position: fixed; inset: 0; z-index: 10002; display: none; align-items: center; justify-content: center;
  background: rgba(3,12,22,.78); backdrop-filter: blur(8px); padding: 20px; }
.admin-modal.open { display: flex; }
.admin-card { width: min(960px, 96vw); max-height: 90vh; overflow: auto; border-radius: 20px;
  background: linear-gradient(180deg, rgba(12,40,64,.96), rgba(6,20,34,.98));
  border: 1px solid rgba(143,227,255,.25); box-shadow: 0 30px 80px rgba(0,0,0,.6); color: var(--ice-white); }
body.hot .admin-card { background: linear-gradient(180deg, rgba(58,15,7,.96), rgba(26,6,3,.98)); border-color: rgba(255,138,42,.3); }
.admin-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 26px; border-bottom: 1px solid rgba(143,227,255,.15); position: sticky; top: 0;
  background: inherit; backdrop-filter: blur(4px); }
.admin-head h3 { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: 2px; }
.admin-head .x { cursor: pointer; font-size: 1.4rem; opacity: .7; background: none; border: 0; color: inherit; }
.admin-head .x:hover { opacity: 1; }
.admin-body { padding: 24px 26px 30px; }

/* login */
.admin-login { max-width: 420px; margin: 10px auto 24px; }
.admin-login p { color: var(--frost); font-size: .92rem; margin-bottom: 18px; line-height: 1.6; }
.admin-login label { display: block; font-size: .72rem; letter-spacing: 2px; text-transform: uppercase; color: var(--ice-cyan); margin: 14px 0 6px; }
.admin-login input { width: 100%; padding: 13px 15px; border-radius: 12px; border: 1px solid rgba(143,227,255,.3);
  background: rgba(3,16,28,.6); color: var(--ice-white); font: 400 1rem var(--font-body); }
.admin-login input:focus { outline: none; border-color: var(--ice-bright); }
.admin-login .err { color: #ff8a8a; font-size: .85rem; margin-top: 12px; min-height: 1em; }
.admin-login button { width: 100%; margin-top: 18px; }

/* live theme control */
.admin-theme { padding: 18px; border-radius: 16px; margin-bottom: 20px;
  background: rgba(3,16,28,.5); border: 1px solid rgba(143,227,255,.2); }
body.hot .admin-theme { background: rgba(40,8,3,.45); border-color: rgba(255,138,42,.25); }
.at-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.at-title { font-family: var(--font-display); letter-spacing: 1px; font-size: 1.15rem; }
.at-note { font-size: .76rem; color: var(--frost); opacity: .7; }
.at-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.at-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 12px; border-radius: 14px; cursor: pointer;
  background: rgba(3,16,28,.45); border: 1.5px solid rgba(143,227,255,.18); color: var(--ice-white); transition: border-color .25s, transform .2s, background .25s; }
.at-opt:hover { transform: translateY(-2px); }
.at-opt.active { border-color: var(--ice-bright); background: rgba(70,180,255,.12); }
body.hot .at-opt.active { background: rgba(255,138,42,.14); }
.at-opt b { font-size: 1rem; letter-spacing: 1px; }
.at-opt i { font-size: .74rem; color: var(--frost); opacity: .75; font-style: normal; }
.at-orb { width: 34px; height: 34px; border-radius: 50%; margin-bottom: 4px; }
.at-orb.ice { background: radial-gradient(circle at 35% 30%, #d4f0ff, #46b4ff 55%, #1b6fb3); box-shadow: 0 0 16px #5ec8ff; }
.at-orb.hot { background: radial-gradient(circle at 35% 30%, #ffe6b0, #ff7a2a 55%, #e8480f); box-shadow: 0 0 16px #ff7a2a; }
.at-switch { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: .85rem; color: var(--frost); cursor: pointer; }
.at-switch input { width: 18px; height: 18px; accent-color: var(--ice-bright); cursor: pointer; }

/* dashboard */
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.admin-stat { padding: 16px; border-radius: 14px; background: rgba(3,16,28,.5); border: 1px solid rgba(143,227,255,.18); cursor: pointer; transition: border-color .25s, transform .2s; }
.admin-stat:hover { transform: translateY(-2px); border-color: var(--ice-bright); }
.admin-stat.active { border-color: var(--ice-bright); background: rgba(70,180,255,.12); }
body.hot .admin-stat.active { background: rgba(255,138,42,.14); }
.admin-stat b { font-family: var(--font-display); font-size: 2rem; display: block; color: var(--ice-bright); }
.admin-stat span { font-size: .76rem; color: var(--frost); letter-spacing: .5px; }
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.admin-toolbar .area-title { font-family: var(--font-display); letter-spacing: 1px; font-size: 1.15rem; margin-right: auto; }
.admin-btn { padding: 8px 14px; border-radius: 10px; border: 1px solid rgba(143,227,255,.3); background: rgba(3,16,28,.5);
  color: var(--ice-white); font: 600 .76rem var(--font-body); letter-spacing: 1px; cursor: pointer; transition: border-color .2s, background .2s; }
.admin-btn:hover { border-color: var(--ice-bright); }
.admin-btn.danger:hover { border-color: #ff6a6a; color: #ff9a9a; }
.admin-list { display: flex; flex-direction: column; gap: 8px; }
.admin-row { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 13px 16px; border-radius: 12px;
  background: rgba(3,16,28,.45); border: 1px solid rgba(143,227,255,.12); }
.admin-row .k { color: var(--ice-cyan); font-size: .7rem; text-transform: uppercase; letter-spacing: 1px; }
.admin-row .v { font-size: .95rem; }
.admin-row .when { width: 100%; font-size: .72rem; color: var(--frost); opacity: .7; }
.admin-empty { padding: 40px; text-align: center; color: var(--frost); opacity: .65; }
@media (max-width: 680px) { .admin-stats { grid-template-columns: repeat(2, 1fr); } }

/* small contact form block */
.info-form { display: grid; gap: 12px; max-width: 560px; }
.info-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.info-form input, .info-form select, .info-form textarea {
  width: 100%; padding: 13px 15px; border-radius: 12px; border: 1px solid rgba(143,227,255,.28);
  background: rgba(3,16,28,.55); color: var(--ice-white); font: 400 1rem var(--font-body); }
.info-form textarea { min-height: 110px; resize: vertical; }
.info-form input:focus, .info-form select:focus, .info-form textarea:focus { outline: none; border-color: var(--ice-bright); }
.info-form .ok { color: var(--ice-cyan); font-size: .9rem; min-height: 1em; }
@media (max-width: 560px) { .info-form .row2 { grid-template-columns: 1fr; } }

/* flatten the hero's 3D depth on touch / small screens (parallax is off there) */
@media (max-width: 820px), (pointer: coarse) {
  .hero-x { perspective: none; }
  .hero-x-content, .hero-x-content .kicker, .title-x, .hero-date,
  .hero-x-sub, .hero-x .count-wrap, .hero-x .cta-row { transform: none; }
}
