/*
Theme Name: Odinn One-Pager
Theme URI: https://odinnmedia.sg
Author: Odinn Media & Creatives (built with Claude)
Description: Custom single-page theme for odinnmedia.sg. Replaces Hello Elementor + Elementor. Content for projects, About, and contact details is editable in wp-admin via Advanced Custom Fields (ACF) — no code or page-builder required for routine edits.
Version: 1.0
Requires PHP: 7.4
Text Domain: odinn-onepager
*/

/* ---------- Reset / base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-snap-type: y proximity; scroll-behavior: smooth; }
body {
  margin: 0;
  background: #fff;
  color: #141414;
  font-family: 'Archivo', sans-serif;
}
a { color: #141414; text-decoration: none; }
a:hover { color: rgba(0,0,0,0.55); }
button { font-family: inherit; }
img { max-width: 100%; display: block; }

.snap { scroll-snap-align: start; scroll-snap-stop: always; }

.wordmark { font-family: 'Press Start 2P', monospace; }

/* ---------- Loading screen ---------- */
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes fill { from { width: 0%; } to { width: 100%; } }
@keyframes railScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.pixel-bg {
  position: fixed; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  image-rendering: pixelated;
  transition: opacity 1s ease, transform 1s ease;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0,0,0,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  z-index: 9999;
}
body.odinn-loaded .pixel-bg { opacity: 0; transform: scale(1.08); }
body:not(.odinn-loaded) .pixel-bg { opacity: 1; transform: scale(1); }

.loader-word { font-size: clamp(14px, 2.4vw, 22px); letter-spacing: 3px; }

.odinn-shell {
  width: 100%; min-height: 100vh; background-color: #ffffff; position: relative; overflow: hidden;
}
.dot-grid-overlay {
  position: fixed; inset: 0; pointer-events: none; z-index: 40; opacity: 0.10;
  background-image: radial-gradient(rgba(0,0,0,0.6) 1px, transparent 1px);
  background-size: 6px 6px;
}
.odinn-page {
  position: relative;
  opacity: 0;
  transition: opacity 1.2s ease 0.3s;
  padding: clamp(64px, 12vw, 140px) clamp(20px, 6vw, 64px) 80px;
}
body.odinn-loaded .odinn-page { opacity: 1; }

/* ---------- Section headers ---------- */
.sec-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: clamp(32px, 5vw, 56px); }
.sec-head .num { color: rgba(0,0,0,0.4); font-family: 'Archivo', sans-serif; font-size: 11px; letter-spacing: 2px; font-weight: 600; }
.sec-head .title { color: #141414; font-family: 'Archivo', sans-serif; font-size: clamp(24px, 3vw, 38px); font-weight: 700; letter-spacing: -0.5px; line-height: 1; }
.sec-head .kicker { color: rgba(0,0,0,0.4); font-family: 'Archivo', sans-serif; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; font-weight: 500; }

/* ---------- Filmstrip (Selected Work) ---------- */
.rail-wrap { overflow: hidden; padding-bottom: 8px; }
.rail {
  display: flex; width: max-content;
  animation: railScroll 90s linear infinite;
}
.rail:hover { animation-play-state: paused; }
.rail-card {
  flex: 0 0 auto; width: min(94vw, 832px);
  margin-right: clamp(24px, 4vw, 48px);
  display: flex; flex-direction: column; gap: 0;
  opacity: 1; transform: translateY(0);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.rail-frame { width: 100%; position: relative; overflow: hidden; background-color: #e8e8e8; display: flex; gap: 4px; }
.rail-frame.portrait { width: min(100%, 470px); aspect-ratio: 3 / 4; }
.rail-frame-img { position: absolute; inset: 0; flex: 1 1 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.1s ease; }
.rail-frame-img.active { opacity: 1; }
.rail-frame.side-by-side .rail-frame-img { position: relative; inset: auto; opacity: 1; }
.rail-dots { display: flex; gap: 6px; margin-top: 12px; height: 3px; }
.rail-dots button { width: 26px; height: 3px; padding: 0; border: 0; border-radius: 0; cursor: pointer; background: rgba(0,0,0,0.25); transition: background 0.25s ease; }
.rail-dots button.active { background: #141414; }
.rail-cap { width: 100%; border-top: 2px solid rgba(0,0,0,0.9); margin-top: 20px; padding-top: 18px; display: grid; grid-template-columns: minmax(160px, 26%) 1fr; gap: clamp(16px, 2.5vw, 28px); align-items: start; }
.rail-cap-head { display: flex; flex-direction: column; gap: 10px; }
.rail-cap-head .n { color: rgba(0,0,0,0.4); font-size: 11px; letter-spacing: 2px; font-weight: 600; }
.rail-cap-head .t { color: #141414; font-size: clamp(24px, 3vw, 38px); font-weight: 700; letter-spacing: -0.5px; line-height: 1; }
.rail-cap-head .k { color: rgba(0,0,0,0.4); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; font-weight: 500; }
.rail-cap p { margin: 0; color: rgba(0,0,0,0.62); font-size: 14px; line-height: 1.8; letter-spacing: 0.1px; max-width: 58ch; }
.rail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.rail-tags span { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: rgba(0,0,0,0.5); border: 1px solid rgba(0,0,0,0.2); padding: 5px 10px; }

/* ---------- Livestreams & Shorts ---------- */
.reels { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(16px, 2.5vw, 28px); }
.reel { flex: 0 1 320px; max-width: 320px; display: flex; flex-direction: column; gap: 12px; }
.reel-frame { position: relative; width: 100%; aspect-ratio: 9 / 16; background: #e8e8e8; overflow: hidden; }
.reel-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.reel-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; color: rgba(0,0,0,0.35); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 600; }
.reel-platform { position: absolute; left: 14px; bottom: 14px; color: rgba(255,255,255,0.85); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,0.6); }
.reel-meta { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid rgba(0,0,0,0.2); padding-top: 10px; }
.reel-meta .t { color: #141414; font-size: 14px; font-weight: 600; }
.reel-meta .m { color: rgba(0,0,0,0.45); font-size: 12px; }

/* ---------- Start a project ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: clamp(32px, 5vw, 64px); align-items: start; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 26px; }
.field label, .service-label { color: rgba(0,0,0,0.4); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; font-weight: 600; }
.field input[type=text], .field input[type=email], .field textarea,
.wpcf7-form-control.wpcf7-text, .wpcf7-form-control.wpcf7-email, .wpcf7-form-control.wpcf7-textarea {
  background: transparent !important; border: 0 !important; border-bottom: 1px solid rgba(0,0,0,0.28) !important;
  color: #141414 !important; font-family: 'Archivo', sans-serif !important; font-size: 16px !important;
  padding: 8px 0 !important; outline: none !important; width: 100%; border-radius: 0 !important;
}
.wpcf7-form-control.wpcf7-textarea { border: 1px solid rgba(0,0,0,0.28) !important; padding: 12px !important; resize: vertical; }
.service-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; margin-bottom: 26px; }
.service-tags button { background: transparent; color: rgba(0,0,0,0.75); border: 1px solid rgba(0,0,0,0.3); padding: 9px 16px; font-size: 12px; letter-spacing: 0.5px; font-weight: 500; cursor: pointer; border-radius: 0; transition: background 0.2s ease, color 0.2s ease; }
.service-tags button.active { background: #141414; color: #fff; }
.wpcf7-submit, .cf7-submit-look {
  background: #141414 !important; color: #ffffff !important; border: 0 !important; padding: 15px 20px !important;
  font-family: 'Archivo', sans-serif !important; font-size: 12px !important; font-weight: 700 !important;
  letter-spacing: 2px !important; text-transform: uppercase !important; text-align: left; cursor: pointer;
  border-radius: 0 !important; width: 100%;
}
.wpcf7-not-valid-tip { font-size: 11px; margin-top: 4px; }
.wpcf7 form.invalid .wpcf7-response-output { border-color: #d32f2f; }
.calendly-col { display: flex; flex-direction: column; gap: 20px; }
.calendly-head { display: flex; align-items: flex-end; justify-content: space-between; border-bottom: 2px solid rgba(0,0,0,0.9); padding-bottom: 14px; }
.calendly-head .k { color: rgba(0,0,0,0.4); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; font-weight: 600; }
.calendly-head .t { color: #141414; font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
.calendly-inline-embed { min-width: 280px; height: 560px; border: 1px solid rgba(0,0,0,0.15); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(28px, 5vw, 64px); align-items: start; }
.about-grid p { margin: 0; color: rgba(0,0,0,0.62); font-size: 14px; line-height: 1.8; max-width: 58ch; }
.about-meta { display: flex; flex-direction: column; gap: 22px; }
.about-meta .row { display: flex; flex-direction: column; gap: 6px; }
.about-meta .lbl { color: rgba(0,0,0,0.4); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; font-weight: 600; }
.about-meta .val { color: #141414; font-size: 15px; }
.about-meta a { border-bottom: 1px solid rgba(0,0,0,0.35); align-self: flex-start; }
.about-elsewhere { display: flex; gap: 18px; }
.about-photo { width: 100%; max-width: 220px; aspect-ratio: 3/4; background-size: cover; background-position: center; margin-bottom: 20px; }

.odinn-footer { margin-top: clamp(48px, 8vw, 88px); border-top: 1px solid rgba(0,0,0,0.2); padding-top: 18px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.odinn-footer .wm { color: rgba(0,0,0,0.3); font-size: 8px; letter-spacing: 2px; }
.odinn-footer .cr { color: rgba(0,0,0,0.3); font-size: 11px; letter-spacing: 1px; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  html { scroll-snap-type: none; }
  .rail-cap { grid-template-columns: 1fr !important; gap: 14px !important; }
  .form-grid { grid-template-columns: 1fr !important; }
  .about-grid { grid-template-columns: 1fr !important; }
  .reel { flex: 1 1 100% !important; max-width: 420px !important; }
  .loader-word { font-size: 20px !important; }
}
