/*
Theme Name: Canal Presidente
Theme URI: https://canalpresidente.com
Author: Canal Presidente
Author URI: https://canalpresidente.com
Description: Tema autónomo minimalista para la home pública de Canal Presidente. Filosofía Apple: tipografía Inter, split 50/50, panel izquierdo con story + modal de invitación, panel derecho con formulario de acceso. Responsive.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: canal-presidente
Tags: custom-colors, custom-logo, custom-menu, featured-images, responsive-layout
*/

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

:root {
  --ink:        #0a0a0f;
  --ink-2:      #17172a;
  --ink-3:      #22223e;
  --accent:     #2f6bff;
  --accent-2:   #6d9bff;
  --paper:      #ffffff;
  --paper-2:    #f6f6f8;
  --muted:      #6b6b7a;
  --line:       #e6e6ec;
  --ok:         #11a372;
  --radius:     14px;
  --radius-lg:  22px;
  --shadow-sm:  0 1px 2px rgba(10,10,15,.05), 0 1px 3px rgba(10,10,15,.06);
  --shadow-md:  0 10px 30px rgba(10,10,15,.08), 0 2px 8px rgba(10,10,15,.05);
  --shadow-lg:  0 30px 60px rgba(10,10,15,.18);
  --ease:       cubic-bezier(.2,.7,.2,1);
}

html, body { height: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-feature-settings: 'ss01','cv11';
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input { font: inherit; color: inherit; }

/* Hide WordPress admin bar spacing on the landing (the bar itself shows for logged-in users) */
body.admin-bar .shell { min-height: calc(100vh - 32px); }
@media screen and (max-width: 782px) {
  body.admin-bar .shell { min-height: calc(100vh - 46px); }
}

/* ----------  Layout (split 50/50)  ---------- */
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

/* ----------  Left panel (product story)  ---------- */
.left {
  position: relative;
  padding: 56px 64px;
  color: #f2f2f7;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(47,107,255,.35), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, rgba(109,155,255,.18), transparent 60%),
    linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 55%, var(--ink-3) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.left::after {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.brand {
  position: relative; z-index: 1;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600;
  font-size: clamp(34px, 4.2vw, 54px);
  letter-spacing: -0.028em;
  line-height: 1.05;
  background: linear-gradient(180deg, #ffffff 0%, #b8c5ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  max-width: 100%;
  word-break: keep-all;
}
.brand .dot-end {
  color: var(--accent-2);
  -webkit-text-fill-color: var(--accent-2);
}

.hero {
  position: relative; z-index: 1;
  max-width: 560px;
  margin-top: 56px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 100px;
  font-size: 12px; font-weight: 500;
  letter-spacing: .02em;
  color: #cfd2e0;
  backdrop-filter: blur(10px);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(17,163,114,.25);
}

h1.cp-hero-title {
  font-size: clamp(34px, 4.2vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.022em;
  font-weight: 600;
  margin: 28px 0 22px;
  color: inherit;
}
h1.cp-hero-title .grad {
  display: inline;
  background: linear-gradient(135deg, #ffffff 0%, #b8c5ff 60%, #6d9bff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  font-size: 17px;
  color: #cbcdd9;
  max-width: 520px;
  font-weight: 400;
}

.features {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 44px;
  max-width: 560px;
}
.feature {
  padding: 18px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(10px);
  transition: transform .35s var(--ease), background .35s var(--ease);
}
.feature:hover { transform: translateY(-2px); background: rgba(255,255,255,.06); }
.feature .ico {
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center;
  background: rgba(47,107,255,.18);
  color: var(--accent-2);
  margin-bottom: 10px;
}
.feature .ico svg { width: 16px; height: 16px; }
.feature h3 { font-size: 14px; font-weight: 600; margin-bottom: 4px; color: #fff; }
.feature p { font-size: 13px; color: #a7aab8; line-height: 1.45; }

.invite-cta {
  position: relative; z-index: 1;
  margin-top: 44px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius);
  max-width: 560px;
}
.invite-cta .txt { font-size: 14px; color: #d7d9e3; }
.invite-cta .txt strong { color: #fff; font-weight: 600; }
.btn-ghost {
  padding: 10px 18px;
  border-radius: 100px;
  background: #fff;
  color: var(--ink);
  font-size: 13px; font-weight: 600;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn-ghost:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(255,255,255,.25); }

.left-foot {
  position: relative; z-index: 1;
  display: flex; gap: 22px; flex-wrap: wrap;
  font-size: 12px; color: #8a8d9c;
}
.left-foot a:hover { color: #fff; }

/* ----------  Right panel (access)  ---------- */
.right {
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  padding: 56px 64px;
}
.card {
  width: 100%;
  max-width: 420px;
}
.card h2 {
  font-size: 28px;
  letter-spacing: -0.022em;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink);
}
.card .sub {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 32px;
}

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 7px;
}
.field .input-wrap { position: relative; }
.field input[type=email],
.field input[type=password],
.field input[type=text] {
  width: 100%;
  padding: 13px 14px 13px 42px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
  font-size: 15px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(47,107,255,.12);
}
.field .icn {
  position: absolute;
  left: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--muted);
  pointer-events: none;
}
.field .toggle-pass {
  position: absolute;
  right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted);
  padding: 6px;
  border-radius: 6px;
}
.field .toggle-pass:hover { color: var(--ink); background: var(--paper-2); }

.row-between {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 22px;
}
.check {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; color: var(--muted);
  cursor: pointer;
}
.check input {
  appearance: none;
  width: 18px; height: 18px;
  border: 1.5px solid var(--line);
  border-radius: 5px;
  margin-top: 1px;
  display: grid; place-items: center;
  transition: background .15s var(--ease), border-color .15s var(--ease);
  cursor: pointer;
  flex-shrink: 0;
}
.check input:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.check input:checked::after {
  content: '';
  width: 10px; height: 10px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'><path d='M13.854 3.646a.5.5 0 010 .708l-7 7a.5.5 0 01-.708 0l-3.5-3.5a.5.5 0 11.708-.708L6.5 10.293l6.646-6.647a.5.5 0 01.708 0z'/></svg>") center/contain no-repeat;
}
.check a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.forgot { font-size: 13px; color: var(--accent); font-weight: 500; }
.forgot:hover { text-decoration: underline; text-underline-offset: 2px; }

.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border-radius: 11px;
  transition: transform .15s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.btn-primary:hover { background: #000; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.divider {
  display: flex; align-items: center; gap: 12px;
  margin: 24px 0;
  color: var(--muted);
  font-size: 12px;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}

.signup {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}
.signup a { color: var(--accent); font-weight: 600; }
.signup a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ----------  Modal  ---------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(10,10,15,.55);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
  z-index: 99999;
  animation: cpFadeIn .25s var(--ease);
}
.modal-backdrop.open { display: flex; }
@keyframes cpFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes cpSlideUp { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

.modal {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 36px;
  position: relative;
  animation: cpSlideUp .3s var(--ease);
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--muted);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.modal-close:hover { background: var(--paper-2); color: var(--ink); }

.modal h3 {
  font-size: 22px;
  letter-spacing: -0.018em;
  margin-bottom: 6px;
  color: var(--ink);
}
.modal .sub { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.modal .btn-primary { background: var(--accent); }
.modal .btn-primary:hover { background: #2558e0; }

.toast {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: var(--ink);
  color: #fff;
  padding: 12px 22px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
  z-index: 100000;
  display: flex; align-items: center; gap: 10px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast svg { width: 16px; height: 16px; color: var(--ok); }

/* ----------  Responsive  ---------- */
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .left { padding: 40px 28px 48px; }
  .right { padding: 40px 28px 60px; }
  .features { grid-template-columns: 1fr; }
  .left-foot { margin-top: 32px; }
  .hero { margin-top: 44px; }
}
@media (max-width: 480px) {
  .left { padding: 32px 22px 40px; }
  .right { padding: 32px 22px 48px; }
  .modal { padding: 28px 22px; }
  .brand { font-size: 36px; line-height: 1.02; }
  .hero { margin-top: 36px; }
  h1.cp-hero-title { font-size: 34px; }
  .lede { font-size: 16px; }
}
@media (max-width: 360px) {
  .brand { font-size: 32px; }
  h1.cp-hero-title { font-size: 30px; }
}

/* =================================================================
   Static pages (Aviso legal, Privacidad, Cookies, etc.)
   Se aplican cuando WordPress usa page.php. Fondo claro, columna
   estrecha, tipografía cómoda para lectura larga.
   ================================================================= */

body.page {
  background: var(--paper);
  color: var(--ink);
}

.cp-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 28px 96px;
}

.cp-page__header {
  margin-bottom: 40px;
}

.cp-page__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 24px;
  transition: color .2s var(--ease);
}
.cp-page__back:hover { color: var(--ink); }

.cp-page__title {
  font-size: clamp(32px, 4vw, 44px);
  letter-spacing: -0.022em;
  line-height: 1.15;
  font-weight: 600;
  margin: 0;
  color: var(--ink);
}

.cp-page__content {
  font-size: 16px;
  line-height: 1.65;
  color: #1b1b2a;
}

.cp-page__content .lead,
.cp-page__content p.lead {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 32px;
}

.cp-page__content h2 {
  font-size: 20px;
  letter-spacing: -0.01em;
  font-weight: 600;
  margin: 40px 0 12px;
  color: var(--ink);
}

.cp-page__content h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 24px 0 8px;
  color: var(--ink);
}

.cp-page__content p { margin: 0 0 16px; }

.cp-page__content ul,
.cp-page__content ol {
  padding-left: 22px;
  margin: 0 0 16px;
}
.cp-page__content li { margin-bottom: 6px; }

.cp-page__content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .2s var(--ease);
}
.cp-page__content a:hover { color: #2558e0; }

.cp-page__content strong { font-weight: 600; }

.cp-page__content .box {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px;
  background: var(--paper-2);
  margin: 16px 0 32px;
  font-size: 15px;
}
.cp-page__content .box p { margin: 4px 0; }

.cp-page__content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 32px;
  font-size: 14px;
}
.cp-page__content th,
.cp-page__content td {
  border: 1px solid var(--line);
  padding: 12px 14px;
  vertical-align: top;
  text-align: left;
}
.cp-page__content th {
  background: var(--paper-2);
  font-weight: 600;
  color: var(--ink);
}

.cp-page__content hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 48px 0;
}

.cp-page__foot {
  margin-top: 72px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  font-size: 13px;
  color: var(--muted);
}

.cp-page__foot-nav { flex: 1 1 auto; }

.cp-page__foot-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
.cp-page__foot-menu li { margin: 0; }
.cp-page__foot-menu a {
  color: var(--muted);
  text-decoration: none;
  transition: color .2s var(--ease);
}
.cp-page__foot-menu a:hover { color: var(--ink); }

.cp-page__foot-copy { margin: 0; }

@media (max-width: 640px) {
  .cp-page { padding: 40px 22px 72px; }
  .cp-page__title { font-size: 30px; }
  .cp-page__foot { flex-direction: column; }
}
