/*
Theme Name: Caxse - Un Año Contigo
Theme URI: https://caxse.com
Author: Caxse
Author URI: https://caxse.com
Description: Tema de WordPress para una experiencia de pantalla completa con scroll vertical animado. Cada sección aparece y se desvanece al deslizar, creando una presentación inmersiva de momentos especiales.
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: caxse
Tags: one-column, custom-colors, full-width-template
*/


/* ── @font-face: Awesome Serif Medium Tall ── */
@font-face {
  font-family: 'Awesome Serif Tall';
  src: url('fonts/AwesomeSerif-MediumTall.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ── @font-face: DM Sans ── */
@font-face {
  font-family: 'DM Sans';
  src: url('fonts/DMSans-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('fonts/DMSans-Regular-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('fonts/DMSans-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('fonts/DMSans-Bold-Italic.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}


/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
  --color-bg: #ffffff;
  --color-bg-dark: #ffffff;
  --color-bg-warm: #f7f7f7;
  --color-accent: #999999;
  --color-accent-light: #cccccc;
  --color-accent-deep: #555555;
  --color-gold: #888888;
  --color-gold-light: #bbbbbb;
  --color-cream: #f5f5f5;
  --color-brown: #111111;
  --color-brown-light: #666666;
  --color-text: #111111;
  --color-text-light: #666666;
  --color-white: #ffffff;
  --color-overlay: rgba(0, 0, 0, 0.7);
  --color-terracotta: #cc0000;
  --color-sand: #cccccc;

  --font-script: 'Awesome Serif Tall', Georgia, serif;
  --font-serif: 'Awesome Serif Tall', Georgia, serif;
  --font-sans: 'DM Sans', 'Segoe UI', sans-serif;

  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-polaroid: 4px 6px 20px rgba(0, 0, 0, 0.10);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.12);

  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ========================================
   RESET & BASE
   ======================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  overflow: hidden;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #333333;
  text-decoration: none;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.3;
}

.script-text {
  font-family: var(--font-script);
}


/* ========================================
   PECAS GAME — FULLSCREEN
   ======================================== */
.dog-game-fullscreen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.dog-game-hud-float {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
  z-index: 6;
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

.dog-game-hud-float span {
  color: rgba(0,0,0,0.7);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(6px);
  padding: 6px 18px;
  border-radius: 20px;
  border: 1px solid rgba(0,0,0,0.1);
}

.dog-game-hud-float strong {
  color: #111;
}

.btn-play-game {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  color: #111;
  border: 2px solid rgba(0,0,0,0.15);
  padding: 18px 52px;
  border-radius: 50px;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  cursor: pointer;
  letter-spacing: 3px;
  transition: var(--transition-smooth);
  z-index: 6;
}

.btn-play-game:hover {
  background: rgba(0,0,0,0.06);
  transform: translate(-50%, -50%) scale(1.06);
  box-shadow: 0 0 40px rgba(0,0,0,0.06);
}

.dog-game-controls {
  display: none;
  gap: 20px;
  justify-content: center;
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
}

.dog-control-btn {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.15);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(6px);
  color: #111;
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.dog-control-btn:active {
  background: rgba(0,0,0,0.08);
  transform: scale(0.9);
}

.dog-game-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  z-index: 10;
}

.dog-game-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.dog-game-overlay h3 {
  font-family: var(--font-script);
  font-size: 2.5rem;
  color: #111;
  margin-bottom: 12px;
}

.dog-game-overlay p {
  font-family: var(--font-serif);
  font-style: italic;
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 28px;
}

.btn-continue {
  background: transparent;
  color: #111;
  border: 2px solid rgba(0,0,0,0.2);
  padding: 14px 44px;
  border-radius: 50px;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  letter-spacing: 1px;
}

.btn-continue:hover {
  background: #111;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}


/* ========================================
   SITE PASSWORD OVERLAY
   ======================================== */
.site-password-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.site-password-overlay.unlocked {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.site-password-content {
  text-align: center;
  max-width: 420px;
  width: 100%;
  padding: 0 24px;
}

.site-password-title {
  font-size: 4rem;
  margin-bottom: 20px;
  animation: pulse 2s ease infinite;
}

.site-password-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 32px;
}

.site-password-form {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.site-password-form input {
  flex: 1;
  padding: 16px 24px;
  border: 2px solid rgba(0,0,0,0.12);
  border-radius: 50px;
  background: rgba(0,0,0,0.03);
  color: #111;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  text-align: center;
  letter-spacing: 3px;
  outline: none;
  transition: var(--transition-smooth);
}

.site-password-form input:focus {
  border-color: #111;
  box-shadow: 0 0 20px rgba(0,0,0,0.06);
}

.site-password-form input::placeholder {
  color: rgba(0,0,0,0.3);
  letter-spacing: 1px;
}

.btn-site-unlock {
  padding: 16px 32px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  letter-spacing: 1px;
}

.btn-site-unlock:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.site-password-error {
  color: var(--color-terracotta);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  min-height: 1.4em;
}

.site-password-error.visible {
  opacity: 1;
  animation: shake 0.5s ease;
}


/* ========================================
   LOVE LETTER CARD
   ======================================== */
.fp-letter-card {
  max-width: 580px;
  width: 100%;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 16px;
  padding: 48px 40px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.06);
  text-align: left;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease 0.15s, transform 0.6s ease 0.15s;
  max-height: 80vh;
  overflow-y: auto;
}

.fp-section.active .fp-letter-card {
  opacity: 1;
  transform: translateY(0);
}

.letter-body {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1.85;
  color: #333;
  margin-bottom: 16px;
}

.letter-body:first-child {
  font-style: italic;
  font-size: 1.05rem;
  color: #111;
  margin-bottom: 20px;
}

.letter-closing {
  font-style: italic;
  font-weight: 600;
  color: #111;
  margin-top: 24px;
}

.letter-signature {
  font-family: var(--font-script);
  font-size: 1.8rem;
  color: #111;
  margin-top: 8px;
  text-align: right;
}

.letter-photo {
  margin-top: 28px;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-cream);
  aspect-ratio: 4/3;
}

.letter-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* SVG placeholder should not be forced to fill the aspect-ratio */
.letter-photo img[src$=".svg"] {
  object-fit: contain;
  padding: 24px;
  opacity: 0.3;
}

/* Allow internal scroll inside sections that contain scrollable cards */
.fp-section:has(.fp-letter-card) {
  overflow: visible;
}


/* ========================================
   CLOSING SECTION — TIME COUNTER
   ======================================== */
.time-counter {
  display: inline-flex;
  gap: 24px;
  background: rgba(0,0,0,0.04);
  padding: 24px 40px;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.1);
  margin-bottom: 40px;
}

.time-unit {
  text-align: center;
}

.time-unit .number {
  display: block;
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: #111;
}

.time-unit .label {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.7;
}

.btn-love {
  display: inline-block;
  margin-top: 30px;
  padding: 16px 48px;
  background: transparent;
  border: 2px solid #111;
  color: #111;
  border-radius: 50px;
  font-family: var(--font-script);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-love:hover {
  background: #111;
  color: #fff;
  transform: scale(1.05);
}


/* ========================================
   ADMIN SKIP BUTTON (games)
   ======================================== */
.btn-skip-game {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 12;
  padding: 8px 20px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 30px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 1px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s ease, background 0.3s ease;
}

.btn-skip-game:hover {
  opacity: 1;
  background: rgba(0,0,0,0.75);
}


/* ========================================
   KEYFRAME ANIMATIONS
   ======================================== */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40%  { transform: translateX(-50%) translateY(-12px); }
  60%  { transform: translateX(-50%) translateY(-6px); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.1); opacity: 0.7; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}


/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .dog-game-controls {
    display: flex;
  }

  .dog-game-hud {
    gap: 12px;
    font-size: 0.85rem;
  }

  .dog-game-hud span {
    padding: 4px 12px;
  }

  .time-counter {
    gap: 16px;
    padding: 20px 24px;
  }

  .time-unit .number {
    font-size: 1.6rem;
  }

  .site-password-form {
    flex-direction: column;
  }

  .fp-letter-card {
    padding: 32px 24px;
  }

  .letter-body {
    font-size: 0.88rem;
  }

  .letter-signature {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .dog-control-btn {
    width: 60px;
    height: 60px;
    font-size: 1.3rem;
  }

  .dog-game-overlay h3 {
    font-size: 1.6rem;
  }

  .dog-game-overlay p {
    font-size: 0.95rem;
    padding: 0 20px;
  }
}
