@font-face {
  font-family: "Inter Tight";
  src: url("fonts/inter-tight-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #191917;
  --muted: #716f68;
  --paper: #f5f3ee;
  --panel: #fcfbf8;
  --line: #d9d5cc;
  --accent: #df5f39;
  --accent-dark: #bd4727;
  --green: #287b50;
  font-family: "Inter Tight", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(223, 95, 57, .08), transparent 24rem),
    var(--paper);
}

button, input { font: inherit; }
button { color: inherit; }

.site-header, main, footer {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 780;
  letter-spacing: -.03em;
}

.brand-mark { display: flex; align-items: flex-end; gap: 2px; height: 24px; }
.brand-mark i { width: 7px; border-radius: 1px; transform: skew(-13deg); display: block; }
.brand-mark i:nth-child(1) { height: 15px; background: #e9ad38; }
.brand-mark i:nth-child(2) { height: 23px; background: var(--accent); }
.brand-mark i:nth-child(3) { height: 18px; background: #346e67; }

.privacy-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
}
.privacy-note span { font-size: .55rem; }

.eyebrow, .section-label {
  margin: 0 0 16px;
  color: var(--accent-dark);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .7fr);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 5px;
  box-shadow: 0 22px 70px rgba(54, 48, 38, .08);
  overflow: hidden;
}

.uploader-panel { min-height: 410px; padding: 22px; }

.drop-zone {
  min-height: 366px;
  padding: 36px 24px;
  border: 1.5px dashed #bbb5aa;
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: background .2s, border-color .2s, transform .2s;
  outline: none;
}
.drop-zone:hover, .drop-zone.is-dragging {
  border-color: var(--accent);
  background: #fbf3ed;
}
.drop-zone.is-dragging { transform: scale(.995); }

.upload-icon {
  width: 58px;
  height: 58px;
  margin-bottom: 20px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--accent);
  font-size: 1.6rem;
  box-shadow: 0 8px 22px rgba(40, 35, 27, .06);
}

.drop-zone h2 { margin: 0 0 8px; font-family: Georgia, serif; font-size: 1.6rem; font-weight: 500; letter-spacing: -.03em; }
.drop-zone p { margin: 0 0 24px; color: var(--muted); font-size: .94rem; }
.drop-zone small { margin-top: 16px; color: #8c8982; font-size: .72rem; letter-spacing: .03em; }

.primary-button {
  border: 0;
  border-radius: 3px;
  padding: 13px 22px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer;
  transition: transform .15s, background .15s;
}
.primary-button:hover { background: var(--accent-dark); transform: translateY(-1px); }
.primary-button:focus-visible, .text-button:focus-visible, .color-card:focus-visible { outline: 3px solid rgba(223, 95, 57, .35); outline-offset: 3px; }

.preview-panel { min-height: 366px; height: 100%; }
.preview-frame {
  height: 304px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background-color: #eeeae2;
  background-image: linear-gradient(45deg, #e2ded5 25%, transparent 25%), linear-gradient(-45deg, #e2ded5 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e2ded5 75%), linear-gradient(-45deg, transparent 75%, #e2ded5 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  border-radius: 2px;
}
.preview-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.file-details { min-height: 62px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.file-details div { min-width: 0; display: grid; gap: 3px; }
.file-details strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.file-details span { color: var(--muted); font-size: .75rem; }
.text-button { padding: 7px 0; border: 0; background: none; color: var(--accent-dark); font-size: .8rem; font-weight: 750; cursor: pointer; }

.settings-panel { padding: 44px 36px; border-left: 1px solid var(--line); background: #f0ede7; }
.setting-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.setting-heading h2, .results-heading h2 { margin: 0; font-family: Georgia, serif; font-weight: 500; letter-spacing: -.035em; }
.setting-heading h2 { font-size: 1.45rem; }
.setting-heading output { font-family: Georgia, serif; color: var(--accent); font-size: 2.45rem; line-height: 1; }

input[type="range"] { width: 100%; margin: 30px 0 4px; accent-color: var(--accent); cursor: pointer; }
.range-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: .7rem; }

.setting-row { margin-top: 38px; padding-top: 28px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.setting-row > div { display: grid; gap: 5px; }
.setting-row strong { font-size: .9rem; }
.setting-row span { color: var(--muted); font-size: .75rem; }

.switch { position: relative; display: inline-flex; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch > span:first-of-type { width: 42px; height: 24px; border-radius: 99px; background: #b4b0a8; transition: background .2s; }
.switch > span:first-of-type::after { content: ""; position: absolute; width: 18px; height: 18px; top: 3px; left: 3px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(0,0,0,.22); transition: transform .2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 3px solid rgba(223,95,57,.28); outline-offset: 3px; }

.local-note { margin: 76px 0 0; color: var(--green); font-size: .74rem; line-height: 1.5; }
.local-note span { margin-right: 6px; font-size: 1.1rem; }

.results { padding: 78px 0 44px; }
.results-heading { margin-bottom: 26px; display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.results-heading h2 { font-size: 2.2rem; }
.results-heading p:last-child { margin: 0 0 4px; color: var(--muted); font-size: .8rem; }

.palette { display: grid; grid-template-columns: repeat(var(--palette-columns, 6), 1fr); gap: 10px; }
.color-card { min-width: 0; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); overflow: hidden; text-align: left; cursor: pointer; transition: transform .18s, box-shadow .18s; }
.color-card:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(44,38,31,.1); }
.color-swatch { display: block; width: 100%; aspect-ratio: 1 / .8; }
.color-code { min-height: 56px; padding: 0 13px; display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: .78rem; font-weight: 800; letter-spacing: .035em; }
.copy-icon { color: var(--muted); font-size: 1rem; font-weight: 400; }

footer { min-height: 120px; padding: 32px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: start; color: var(--muted); font-size: .72rem; }
footer p { margin: 0; }

.toast { position: fixed; left: 50%; bottom: 26px; z-index: 20; transform: translate(-50%, 18px); padding: 11px 18px; border-radius: 3px; background: var(--ink); color: white; font-size: .82rem; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.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; }
[hidden] { display: none !important; }

@media (max-width: 850px) {
  .workspace { grid-template-columns: 1fr; }
  .settings-panel { border-left: 0; border-top: 1px solid var(--line); }
  .local-note { margin-top: 40px; }
  .palette { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 560px) {
  .site-header, main, footer { width: min(100% - 28px, 1120px); }
  .site-header { min-height: 72px; }
  .privacy-note { font-size: .63rem; }
  .uploader-panel { min-height: auto; padding: 12px; }
  .drop-zone { min-height: 330px; padding-inline: 15px; }
  .drop-zone p { max-width: 240px; }
  .preview-frame { height: 270px; }
  .settings-panel { padding: 32px 24px; }
  .results { padding-top: 56px; }
  .results-heading { align-items: start; flex-direction: column; gap: 10px; }
  .results-heading h2 { font-size: 1.8rem; }
  .palette { grid-template-columns: repeat(2, 1fr); }
  .color-code { min-height: 52px; }
  footer { min-height: 140px; flex-direction: column; gap: 10px; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Interfaz personal oscura */
:root {
  --ink: #f1f3f5;
  --muted: #8c939d;
  --paper: #0b0d0f;
  --panel: #111418;
  --line: #292e35;
  --accent: #c7f36b;
  --accent-dark: #a9d94e;
  --green: #8ecb72;
  color-scheme: dark;
  background: var(--paper);
}

body {
  background:
    radial-gradient(circle at 50% -15%, rgba(199, 243, 107, .07), transparent 34rem),
    var(--paper);
}

.site-header {
  min-height: 76px;
  border-color: var(--line);
}

.brand { letter-spacing: -.025em; }
.brand-mark i:nth-child(1) { background: #d6f476; }
.brand-mark i:nth-child(2) { background: #8aa9ff; }
.brand-mark i:nth-child(3) { background: #ef7f68; }
.privacy-note { color: #a7d68f; }

main { padding: 48px 0 80px; }

.workspace {
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, .72fr);
  background: var(--panel);
  border-color: var(--line);
  border-radius: 14px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .28);
}

.uploader-panel {
  min-height: 520px;
  padding: 16px;
}

.drop-zone {
  min-height: 488px;
  border-color: #363c45;
  border-radius: 10px;
  background: #0e1114;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--accent);
  background: rgba(199, 243, 107, .035);
}

.upload-icon {
  border-color: #343a42;
  background: #171b20;
  color: var(--accent);
  box-shadow: none;
}

.drop-zone h2,
.setting-heading h2,
.results-heading h2 {
  font-family: "Inter Tight", ui-sans-serif, sans-serif;
  font-weight: 600;
  letter-spacing: -.035em;
}

.drop-zone p,
.drop-zone small { color: var(--muted); }

.primary-button {
  background: var(--accent);
  color: #11150b;
}
.primary-button:hover { background: #d7ff84; }

.preview-panel { min-height: 488px; }
.preview-frame {
  height: 414px;
  background-color: #15191e;
  background-image: linear-gradient(45deg, #20252b 25%, transparent 25%), linear-gradient(-45deg, #20252b 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #20252b 75%), linear-gradient(-45deg, transparent 75%, #20252b 75%);
}
.file-details { min-height: 74px; }
.text-button { color: var(--accent); }

.settings-panel {
  padding: 44px 36px;
  border-color: var(--line);
  background: #14181d;
}
.setting-heading output { color: var(--accent); }
input[type="range"] { accent-color: var(--accent); }
.setting-row { border-color: var(--line); }
.setting-row span { color: var(--muted); }
.switch > span:first-of-type { background: #454b53; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { background: #15190f; }
.switch input:focus-visible + span { outline-color: rgba(199, 243, 107, .3); }
.local-note { color: #91b97e; }

.results { padding: 64px 0 0; }
.section-label { color: var(--accent-dark); }
.results-heading p:last-child { color: var(--muted); }
.results-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.results-actions p { margin: 0; color: var(--muted); font-size: .8rem; }
.copy-all-button {
  min-height: 40px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #3a424b;
  border-radius: 6px;
  background: #171b20;
  color: var(--ink);
  font-weight: 650;
  font-size: .8rem;
  cursor: pointer;
  transition: border-color .16s, background .16s, color .16s;
}
.copy-all-button:hover {
  border-color: var(--accent);
  background: rgba(199, 243, 107, .08);
  color: var(--accent);
}
.copy-all-button:focus-visible {
  outline: 3px solid rgba(199, 243, 107, .35);
  outline-offset: 3px;
}
.color-card {
  border-color: var(--line);
  background: var(--panel);
}
.color-card:hover { box-shadow: 0 14px 34px rgba(0, 0, 0, .32); }
.copy-icon { color: var(--muted); }
.primary-button:focus-visible,
.text-button:focus-visible,
.color-card:focus-visible { outline-color: rgba(199, 243, 107, .42); }

.toast {
  background: #eefbd4;
  color: #11150b;
}

.window-drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: 20px;
  display: grid;
  place-items: center;
  background: rgba(7, 9, 10, .78);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .16s, visibility .16s;
}

.window-drop-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.window-drop-overlay > div {
  width: min(620px, 100%);
  min-height: 320px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 2px dashed var(--accent);
  border-radius: 20px;
  background: rgba(17, 20, 24, .92);
  text-align: center;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .45);
}

.window-drop-overlay span {
  width: 58px;
  height: 58px;
  margin-bottom: 10px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #11150b;
  font-size: 1.7rem;
}
.window-drop-overlay strong { font-size: clamp(1.8rem, 5vw, 2.8rem); letter-spacing: -.045em; }
.window-drop-overlay small { color: var(--muted); font-size: .95rem; }

@media (max-width: 850px) {
  main { padding-top: 28px; }
  .workspace { grid-template-columns: 1fr; }
  .settings-panel { border-color: var(--line); }
}

@media (max-width: 560px) {
  .site-header { min-height: 66px; }
  main { padding: 18px 0 54px; }
  .uploader-panel { min-height: auto; padding: 10px; }
  .drop-zone { min-height: 380px; }
  .preview-panel { min-height: auto; }
  .preview-frame { height: 320px; }
  .settings-panel { padding: 30px 24px; }
  .results-actions { width: 100%; align-items: stretch; flex-direction: column; gap: 12px; }
  .copy-all-button { justify-content: center; }
  .window-drop-overlay { padding: 12px; }
  .window-drop-overlay > div { min-height: 270px; padding: 28px 18px; }
}
