/* ═══════════════════════════════════════════════════════════
   FLOWMODORO — Design System v2
   Editorial premium · Crema/Cobre día · Obsidiana/Ámbar noche
═══════════════════════════════════════════════════════════ */

/* ─── Design tokens (Light — crema cálido) ─── */
:root {
  /* Fuentes */
  --font-display: 'Cormorant Garamond', serif;
  --font-hero: 'Cormorant Garamond', serif;
  --font-ui: 'Outfit', sans-serif;

  /* Paleta base día (crema cálido) */
  --cream-50:  #FDFAF4;
  --cream-100: #F7F0E3;
  --cream-200: #EDE3D0;
  --cream-300: #D9CCBA;

  /* Acento día: terracota/siena */
  --copper-300: #D4956A;
  --copper-400: #C8844A;
  --copper-500: #A86D2E;
  --copper-600: #8A5520;

  /* Paleta base noche (obsidiana) */
  --obsidian-900: #0A0908;
  --obsidian-800: #0E0D0C;
  --obsidian-700: #141210;
  --obsidian-600: #1C1916;

  /* Acento noche: ámbar/cobre metálico */
  --amber-300: #E8C070;
  --amber-400: #C8A050;
  --amber-500: #A07830;
  --amber-600: #785818;

  /* Tokens semánticos: modo día */
  --bg-primary:   #F2EDE4;
  --bg-secondary: #FDFAF4;
  --bg-surface:   #FDFAF4;
  --bg-alt:       #EDE8DF;
  --bg-card:      rgba(253, 250, 244, 0.92);

  --text-primary:   #1A1612;
  --text-secondary: #6B5840;
  --text-muted:     #9B8870;

  --border:        rgba(26, 22, 18, 0.09);
  --border-strong: rgba(26, 22, 18, 0.18);

  --accent:        var(--copper-400);
  --accent-subtle: rgba(200, 132, 74, 0.1);
  --accent-ring:   var(--copper-300);

  /* Sombras día (cálidas) */
  --shadow-sm: 0 1px 3px rgba(26,22,18,0.06), 0 1px 2px rgba(26,22,18,0.04);
  --shadow-md: 0 4px 16px rgba(26,22,18,0.08), 0 2px 6px rgba(26,22,18,0.05);
  --shadow-lg: 0 12px 40px rgba(26,22,18,0.10), 0 4px 12px rgba(26,22,18,0.06);
  --shadow-xl: 0 24px 64px rgba(26,22,18,0.12);

  /* Colores de modo timer */
  --mode-work:  #C8844A;
  --mode-short: #7A9E8A;
  --mode-long:  #8A9E7A;

  /* Radios: austeros */
  --radius-sm:   4px;
  --radius-md:   6px;
  --radius-lg:   10px;
  --radius-xl:   14px;
  --radius-full: 2px;

  --nav-height: 52px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* ───────────── HERO & PARALLAX ───────────── */
  --hero-orb-1: radial-gradient(ellipse at 20% 50%, rgba(210, 155, 100, 0.35) 0%, transparent 60%);
  --hero-orb-2: radial-gradient(ellipse at 80% 20%, rgba(180, 120, 80, 0.25) 0%, transparent 55%);
  --hero-orb-3: radial-gradient(ellipse at 60% 80%, rgba(230, 195, 150, 0.3) 0%, transparent 50%);
  --hero-bg: var(--bg-primary);
  --hero-noise-opacity: 0.04;
}

/* ─── Dark mode tokens ─── */
[data-theme="dark"] {
  --bg-primary:   #0E0D0C;
  --bg-secondary: #141210;
  --bg-surface:   #1C1916;
  --bg-alt:       #181510;
  --bg-card:      rgba(20, 18, 16, 0.92);

  --text-primary:   #E8DDD0;
  --text-secondary: #8A7860;
  --text-muted:     #5A4E40;

  --border:        rgba(200, 160, 80, 0.1);
  --border-strong: rgba(200, 160, 80, 0.2);

  --accent:        var(--amber-400);
  --accent-subtle: rgba(200, 160, 80, 0.1);
  --accent-ring:   var(--amber-300);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.35);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.6);
  --shadow-xl: 0 24px 64px rgba(0,0,0,0.7);

  --mode-work:  #C8A050;
  --mode-short: #7A9E8A;
  --mode-long:  #8A9E7A;

  /* ───────────── HERO & PARALLAX ───────────── */
  --hero-orb-1: radial-gradient(ellipse at 20% 50%, rgba(200, 160, 60, 0.3) 0%, transparent 60%);
  --hero-orb-2: radial-gradient(ellipse at 80% 20%, rgba(160, 100, 30, 0.2) 0%, transparent 55%);
  --hero-orb-3: radial-gradient(ellipse at 60% 80%, rgba(220, 180, 80, 0.25) 0%, transparent 50%);
  --hero-bg: var(--bg-primary);
  --hero-noise-opacity: 0.06;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { 
  scroll-behavior: smooth; 
  font-size: 106.25%; /* 17px base for better readability */
}

body {
  font-family: var(--font-ui);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
  min-width: 320px;
}

img, svg { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
a { text-decoration: none; color: inherit; }
input { font-family: inherit; }

/* ═══ NAVBAR ═══════════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(242, 237, 228, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
}

[data-theme="dark"] .navbar {
  background: rgba(14, 13, 12, 0.95);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.8rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  flex-shrink: 0;
}

.logo-img { width: 1.25rem; height: 1.25rem; object-fit: contain; }

.nav-links {
  display: flex;
  gap: 0.25rem;
  flex: 1;
}

.nav-link {
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: all var(--transition);
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--accent-subtle);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.icon-btn {
  width: 38px; height: 38px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  background: var(--bg-alt);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  transition: all var(--transition);
  border: 1px solid var(--border);
}

.icon-btn:hover {
  background: var(--accent-subtle);
  color: var(--accent);
  border-color: var(--accent);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  margin-left: auto;
}

.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: var(--transition);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 0.75rem 1.5rem 1rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  gap: 0.25rem;
}

.mobile-menu.open { display: flex; }
.mobile-menu .nav-link { padding: 0.6rem 0.9rem; }

/* ═══ BUTTONS ══════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  padding: 0.9rem 2.25rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: var(--text-primary);
  color: var(--bg-primary);
  box-shadow: none;
  border: none;
  transition: all var(--transition);
}

[data-theme="dark"] .btn-primary {
  background: var(--accent);
  color: var(--obsidian-800);
}

.btn-primary:hover {
  background: var(--accent);
  color: var(--bg-primary);
  box-shadow: none;
}

[data-theme="dark"] .btn-primary:hover {
  color: var(--obsidian-800);
}

.btn-primary:active { opacity: 0.9; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  padding: 0.9rem 1.75rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  transition: all var(--transition);
}

.btn-ghost:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-subtle);
}

.btn-large { padding: 0.9rem 2rem; }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.78rem; }

/* ═══ HERO ══════════════════════════════════════════════════ */
/* ─── Hero container ─── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + 3rem) 1.5rem 4rem;
  overflow: hidden;
  text-align: center;
  background-color: var(--hero-bg);
}

/* ─── Capa de orbs ─── */
.hero__gradient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero__orb {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform;
}

.hero__orb--1 {
  top: -100px;
  left: -150px;
  background: var(--hero-orb-1);
  animation: orb-float-1 12s ease-in-out infinite;
}

.hero__orb--2 {
  top: -50px;
  right: -200px;
  width: 500px;
  height: 500px;
  background: var(--hero-orb-2);
  animation: orb-float-2 15s ease-in-out infinite;
}

.hero__orb--3 {
  bottom: -200px;
  left: 30%;
  width: 700px;
  height: 400px;
  background: var(--hero-orb-3);
  animation: orb-float-3 18s ease-in-out infinite;
}

/* ─── Textura grain (noise) ─── */
.hero__noise {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: var(--hero-noise-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ─── El contenido queda sobre las capas ─── */
.hero__content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

/* ─── Parallax base styles ─── */
.section-parallax {
  position: relative;
  overflow: hidden;
  will-change: transform;
}

.section-parallax__bg {
  position: absolute;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  transition: none;
}

.section-parallax > *:not(.section-parallax__bg) {
  position: relative;
  z-index: 1;
}

/* ─── Decoradores de sección ─── */
.deco-circle {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.12;
  background: var(--accent);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.deco-blob {
  position: absolute;
  width: 500px;
  height: 300px;
  filter: blur(80px);
  opacity: 0.1;
  background: radial-gradient(ellipse, var(--accent), transparent);
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  top: 0;
  right: -100px;
}

[data-theme="dark"] .deco-circle,
[data-theme="dark"] .deco-blob {
  opacity: 0.18;
}

/* ─── Animaciones de flotado suave ─── */
@keyframes orb-float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(40px, -30px) scale(1.05); }
  66%       { transform: translate(-20px, 20px) scale(0.97); }
}

@keyframes orb-float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40%       { transform: translate(-50px, 30px) scale(1.08); }
  70%       { transform: translate(20px, -20px) scale(0.95); }
}

@keyframes orb-float-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%       { transform: translate(30px, -40px) scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__orb,
  .hero::before {
    animation: none !important;
  }
}


.hero-badge {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-md);
  background: var(--bg-alt);
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-hero);
  font-size: clamp(3.8rem, 9vw, 7rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.hero-title span:last-child {
  font-style: italic;
  font-weight: 300;
}

.hero-title em {
  font-style: normal;
  color: var(--accent);
  font-weight: 400;
}

.gradient-text {
  color: var(--accent);
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  -webkit-text-fill-color: unset;
}

.hero-subtitle {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 2rem;
  line-height: 1.85;
  letter-spacing: 0.01em;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-stats {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1.5rem;
}

.stat-num {
  font-family: var(--font-ui);
  font-size: 2.2rem;
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.25rem;
  white-space: nowrap;
}

.stat-divider {
  width: 1px;
  height: 30px;
  background: var(--border-strong);
  flex-shrink: 0;
  margin: 8px 0 0;
}

/* ═══ SECTIONS ═════════════════════════════════════════════ */
.section {
  padding: 5rem 1.5rem;
}

.section-alt {
  background: var(--bg-alt);
}

[data-theme="dark"] .section-alt {
  background: var(--bg-secondary);
}

.container {
  max-width: 860px;
  min-width: 0;
  margin: 0 auto;
  width: 100%;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-badge {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-md);
  background: var(--bg-alt);
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-ui);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.85;
  letter-spacing: 0.01em;
}

/* ═══ TIMER CARD ════════════════════════════════════════════ */
.timer-card {
  background: transparent;
  border: none;
  border-radius: var(--radius-xl);
  padding: 0;
  box-shadow: none;
  text-align: center;
  transition: all var(--transition);
  max-width: 520px;
  min-width: 280px;
  width: 100%;
  margin: 0 auto;
}

[data-theme="dark"] .timer-card {
  background: transparent;
  border: none;
  box-shadow: none;
}

/* Mode tabs */
.mode-tabs {
  display: flex;
  gap: 0;
  background: transparent;
  border-radius: 0;
  padding: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

[data-theme="dark"] .mode-tabs {
  background: transparent;
}

.mode-tab {
  flex: 1;
  padding: 0.6rem 0;
  border-radius: 0;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border-bottom: 1.5px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition);
  white-space: nowrap;
}

.mode-tab.active {
  color: var(--accent);
  background: transparent;
  box-shadow: none;
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* Unificar tabs de color por modo — todo al acento */
body[data-mode="work"] #tab-work.active,
body[data-mode="short"] #tab-short.active,
body[data-mode="long"] #tab-long.active {
  background: transparent;
  color: var(--accent);
  box-shadow: none;
  border-bottom-color: var(--accent);
}

/* ═══ FLIP CLOCK (PERFECCIÓN MECÁNICA) ════════════════════ */
:root {
  --flip-w: 120px;
  --flip-h: 220px;
  --flip-font-size: 10rem;
  --flip-radius: 12px;
}

@media (max-width: 768px) {
  :root {
    --flip-w: 80px;
    --flip-h: 150px;
    --flip-font-size: 6.5rem;
    --flip-radius: 8px;
  }
}

@media (max-width: 480px) {
  :root {
    --flip-w: 65px;
    --flip-h: 120px;
    --flip-font-size: 5rem;
    --flip-radius: 6px;
  }
}

.view-flip {
  width: 100%;
  max-width: 650px;
  margin: 0 auto;
}

.flip-clock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}


@media (max-width: 768px) {
  .flip-clock { gap: 0.75rem; }
}

@media (max-width: 480px) {
  .flip-clock { gap: 0.4rem; }
}

.flip-group {
  display: flex;
  gap: 0.75rem;
}

@media (max-width: 480px) {
  .flip-group { gap: 0.4rem; }
}

.flip-card {
  position: relative;
  width: var(--flip-w);
  height: var(--flip-h);
  background-color: #111;
  border-radius: var(--flip-radius);
  font-family: var(--font-ui);
  font-weight: 700;
  color: #FFF;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  transform-style: preserve-3d;
  perspective: 1000px;
}

[data-theme="light"] .flip-card {
  background-color: #F2EDE4;
  color: #1A1612;
  box-shadow: 0 15px 40px rgba(26,22,18,0.15);
}

/* Bisagra central fija */
.flip-card::after {
  content: "";
  position: absolute;
  top: 50%; left: 0;
  width: 100%; height: 2px;
  background-color: rgba(0,0,0,0.9);
  margin-top: -1px;
  z-index: 25;
  transform: translateZ(2px);
}

[data-theme="light"] .flip-card::after {
  background-color: rgba(0,0,0,0.08);
  transform: translateZ(2px);
}

.half {
  position: absolute;
  left: 0; width: 100%; height: 50%;
  background-color: #151515;
  overflow: hidden;
  border-radius: var(--flip-radius);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  /* Fix Safari overflow/border-radius bug */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

[data-theme="light"] .half {
  background-color: #FBF8F2;
}

.half span {
  position: absolute;
  left: 0;
  width: 100%;
  height: var(--flip-h);
  text-align: center;
  font-size: var(--flip-font-size);
  color: #FFF;
  font-weight: 700;
  display: flex;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
}

[data-theme="light"] .half span {
  color: #1A1612;
}

/* Mitades superiores */
.top {
  top: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background: linear-gradient(to bottom, #1A1A1A, #111);
  z-index: 1;
  transform: translateZ(0px);
}

.flap-top {
  top: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background: linear-gradient(to bottom, #1A1A1A, #111);
  z-index: 10;
  transform-origin: bottom center;
  transform: translateZ(1px);
  will-change: transform, filter;
}

.top span, .flap-top span {
  top: 0;
  align-items: center;
}

[data-theme="light"] .top, [data-theme="light"] .flap-top {
  background: linear-gradient(to bottom, #FBF8F2, #F2EDE4);
}

/* Mitades inferiores */
.bottom {
  bottom: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  background: linear-gradient(to bottom, #111, #181818);
  z-index: 1;
  transform: translateZ(0px);
}

.flap-bottom {
  bottom: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  background: linear-gradient(to bottom, #111, #181818);
  z-index: 5;
  transform-origin: top center;
  transform: translateZ(1px) rotateX(90deg);
  will-change: transform, filter;
}

.bottom span, .flap-bottom span {
  bottom: auto;
  top: calc(var(--flip-h) * -0.5);
  align-items: center;
}

[data-theme="light"] .bottom, [data-theme="light"] .flap-bottom {
  background: linear-gradient(to bottom, #F2EDE4, #EBE4D8);
}

/* Animaciones */
.flip-card.flipping .flap-top {
  animation: flipTopAnim 0.4s ease-in forwards;
}

.flip-card.flipping .flap-bottom {
  animation: flipBottomAnim 0.4s ease-out 0.4s forwards;
}

@keyframes flipTopAnim {
  0% { transform: translateZ(1px) rotateX(0deg); filter: brightness(1); }
  100% { transform: translateZ(1px) rotateX(-90deg); filter: brightness(0.4); }
}

@keyframes flipBottomAnim {
  0% { transform: translateZ(1px) rotateX(90deg); filter: brightness(0.4); }
  100% { transform: translateZ(1px) rotateX(0deg); filter: brightness(1); }
}

.flip-sep {
  font-size: calc(var(--flip-font-size) * 0.8);
  font-weight: 300;
  color: var(--text-muted);
  opacity: 0.3;
  line-height: 1;
  display: flex;
  align-items: center;
  height: var(--flip-h);
  padding-bottom: 10px; /* Ajuste fino visual */
}

/* Custom settings styles */
.full-width {
  grid-column: 1 / -1;
}

.setting-input select {
  width: 100%;
  padding: 0.6rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
}

/* Pomodoro counter */
.pomo-counter {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.pomo-dot {
  font-size: 0.9rem;
  opacity: 0.15;
  transition: opacity var(--transition), filter var(--transition);
  filter: grayscale(1);
}

.pomo-dot.active {
  opacity: 1;
  filter: none;
}

/* Controls */
.timer-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.ctrl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  font-family: var(--font-ui);
  font-weight: 400;
  transition: all var(--transition);
}

.ctrl-btn-primary {
  font-size: 0.8rem;
  padding: 1rem 2.5rem;
  border-radius: var(--radius-full);
  background: var(--text-primary);
  color: var(--bg-primary);
  box-shadow: none;
  min-width: 130px;
  border: none;
}

[data-theme="dark"] .ctrl-btn-primary {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(200, 160, 80, 0.35);
}

.ctrl-btn-primary:hover {
  background: var(--accent);
  color: var(--bg-primary);
  box-shadow: none;
}

[data-theme="dark"] .ctrl-btn-primary:hover {
  background: var(--accent);
  color: var(--obsidian-800);
  border-color: var(--accent);
}

.ctrl-btn-ghost {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
}

[data-theme="dark"] .ctrl-btn-ghost {
  background: var(--bg-secondary);
}

.ctrl-btn-ghost:hover {
  background: var(--accent-subtle);
  color: var(--accent);
  border-color: var(--accent);
}

/* Sobrescribir colores de modo en botón — neutros */
body[data-mode="short"] .ctrl-btn-primary,
body[data-mode="long"] .ctrl-btn-primary {
  background: var(--text-primary);
  color: var(--bg-primary);
  box-shadow: none;
}

[data-theme="dark"] body[data-mode="short"] .ctrl-btn-primary,
[data-theme="dark"] body[data-mode="long"] .ctrl-btn-primary {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(200, 160, 80, 0.35);
}

/* Active task bar */
.active-task-bar {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-subtle);
  border: 1px solid rgba(200, 132, 74, 0.2);
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  font-weight: 400;
  color: var(--accent);
}

/* Settings panel */
.settings-panel {
  max-width: 480px;
  margin: 1.5rem auto 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.settings-title {
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.setting-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.setting-item label {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.setting-input {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-strong);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 400;
  transition: border var(--transition);
  width: 100%;
}

.setting-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  width: 44px;
  height: 24px;
  margin-top: 2px;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border-strong);
  border-radius: var(--radius-full);
  transition: background var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: white;
  left: 3px; top: 3px;
  transition: transform var(--transition);
  box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ═══ TASKS ═════════════════════════════════════════════════ */
.task-input-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  align-items: flex-end;
}

.task-input {
  flex: 1;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 300;
  padding: 0.7rem 0;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-primary);
  letter-spacing: 0.01em;
  transition: border-color var(--transition);
}

.task-input:focus {
  outline: none;
  border-bottom-color: var(--accent);
  box-shadow: none;
}

.task-input::placeholder {
  color: var(--text-muted);
  font-weight: 300;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.task-item {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  transition: all var(--transition);
  animation: taskSlideIn 0.2s ease;
  overflow: hidden;
}

.task-item:hover {
  border-bottom-color: var(--accent);
  box-shadow: none;
}

.task-item.active-task {
  border-bottom-color: var(--accent);
  background: var(--accent-subtle);
  box-shadow: none;
}

.task-item.expanded {
  border-bottom-color: var(--accent);
  box-shadow: none;
}

.task-item.done { opacity: 0.6; }
.task-item.done .task-text { text-decoration: line-through; color: var(--text-muted); }

.task-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  width: 100%;
}

.task-check {
  width: 20px; height: 20px;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  color: white;
  font-size: 0.85rem;
}

.task-check:hover { border-color: var(--accent); background: var(--accent-subtle); }
.task-item.done .task-check { background: var(--accent); border-color: var(--accent); }

.task-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.task-text {
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 300;
  letter-spacing: 0.01em;
}

.task-meta {
  display: flex;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background: var(--bg-primary);
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}

.pomo-badge { color: var(--mode-work); }

.task-actions {
  display: flex;
  gap: 0.25rem;
}

.task-action-btn {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: all var(--transition);
  border: none;
  background: transparent;
  cursor: pointer;
}

.task-action-btn:hover { background: var(--accent-subtle); color: var(--accent); }
.task-action-btn.focus-btn.active { background: var(--accent-subtle); color: var(--accent); }
.task-action-btn.focus-btn:hover { background: var(--accent-subtle); color: var(--accent); }

.expand-btn { transition: transform var(--transition); font-size: 0.85rem; }
.task-item.expanded .expand-btn { transform: rotate(180deg); color: var(--accent); }

.task-details {
  display: none;
  padding: 0 1.25rem 1.25rem 1.25rem;
  border-top: 1px dashed var(--border);
  margin-top: 0.25rem;
  animation: detailsFade 0.2s ease;
}

.task-item.expanded .task-details {
  display: block;
}

@keyframes detailsFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes taskSlideIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.details-section {
  margin-top: 1.25rem;
}

.details-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
}

.task-notes-input {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--text-primary);
  resize: vertical;
  min-height: 70px;
  transition: border var(--transition);
}

.task-notes-input:focus { outline: none; border-color: var(--accent); }

.subtask-list { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.5rem; }

.subtask-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 300;
  padding: 0.2rem 0;
}

.subtask-item.done .subtask-text { text-decoration: line-through; color: var(--text-secondary); opacity: 0.7; }

.subtask-check {
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: white; transition: all 0.2s; font-size: 0.75rem;
}

.subtask-item.done .subtask-check { background: var(--mode-short); border-color: var(--mode-short); }

.subtask-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px dashed var(--border);
  padding: 0.4rem 0;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--text-primary);
  transition: border var(--transition);
}

.subtask-input:focus { outline: none; border-bottom-color: var(--accent); border-bottom-style: solid; }

.subtask-delete {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; opacity: 0; margin-left: auto; transition: opacity 0.2s;
  font-size: 0.85rem; padding: 0.2rem;
}

.subtask-item:hover .subtask-delete { opacity: 1; }
.subtask-delete:hover { color: #ef4444; }

.pomo-estimation {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-primary); padding: 0.75rem 1rem; border-radius: var(--radius-md);
}

.pomo-estimation .details-label { margin: 0; }

.pomo-controls {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--bg-card); border-radius: var(--radius-full); padding: 0.25rem;
  border: 1px solid var(--border);
}

.pomo-ctrl-btn {
  background: transparent; border: none; width: 26px; height: 26px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-weight: bold; color: var(--text-secondary); transition: all 0.2s;
}

.pomo-ctrl-btn:hover { background: var(--accent); color: var(--bg-primary); }
.pomo-count {
  font-family: var(--font-ui);
  font-weight: 400;
  color: var(--text-primary);
  font-size: 0.92rem;
  min-width: 40px;
  text-align: center;
}

.task-details-footer { display: flex; justify-content: flex-end; margin-top: 1.5rem; }

.delete-btn {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.75rem;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-radius: var(--radius-md);
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 400;
}
.delete-btn:hover { background: #ef4444; color: white; }

.task-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.task-empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }

/* ═══ GUIDE ═════════════════════════════════════════════════ */
.cycle-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.cycle-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: none;
  min-width: 110px;
  transition: border-color var(--transition);
}

.cycle-step:hover {
  border-color: var(--accent);
  box-shadow: none;
}

.cycle-step-long {
  border-color: var(--border);
  background: var(--bg-surface);
}

[data-theme="dark"] .cycle-step-long {
  background: var(--bg-surface);
}

.cycle-icon { font-size: 2rem; }

.cycle-time {
  font-family: var(--font-ui);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
}

.cycle-label {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-align: center;
}

.cycle-arrow { font-size: 1.25rem; color: var(--text-muted); flex-shrink: 0; }

/* Cards grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.info-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: none;
  transition: border-color var(--transition);
}

.info-card:hover {
  border-color: var(--accent);
  box-shadow: none;
}

.card-icon { font-size: 2rem; margin-bottom: 0.75rem; }

.card-title {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

.card-text {
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.85;
}

/* ═══ FOOTER ════════════════════════════════════════════════ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem;
  text-align: center;
}

.footer-inner {
  max-width: 860px;
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.4rem;
  letter-spacing: 0;
  margin-bottom: 0.5rem;
}

.footer-name { color: var(--text-primary); }

.footer-tagline {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

/* ─── Donation Section ─── */
.donation-section {
  padding: 5rem 1.5rem;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}

[data-theme="dark"] .donation-section {
  background: var(--bg-secondary);
}

.donation-card {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}

.donation-text {
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.donation-actions {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
}

.donation-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  border-radius: var(--radius-lg);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: white;
  transition: all var(--transition);
  min-width: 200px;
}

.donation-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.donation-btn:active {
  transform: translateY(-1px);
}

.mp-btn {
  background-color: #009EE3; /* Mercado Pago Blue */
}

.pp-btn {
  background-color: #003087; /* PayPal Dark Blue */
}

.footer-version {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  opacity: 0.5;
  font-weight: 300;
  margin-left: 0.5rem;
  letter-spacing: 0.05em;
}

.footer-email {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 0.5rem;
}


/* ═══ RESPONSIVE ════════════════════════════════════════════ */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-actions { gap: 0.35rem; }

  .hero { padding-top: calc(var(--nav-height) + 2rem); }
  .hero-stats { flex-wrap: wrap; padding: 0; }
  .stat-item { padding: 0.5rem 1rem; }

  .timer-card { padding: 2rem 1.25rem; }
  .mode-tab { font-size: 0.6rem; padding: 0.4rem 0; letter-spacing: -0.01em; }
  .timer-display { font-size: 4rem; }

  .settings-grid { grid-template-columns: 1fr; }

  .cycle-visual { gap: 0.5rem; }
  .cycle-step { min-width: 90px; padding: 1rem; }
  .cycle-arrow { display: none; }

  .cards-grid { grid-template-columns: 1fr; }

  .task-input-row { 
    flex-direction: column; 
    align-items: stretch;
    gap: 1rem;
  }
  .task-input { width: 100%; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2.8rem; }
  .hero-cta { flex-direction: column; align-items: center; }
  .ctrl-btn-primary { min-width: 120px; padding: 0.8rem 1.75rem; }
}

/* ═══ Desktop PWA narrow window ════════════════════════════ */
@media (max-width: 360px) {
  .hero-stats { display: none; }
  .timer-ring-wrapper { width: 180px; height: 180px; }
  .timer-display { font-size: 3rem; }
  .mode-tab { font-size: 0.58rem; padding: 0.4rem 0; letter-spacing: -0.02em; }
  .ctrl-btn-primary { min-width: 100px; font-size: 0.78rem; }
  .section { padding: 3rem 1rem; }
  .section-title { font-size: 1.75rem; }
  .cycle-step { min-width: 70px; padding: 0.75rem; }
  .cycle-icon { font-size: 1.5rem; }
  .cycle-time { font-size: 1rem; }
}

/* ═══ TIMER MODE TRANSITIONS ════════════════════════════════ */
body[data-mode="short"] .ring-progress { stroke: var(--mode-short); }
body[data-mode="long"] .ring-progress { stroke: var(--mode-long); }

/* ═══ ANIMATIONS ══════════════════════════════════════════ */
@keyframes flipIn {
  0% { transform: translateY(-10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ═══ SMOOTH transitions — solo en elementos que lo necesitan ═ */
a, button, input, textarea,
.nav-link, .icon-btn, .btn-primary, .btn-ghost,
.task-item, .task-check, .task-action-btn,
.info-card, .cycle-step, .mode-tab,
.timer-ring, .ring-progress,
.toggle-slider, .toggle-slider::before {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 0.2s;
  transition-property: background-color, border-color, color, box-shadow, opacity;
}
/* Timer display: sin transición para que marque limpio */
.timer-display { transition: none; }
.ring-progress { transition: stroke-dashoffset 1s linear, stroke var(--transition); }
