@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --paper: #faf8f5;
  --surface: #fff;
  --ink: #171426;
  --muted: #5e576d;
  --purple: #5b2d9b;
  --lavender: #e1cbff;
  --line: #e6deeb;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}
* { box-sizing: border-box; }
body { margin: 0; }
#view, body:has(> main) { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: inherit; }
:focus-visible { outline: 3px solid #ab6fef; outline-offset: 4px; }
.skip { position: absolute; top: .75rem; left: .75rem; transform: translateY(-200%); padding: .65rem 1rem; background: white; z-index: 2; }
.skip:focus { transform: none; }
.wrap { width: min(1160px, calc(100% - 72px)); margin-inline: auto; }
header { background: #151323; color: white; border-bottom: 1px solid #373148; }
.header-inner, .footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; min-height: 82px; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; font-weight: 800; line-height: 1.1; font-size: 1.35rem; }
.brand-small { display: block; margin-top: .3rem; font-size: .61rem; letter-spacing: .18em; }
.mark { display: grid; place-items: center; width: 39px; aspect-ratio: 1; border-radius: 11px; background: var(--lavender); color: #31165c; font-size: 1.45rem; }
nav { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
nav a { padding: .55rem .6rem; border-radius: 8px; color: #e4ddec; text-decoration: none; font-size: .92rem; }
nav a:hover, nav a[aria-current] { background: #332942; color: #f2e8ff; }

h1, h2, h3 { font-family: "DM Sans", system-ui, sans-serif; font-weight: 800; line-height: 1.1; margin: 0; letter-spacing: -.035em; }
h1 { font-size: clamp(2.45rem, 6vw, 5.15rem); letter-spacing: -.068em; }
h2 { font-size: clamp(1.65rem, 3.5vw, 2.65rem); }
h3 { font-size: 1.35rem; }
p { margin: .9rem 0 0; color: var(--muted); }
.hero, .intro { background: #151323; color: #fff; }
.hero-grid { display: grid; grid-template-columns: 1.18fr 1fr; gap: 2.25rem; align-items: center; min-height: 540px; padding-block: 4.25rem; }
.hero-copy p:not(.eyebrow), .intro p { color: #d9d0e5; font-size: clamp(1rem, 2vw, 1.18rem); max-width: 55ch; margin-top: 1.25rem; }
.eyebrow { color: var(--lavender); margin: 0 0 1.2rem; letter-spacing: .13em; font-weight: 700; font-size: .73rem; }
h1 em { display: block; font-style: normal; color: var(--lavender); }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.8rem; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; border: 1px solid transparent; border-radius: 9px; padding: .7rem 1.1rem; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.primary { background: var(--lavender); color: #271542; }
.primary:hover { background: #f0e2ff; }
.secondary { border-color: var(--line); color: var(--purple); }
.secondary:hover { background: #f3e9fd; }
.hero .secondary { border-color: #655873; color: #f5ecff; }
.hero .secondary:hover { background: #30263d; }

.hero-art {
  position: relative; isolation: isolate; min-width: 0; aspect-ratio: 1.12; overflow: hidden;
  border: 1px solid #504262; border-radius: 24px;
  background:
    radial-gradient(ellipse at 55% 52%, #7540a6 0%, #3d255c 38%, transparent 74%),
    radial-gradient(circle, #7c6595 1px, transparent 1.4px) 0 0 / 20px 20px,
    #221830;
}
.art-orbit { position: absolute; inset: 15% 19%; border: 1px solid #c2a4e478; border-radius: 50%; transform: rotate(-25deg) scaleY(.72); }
.orbit-2 { transform: rotate(34deg) scaleY(.72); }
.art-core { position: absolute; inset: 34% 35%; display: grid; place-items: center; border-radius: 25%; color: #fff1ff; background: linear-gradient(145deg,#ae70e9,#4d2474); border: 1px solid #dfb9ffc9; box-shadow: 0 0 65px #bd78f2aa; font-size: clamp(2.2rem,8vw,5rem); line-height: 1; }
.art-chip { position: absolute; padding: .43rem .7rem; background: #281c39; border: 1px solid #8e6faa; border-radius: 8px; color: #fff3ff; font-size: clamp(.68rem, 1.4vw, .89rem); box-shadow: 0 8px 24px #150c23a0; font-weight: 600; white-space: nowrap; }
.art-chip b { color: var(--lavender); margin-right: .2em; }
.chip-web { top: 16%; left: 9%; }
.chip-ai { top: 46%; right: 6%; }
.chip-flow { bottom: 15%; left: 12%; }

.intro .wrap { padding-block: clamp(3rem, 7vw, 5.8rem); }
.intro h1 { max-width: 17ch; }
.section { padding-block: clamp(2.75rem, 6vw, 5rem); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem 1.5rem; flex-wrap: wrap; margin-bottom: 1.55rem; }
.cards, .contact-grid, .about-grid { display: grid; gap: 1rem; }
.home-cards { grid-template-columns: repeat(4, minmax(0,1fr)); }
.service-cards, .about-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.card { display: flex; flex-direction: column; align-items: flex-start; border: 1px solid var(--line); border-radius: 17px; padding: clamp(1.25rem, 3vw, 2rem); background: var(--surface); }
.card:target { border-color: #9065bd; box-shadow: 0 0 0 3px #eadfff; }
.service-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 1.1rem; border-radius: 11px; background: #f0e4ff; color: var(--purple); font-size: 1.3rem; font-weight: 700; }
.card p { margin-bottom: 1.1rem; }
.card .text-link { margin-top: auto; }
.text-link { color: var(--purple); text-decoration-thickness: 1px; text-underline-offset: .23em; font-size: .91rem; font-weight: 700; }
.text-link:hover { color: #301148; }
.closing { display: flex; justify-content: space-between; align-items: center; gap: 1.2rem; border-top: 1px solid var(--line); }
.about-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); align-items: start; gap: clamp(1.5rem,6vw,5rem); }
.profile { min-height: 245px; justify-content: flex-end; background: radial-gradient(ellipse at top right,#523273,#21172f 64%); color: white; }
.profile .mark { margin-bottom: 1rem; }
.profile p { color: #e2d5ea; margin-bottom: 0; }
.about-copy p { max-width: 68ch; }
.contact-grid { grid-template-columns: minmax(0,1.55fr) minmax(0,1fr); align-items: start; }
.contact-methods { display: grid; gap: 1rem; }
.contact-methods h2 { font-size: 1.35rem; }
.email { overflow-wrap: anywhere; }
form { width: 100%; }
label { display: block; margin: 1rem 0 .35rem; font-weight: 700; }
input, textarea { display: block; width: 100%; font: inherit; border: 1px solid #ada2b8; background: #fcfaff; color: var(--ink); border-radius: 8px; padding: .65rem .75rem; }
textarea { min-height: 130px; resize: vertical; }
form button { margin-top: 1.2rem; }
.thanks { padding-block: clamp(3rem, 9vw, 7rem); }
.thanks .card { max-width: 760px; margin: auto; align-items: center; text-align: center; padding-block: clamp(2rem, 7vw, 4rem); }
.thanks h1 { font-size: clamp(2.25rem,5vw,3.75rem); }
footer { background: #151323; color: #e9e0f2; }
.footer-inner { padding-block: 1.4rem; }
.footer-inner > a:last-child { font-size: .9rem; }

@media (max-width: 900px) {
  .home-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hero-grid { min-height: auto; }
}
@media (max-width: 690px) {
  .wrap { width: calc(100% - 36px); }
  .header-inner { align-items: flex-start; flex-direction: column; gap: .65rem; padding-block: .85rem; }
  nav { gap: .15rem .25rem; }
  nav a { padding: .45rem .55rem; }
  .hero-grid, .contact-grid, .about-grid { grid-template-columns: 1fr; }
  .hero-grid { padding-block: 2.6rem; gap: 1.65rem; }
  .hero-art { max-width: 410px; width: 100%; aspect-ratio: 1.55; }
  .closing, .footer-inner { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 460px) {
  .home-cards, .service-cards { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Cómo trabajamos */
.process {
  background: radial-gradient(ellipse at top right, #2f2047, transparent 62%), #151323;
  color: #fff;
  text-align: center;
}
.process-intro { color: #d9d0e5; max-width: 58ch; margin-inline: auto; }
.process-steps {
  counter-reset: step;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem 1rem;
  position: relative;
  margin: 2.35rem 0 0;
  padding: 0;
}
.process-steps::before {
  content: "";
  position: absolute;
  top: 25px;
  left: 12.5%;
  right: 12.5%;
  height: 1px;
  background: #8c6fad;
}
.process-steps li { position: relative; counter-increment: step; padding-inline: .45rem; }
.process-steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin: 0 auto 1rem;
  border: 1px solid #e4ceff;
  border-radius: 14px;
  background: var(--lavender);
  color: #31165c;
  font-size: 1.2rem;
  font-weight: 800;
}
.process-steps p { color: #d9d0e5; margin-top: .6rem; }
.process + .closing { border-top: 0; }
@media (max-width: 850px) {
  .process-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process-steps::before { display: none; }
}
@media (max-width: 460px) {
  .process { text-align: left; }
  .process-steps { grid-template-columns: 1fr; }
  .process-steps li { padding-inline: 66px 0; min-height: 50px; }
  .process-steps li::before { position: absolute; left: 0; top: 0; }
}

/* Presentación de Inicio */
.hero-copy h1 { font-size: clamp(1.85rem, 3.65vw, 3.5rem); }
.founder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
  gap: 1rem 3rem;
  border-top: 1px solid var(--line);
}
.founder p { margin: 0 0 1rem; }
.closing p { max-width: 65ch; }
.closing > .button { flex-shrink: 0; }
@media (max-width: 690px) {
  .founder { grid-template-columns: 1fr; }
}

/* Retrato en la portada */
.hero-portrait {
  display: block;
  justify-self: center;
  width: min(100%, 385px);
  height: auto;
  border-radius: 24px;
  border: 1px solid #504262;
}
@media (max-width: 690px) {
  .hero-portrait {
    grid-row: 1;
    justify-self: start;
    width: min(100%, 220px);
  }
}

/* Video de lanzamiento */
.launch { max-width: 900px; padding-bottom: 0; }
.launch h2 { margin-bottom: 1.1rem; }
.launch video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  background: #151323;
}

/* Monograma de Chantal Digital Studio */
.mark { flex: none; font-size: 1rem; font-weight: 800; letter-spacing: -.055em; }

/* Eslogan debajo de la marca */
.header-inner { padding-block: .85rem; }
.header-brand { min-width: 0; }
.brand-tagline {
  margin: .4rem 0 0;
  color: #e1cbff;
  font-size: .8rem;
  line-height: 1.4;
}

.brand-symbol { display: block; flex: none; width: 48px; height: 48px; border-radius: 11px; }
footer .brand-symbol { width: 42px; height: 42px; }

.projects { border-top: 1px solid var(--line); }
.card .project-status {
  margin: 0 0 .75rem;
  color: var(--purple);
  font-weight: 700;
  font-size: .82rem;
}


/* Chantal IA · estilos aislados del diseño original */
.cds-chat {position:fixed;bottom:22px;right:22px;z-index:9999;font-family:'DM Sans',system-ui,sans-serif;color:#fff}
.cds-chat *{box-sizing:border-box}
.cds-chat-toggle{width:64px;height:64px;border:0;border-radius:50%;background:#8055e8;color:white;font-size:32px;box-shadow:0 8px 30px #0006;cursor:pointer}
.cds-chat-panel{position:absolute;right:0;bottom:80px;width:min(390px,calc(100vw - 30px));height:min(600px,calc(100dvh - 110px));background:#151b34;border:1px solid #7356a5;border-radius:22px;box-shadow:0 18px 60px #0008;overflow:hidden;display:flex;flex-direction:column}
.cds-chat-panel[hidden]{display:none}
.cds-chat-header{display:flex;justify-content:space-between;align-items:center;background:linear-gradient(125deg,#5e329e,#30214c);padding:18px 20px}
.cds-chat-header strong{display:block;font-size:19px}.cds-chat-header small{display:block;font-size:12px;margin-top:5px;color:#e5d8ff}
.cds-chat-close{border:0;background:none;color:#fff;font-size:30px;cursor:pointer}
.cds-chat-messages{padding:16px;flex:1;overflow-y:auto;display:flex;flex-direction:column;gap:12px}
.cds-chat-message{margin:0;padding:12px 14px;border-radius:16px;max-width:92%;font-size:14px;line-height:1.55;white-space:pre-wrap}
.cds-chat-message.bot{background:#29395e;align-self:flex-start}.cds-chat-message.user{background:#6942bc;align-self:flex-end}
.cds-chat-options{display:flex;flex-wrap:wrap;gap:7px;padding:12px 14px;border-top:1px solid #3b345a}
.cds-chat-options button{background:#24203f;border:1px solid #9c7fda;color:#fff;border-radius:20px;padding:9px 10px;font-size:12px;cursor:pointer}
.cds-chat-form{display:flex;gap:7px;padding:10px 12px;border-top:1px solid #3b345a}
.cds-chat-form input{flex:1;min-width:0;border:1px solid #a38abf;border-radius:10px;padding:11px;font:inherit;font-size:13px;background:#fff;color:#151323}
.cds-chat-form button{background:#8055e8;border:0;border-radius:10px;padding:10px 15px;color:white;font:inherit;cursor:pointer}
.cds-chat-note{margin:0;padding:0 12px 10px;font-size:11px;color:#d0c3e9}
.cds-visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
@media(max-width:480px){.cds-chat{right:12px;bottom:12px}.cds-chat-panel{bottom:72px;height:min(580px,calc(100dvh - 95px))}.cds-chat-toggle{width:56px;height:56px}}

/* Ajustes de legibilidad del chatbot */
.cds-chat-message.bot,.cds-chat-message.user{color:#fff!important;overflow-wrap:anywhere;word-break:break-word}
.cds-chat-messages{min-width:0;overflow-x:hidden}
.cds-chat-panel{max-width:calc(100vw - 24px)}
.cds-chat-options button{color:#fff}

/* Mejoras visuales de Chantal IA */

.cds-chat-panel {
  width: min(430px, calc(100vw - 24px));
  height: min(620px, calc(100dvh - 100px));
  max-width: calc(100vw - 24px);
}

.cds-chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px;
}

.cds-chat-message {
  max-width: 92%;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.5;
}

.cds-chat-options {
  flex-shrink: 0;
  gap: 6px;
  padding: 10px;
}

.cds-chat-options button {
  font-size: 12px;
  padding: 8px 10px;
}

.cds-chat-form {
  flex-shrink: 0;
}

.cds-chat-note {
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .cds-chat-panel {
    width: calc(100vw - 24px);
    height: min(580px, calc(100dvh - 95px));
  }
}
