/* ══════════════════════════════════════════════
   Turnos de palabra — Clean & Accessible
   ══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Patrick+Hand&family=Nunito:wght@400;500;600;700;800&display=swap');

:root {
  /* Neutrals — all text passes WCAG AA on white */
  --cream:      #F0F1F3;   /* page background (visible gray) */
  --paper:      #FFFFFF;   /* card surface                    */
  --paper-dark: #D5D9E0;   /* borders, dividers               */
  --ink:        #0F172A;   /* primary text — 15.4:1           */
  --ink-light:  #334155;   /* secondary text — 10.7:1         */
  --ink-muted:  #64748B;   /* muted text — 4.6:1              */

  /* Accent — warm orange */
  --accent:     #C2410C;   /* primary accent — 5.3:1  */
  --accent2:    #EA580C;   /* highlight accent        */

  /* Semantic */
  --sage:       #15803D;   /* success / active        */
  --sage-dark:  #166534;
  --sky:        #2563EB;
  --berry:      #9F1239;
  --gold:       #92400E;   /* warning / amber         */

  /* Shadows */
  --shadow:     rgba(0, 0, 0, .06);
  --shadow2:    rgba(0, 0, 0, .12);

  /* Fonts */
  --hand:  'Patrick Hand', cursive;
  --body:  'Nunito', 'Segoe UI', system-ui, sans-serif;

  /* Spacing */
  --radius: 12px;
  --radius-sm: 8px;
}

/* ── Reset & Base ──────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; }

body {
  margin: 0;
  font-family: var(--body);
  font-weight: 400;
  color: var(--ink);
  background: var(--cream);
  background-attachment: fixed;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Focus visible ─────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Layout ────────────────────────────────── */
.wrap {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

/* ── Breadcrumb ────────────────────────────── */
.breadcrumb {
  max-width: 900px;
  margin: 0 auto;
  padding: 14px 20px 0;
  font-size: 13px;
  font-family: var(--body);
  color: var(--ink-muted);
}

.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.breadcrumb li::after {
  content: '›';
  margin-left: 6px;
  color: var(--paper-dark);
}

.breadcrumb li:last-child::after {
  display: none;
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb [aria-current="page"] {
  font-weight: 600;
  color: var(--ink-light);
}

/* ── Header ────────────────────────────────── */
.header {
  text-align: center;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--paper-dark);
  position: relative;
}

.header::after {
  display: none;
}

.header h1 {
  margin: 0;
  font-family: var(--hand);
  font-size: 38px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: 0.3px;
}

.header .subtitle {
  margin-top: 8px;
  font-size: 15px;
  color: var(--ink-light);
  font-weight: 500;
  line-height: 1.5;
}

/* Status pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--cream);
  border: 1px solid var(--paper-dark);
  font-size: 13px;
  color: var(--ink-light);
  font-weight: 600;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--paper-dark);
  transition: all .3s ease;
}

.status-dot.on {
  background: var(--sage);
  box-shadow: 0 0 0 4px rgba(21, 128, 61, .15), 0 0 10px rgba(21, 128, 61, .2);
}

/* ── Grid ──────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}

@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr;  }
}

/* ── Cards ─────────────────────────────────── */
.card {
  background: var(--paper);
  border: 1px solid var(--paper-dark);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 1px 4px var(--shadow), 0 2px 8px rgba(0,0,0,.03);
  position: relative;
}

.card + .card {
  margin-top: 0;
}

.card-title {
  margin: 0 0 16px;
  font-family: var(--hand);
  font-size: 24px;
  font-weight: 400;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title .icon {
  font-size: 20px;
}

/* Remove decorative bullet dot */
.card-title::before {
  display: none;
}

/* ── Mode Tabs ─────────────────────────────── */
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.tab {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  border: 1.5px solid var(--paper-dark);
  cursor: pointer;
  text-align: left;
  transition: all .2s ease;
  font-family: var(--body);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tab:hover {
  border-color: var(--accent2);
  box-shadow: 0 2px 8px var(--shadow);
}

.tab[aria-selected="true"] {
  border-color: var(--accent);
  background: rgba(194, 65, 12, .05);
  box-shadow: 0 0 0 1px rgba(194, 65, 12, .15);
}

.tab-name {
  font-family: var(--hand);
  font-size: 22px;
  font-weight: 600;
  color: var(--accent);
}

.tab-desc {
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.4;
}

/* ── Panels ────────────────────────────────── */
.panel {
  padding-top: 4px;
}

.panel[hidden] {
  display: none;
}

/* ── Form fields ───────────────────────────── */
.fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 500px) {
  .fields-row { grid-template-columns: 1fr; }
}

.field {
  position: relative;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.field input,
.field select {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  font-family: var(--body);
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--paper-dark);
  background: var(--cream);
  color: var(--ink);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.field input:focus,
.field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(194, 65, 12, .12);
}

.field input[aria-invalid="true"] {
  border-color: #B91C1C;
  box-shadow: 0 0 0 3px rgba(185, 28, 28, .12);
}

.field .suffix {
  position: absolute;
  right: 12px;
  bottom: 12px;
  font-size: 12px;
  color: var(--ink-muted);
  pointer-events: none;
  font-weight: 600;
}

.field input[type="range"] {
  padding: 6px 0;
  background: transparent;
  border: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  height: 28px;
}

.field input[type="range"]:focus {
  box-shadow: none;
}

.field input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: var(--paper-dark);
}

.field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--paper);
  box-shadow: 0 1px 4px var(--shadow2);
  margin-top: -7px;
  cursor: pointer;
}

.field input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: var(--paper-dark);
  border: none;
}

.field input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--paper);
  box-shadow: 0 1px 4px var(--shadow2);
  cursor: pointer;
}

/* ── Presets ────────────────────────────────── */
.presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.chip {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--paper-dark);
  background: var(--cream);
  font-size: 12px;
  font-family: var(--body);
  font-weight: 600;
  color: var(--ink-light);
  cursor: pointer;
  transition: all .2s ease;
  user-select: none;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--ink);
  background: rgba(194, 65, 12, .04);
  box-shadow: 0 1px 4px var(--shadow);
}

.chip strong {
  color: var(--accent);
  font-weight: 700;
}

/* ── Controls ──────────────────────────────── */
.controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  justify-content: center;
}

.btn {
  border: 1px solid var(--paper-dark);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 14px;
  font-family: var(--body);
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all .15s ease;
  color: var(--ink);
  background: var(--paper);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.btn:hover {
  box-shadow: 0 2px 8px var(--shadow);
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: .4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-start {
  background: var(--sage);
  border-color: var(--sage);
  color: #fff;
}

.btn-start:hover {
  background: var(--sage-dark);
  border-color: var(--sage-dark);
}

.btn-pause {
  background: var(--gold);
  border-color: var(--gold);
  color: #ffffff;
  font-weight: 700;
}

.btn-pause:hover {
  background: #78350F;
  border-color: #78350F;
}

.btn-stop {
  background: #B91C1C;
  border-color: #B91C1C;
  color: #ffffff;
  font-weight: 700;
}

.btn-stop:hover {
  background: #991B1B;
  border-color: #991B1B;
}

.btn-test {
  background: transparent;
  border: 1px solid var(--paper-dark);
  margin-top: 12px;
  color: var(--ink-light);
}

.btn-test:hover {
  border-color: var(--accent);
  background: rgba(194, 65, 12, .04);
}

.shortcuts {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 10px;
  font-style: italic;
  text-align: center;
}

/* ── Timer Display ─────────────────────────── */
.timer-card {
  text-align: center;
  padding: 28px 20px;
  position: relative;
  overflow: hidden;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Decorative corner flourishes — disabled for clean look */
.timer-card::before,
.timer-card::after {
  display: none;
}

.timer-badges {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.badge {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--cream);
  border: 1px solid var(--paper-dark);
  color: var(--ink-light);
  font-size: 12px;
  font-weight: 600;
}

/* Ring container */
.ring-wrap {
  display: inline-grid;
  place-items: center;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: var(--cream);
  border: 1px solid var(--paper-dark);
  box-shadow: 0 2px 12px var(--shadow);
  margin: 0 auto 14px;
}

.ring-svg {
  width: 150px;
  height: 150px;
}

.ring-track {
  stroke: var(--paper-dark);
}

.ring-progress {
  stroke: var(--accent);
  filter: drop-shadow(0 0 4px rgba(194, 65, 12, .2));
  transition: stroke-dashoffset .15s ease;
}

.time-main {
  font-family: var(--body);
  font-size: 44px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  line-height: 1;
  letter-spacing: 1px;
}

.time-sub {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-light);
  line-height: 1.4;
}

.time-sub b {
  color: var(--accent);
}

/* ── Section divider inside cards ──────────── */
.divider {
  border: none;
  border-top: 1px solid var(--paper-dark);
  margin: 18px 0;
  position: relative;
}

/* ── Toast ─────────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 20px;
  border-radius: var(--radius);
  background: var(--ink);
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  color: #fff;
  font-size: 13px;
  font-family: var(--body);
  font-weight: 600;
  display: none;
  align-items: center;
  gap: 8px;
  max-width: min(500px, calc(100% - 32px));
  z-index: 50;
  opacity: 0;
  transition: opacity .3s ease, transform .3s ease;
}

.toast.show {
  display: flex;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast b {
  color: #FB923C;
}

/* ── Utility ───────────────────────────────── */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Decorative Elements ───────────────────── */

/* Washi tape — hidden for clean look */
.washi-tape {
  display: none;
}

/* Small hand-drawn circle bullet decoration */
.bullet::before {
  content: '○';
  margin-right: 6px;
  color: var(--accent2);
  font-size: 10px;
}

/* ── H1 accent ─────────────────────────────── */
.accent-text {
  color: var(--accent);
}

/* ── SEO Content Sections ──────────────────── */
.seo-section {
  margin-top: 48px;
}

.seo-text {
  font-size: 15px;
  color: var(--ink-light);
  line-height: 1.7;
  margin: 0 0 12px;
}

.seo-text strong {
  color: var(--ink);
}

.seo-list {
  margin: 0 0 12px 0;
  padding-left: 20px;
  font-size: 15px;
  color: var(--ink-light);
  line-height: 1.8;
}

.seo-list li {
  margin-bottom: 4px;
}

.seo-list strong {
  color: var(--ink);
}

.how-steps {
  margin: 0;
  padding-left: 20px;
  font-size: 15px;
  color: var(--ink-light);
  line-height: 1.8;
}

.how-steps li {
  margin-bottom: 10px;
}

.how-steps strong {
  color: var(--ink);
}

.how-steps em {
  color: var(--accent);
  font-style: normal;
  font-weight: 600;
}

/* ── FAQ ───────────────────────────────────── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: var(--cream);
  border: 1px solid var(--paper-dark);
  border-radius: var(--radius-sm);
  transition: all .2s ease;
}

.faq-item[open] {
  border-color: var(--accent);
  box-shadow: 0 1px 4px var(--shadow);
}

.faq-q {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.faq-q::before {
  content: '▸';
  color: var(--accent);
  font-size: 12px;
  transition: transform .2s ease;
  flex-shrink: 0;
}

.faq-item[open] .faq-q::before {
  transform: rotate(90deg);
}

.faq-q::-webkit-details-marker {
  display: none;
}

.faq-a {
  padding: 0 16px 14px;
  font-size: 14px;
  color: var(--ink-light);
  line-height: 1.7;
  margin: 0;
}

.faq-a strong {
  color: var(--ink);
}

.faq-item a.btn {
  display: block;
  margin: 12px 16px 14px;
  text-align: center;
  text-decoration: none;
}

/* ── Footer ────────────────────────────────── */
.site-footer {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 20px 32px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-muted);
  border-top: 1px solid var(--paper-dark);
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* ── Newsletter ─────────────────────────────── */
.newsletter-card {
  margin-top: 48px;
  text-align: center;
}

.nl-desc {
  font-size: 15px;
  color: var(--ink-light);
  line-height: 1.6;
  margin: 0 0 16px;
}

.nl-desc strong {
  color: var(--ink);
}

.nl-form {
  max-width: 480px;
  margin: 0 auto;
}

.nl-row {
  display: flex;
  gap: 8px;
}

.nl-input {
  flex: 1;
  padding: 10px 14px;
  font-size: 15px;
  font-family: var(--body);
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--paper-dark);
  background: var(--cream);
  color: var(--ink);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.nl-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(194, 65, 12, .12);
}

.nl-input::placeholder {
  color: var(--ink-muted);
}

.btn-nl {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  white-space: nowrap;
  font-weight: 700;
}

.btn-nl:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.nl-privacy {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  text-align: left;
}

.nl-checkbox {
  margin-top: 3px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.nl-privacy-label {
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.5;
}

.nl-privacy-label a {
  color: var(--accent);
  text-decoration: underline;
}

.nl-status {
  font-size: 13px;
  color: var(--sage-dark);
  margin-top: 10px;
  min-height: 20px;
}

@media (max-width: 500px) {
  .nl-row {
    flex-direction: column;
  }

  .btn-nl {
    width: 100%;
    justify-content: center;
  }
}

/* ── Responsive ────────────────────────────── */
@media (max-width: 760px) {
  .header h1 {
    font-size: 32px;
  }

  .timer-card {
    padding: 22px 16px;
  }

  .ring-wrap {
    width: 150px;
    height: 150px;
  }

  .ring-svg {
    width: 126px;
    height: 126px;
  }

  .time-main {
    font-size: 38px;
  }

  .seo-section {
    margin-top: 40px;
  }

  .newsletter-card {
    margin-top: 40px;
  }
}

@media (max-width: 420px) {
  .wrap {
    padding: 16px 14px 36px;
  }

  .header h1 {
    font-size: 26px;
  }

  .controls {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .seo-section {
    margin-top: 32px;
    padding: 18px;
  }

  .newsletter-card {
    margin-top: 32px;
    padding: 18px;
  }

  .seo-section .card-title {
    font-size: 22px;
  }
}
