/* ==========================================================================
   NESSA ATELIER · plantilla "El atelier"
   ========================================================================== */

/* Portada partida */
.at-hero { padding: clamp(40px, 6vw, 90px) 0 clamp(40px, 6vw, 80px); overflow: hidden; }
.at-hero-grid { display: grid; grid-template-columns: 6fr 5fr; gap: clamp(32px, 6vw, 110px); align-items: center; }
.at-hero-title { font-size: clamp(52px, 7vw, 112px); line-height: .98; margin: 0 0 28px; letter-spacing: -.01em; }
.at-hero-title .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; }
.at-hero-title .w > span { display: inline-block; transform: translateY(105%); animation: wordUp 1.2s var(--ease-out) forwards; animation-delay: calc(.2s + var(--i) * 90ms); }
.at-hero-intro { font-size: clamp(17px, 1.3vw, 20px); max-width: 46ch; margin-bottom: 36px; }
.at-hero-media { position: relative; margin: 0; }
.at-hero-frame { aspect-ratio: 4/5; overflow: hidden; border-radius: 999px 999px 0 0; background: var(--lino); }
.at-hero-frame img { width: 100%; height: 115%; object-fit: cover; will-change: transform; }
.at-hero-badge { position: absolute; left: -60px; bottom: 40px; width: 150px; height: 150px; border-radius: 50%; background: var(--marfil); display: grid; place-items: center; box-shadow: 0 20px 50px -20px rgba(90,59,46,.4); }
.at-hero-badge svg { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); }
.at-hero-badge text { font-family: var(--sans); font-size: 17px; font-weight: 600; letter-spacing: 0; fill: var(--chocolate); }
.at-hero-badge img { width: 64px; height: 64px; mix-blend-mode: multiply; }

/* Historia */
.at-story-grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(40px, 8vw, 140px); align-items: center; }
.at-story-media { position: relative; padding-bottom: 18%; }
.at-story-main { margin: 0; aspect-ratio: 4/5; overflow: hidden; width: 82%; }
.at-story-detail { position: absolute; right: 0; bottom: 0; width: 48%; aspect-ratio: 1; margin: 0; overflow: hidden; border: 10px solid var(--marfil); }
.at-story-main img, .at-story-detail img { width: 100%; height: 100%; object-fit: cover; }
.at-story-copy .section-title { margin-bottom: 28px; max-width: 16ch; }
.at-story-copy .section-title .w { transition: opacity .3s; }
.fx-ink .at-story-copy .section-title .w { opacity: .18; }
.fx-ink .at-story-copy .section-title .w.on { opacity: 1; }
.at-story-text { font-size: clamp(16px, 1.15vw, 19px); max-width: 54ch; }
.at-free { padding-bottom: 0; }

/* Principios */
.at-values { background: var(--lino); }
.at-values-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0; border-top: 1px solid rgba(199,168,122,.7); }
.at-value { position: relative; padding: 36px 32px 40px 0; border-bottom: 1px solid rgba(199,168,122,.7); transition: background .5s var(--ease); }
.at-value + .at-value { padding-left: 32px; border-left: 1px solid rgba(199,168,122,.7); }
.at-value-num { font-family: var(--serif); font-size: 18px; }
.at-value-leaf { position: absolute; top: 30px; right: 28px; width: 34px; color: var(--champan); transform: rotate(-20deg); transition: transform .8s var(--ease-out); }
.at-value:hover .at-value-leaf { transform: rotate(10deg) scale(1.15); }
.at-value h3 { font-size: clamp(26px, 2.2vw, 34px); margin: 48px 0 12px; }
.at-value p { margin: 0; font-size: 16px; }

/* Proceso: línea de tiempo */
.at-timeline { position: relative; }
.at-line { position: absolute; left: 0; right: 0; top: 7px; height: 1px; background: var(--lino); }
.at-line span { position: absolute; inset: 0; background: var(--chocolate); transform-origin: left; transform: scaleX(var(--t, 0)); transition: transform .15s linear; }
.at-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: clamp(20px, 3vw, 44px); }
.at-step { position: relative; padding-top: 44px; }
.at-dot { position: absolute; top: 0; left: 0; width: 15px; height: 15px; border-radius: 50%; background: var(--marfil); border: 1px solid var(--chocolate); transition: background .4s; }
.at-step.is-lit .at-dot { background: var(--chocolate); box-shadow: 0 0 0 6px rgba(199,168,122,.35); }
.at-step-media { margin: 0 0 20px; aspect-ratio: 4/3; overflow: hidden; background: var(--lino); }
.at-step-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.at-step:hover .at-step-media img { transform: scale(1.06); }
.at-step-num { font-family: var(--serif); font-size: 44px; line-height: 1; color: var(--champan); }
.at-step h3 { font-size: clamp(26px, 2.2vw, 34px); margin: 8px 0 10px; }
.at-step p { font-size: 16px; margin: 0; }

/* Materiales: lista editorial con vista previa flotante */
.at-materials { position: relative; }
.at-mat-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.at-mat { position: relative; display: grid; grid-template-columns: 70px minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); transition: padding .5s var(--ease-out); }
.at-mat:hover { padding-left: 18px; }
.at-mat-num { font-family: var(--serif); font-size: 18px; }
.at-mat-name { font-size: clamp(40px, 5.5vw, 84px); margin: 0; line-height: 1; transition: font-style .3s, color .3s; }
.at-mat:hover .at-mat-name { font-family: var(--accent); font-style: italic; }
.at-mat-text { margin: 0; max-width: 40ch; font-size: 16px; }
.at-mat-thumb { display: none; margin: 0; }
.at-mat-float { position: fixed; top: 0; left: 0; z-index: 50; width: 260px; aspect-ratio: 4/5; pointer-events: none; opacity: 0; transform: translate3d(-50%, -50%, 0) scale(.8) rotate(-4deg); transition: opacity .35s var(--ease), transform .5s var(--ease-out); overflow: hidden; }
.at-mat-float.is-on { opacity: 1; transform: translate3d(-50%, -50%, 0) scale(1) rotate(-2deg); }
.at-mat-float-img { position: absolute; inset: 0; opacity: 0; transition: opacity .35s; }
.at-mat-float-img.is-on { opacity: 1; }
.at-mat-float-img img { width: 100%; height: 100%; object-fit: cover; }

/* Cita */
.at-quote { background: var(--chocolate); color: var(--marfil); padding: clamp(80px, 10vw, 160px) 0; text-align: center; overflow: hidden; position: relative; }
.at-quote blockquote { margin: 0 auto; max-width: 22ch; font-family: var(--accent); font-style: italic; font-size: clamp(32px, 4.4vw, 68px); line-height: 1.2; }
.at-quote blockquote .w { transition: opacity .3s; }
.fx-ink .at-quote blockquote .w { opacity: .22; }
.fx-ink .at-quote blockquote .w.on { opacity: 1; }
.at-quote-author { margin: 32px 0 0; font-size: 13px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; }
.at-quote-leaf { position: absolute; width: 380px; right: -60px; top: -40px; color: var(--champan); opacity: .14; transform: rotate(25deg); }
.at-quote :focus-visible { outline-color: var(--marfil); }

/* Galería */
.at-masonry { columns: 3 280px; column-gap: clamp(16px, 2vw, 28px); }
.at-shot { break-inside: avoid; margin: 0 0 clamp(16px, 2vw, 28px); overflow: hidden; position: relative; }
.at-shot img { width: 100%; height: auto; transition: transform 1.4s var(--ease-out); }
.at-shot:nth-child(3n+1) img { aspect-ratio: 4/5; object-fit: cover; }
.at-shot:hover img { transform: scale(1.05); }
.at-shot figcaption { position: absolute; left: 14px; bottom: 14px; background: var(--marfil); padding: 6px 12px; font-size: 13px; opacity: 0; transform: translateY(8px); transition: .4s var(--ease-out); }
.at-shot:hover figcaption, .at-shot:focus-within figcaption { opacity: 1; transform: none; }
@media (hover: none) { .at-shot figcaption { opacity: 1; transform: none; } }

/* Cierre */
.at-cta { padding: clamp(80px, 10vw, 150px) 0; text-align: center; border-top: 1px solid var(--lino); }
.at-cta-inner { max-width: 760px; display: grid; justify-items: center; gap: 8px; }
.at-cta-inner img { mix-blend-mode: multiply; margin-bottom: 12px; }
.at-cta .section-title { margin: 0 auto 8px; text-align: center; }
.at-cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 20px; }

/* Responsive */
@media (max-width: 960px) {
	.at-hero-grid, .at-story-grid { grid-template-columns: 1fr; }
	.at-hero-media { max-width: 520px; width: 100%; justify-self: center; }
	.at-hero-badge { left: -10px; bottom: 20px; width: 120px; height: 120px; }
	.at-steps { grid-template-columns: 1fr; gap: 40px; }
	.at-line { left: 7px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
	.at-line span { transform-origin: top; transform: scaleY(var(--t, 0)); }
	.at-step { padding: 0 0 0 44px; }
	.at-mat { grid-template-columns: 50px 1fr; }
	.at-mat-text { grid-column: 2; }
	.at-mat-thumb { display: block; grid-column: 2; aspect-ratio: 16/9; overflow: hidden; }
	.at-mat-thumb img { width: 100%; height: 100%; object-fit: cover; }
	.at-mat-float { display: none; }
	.at-value + .at-value { padding-left: 0; border-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.at-hero-title .w > span { transform: none; }
	.at-mat-float { display: none; }
}
