/* Rowly Studio · página pública
   Concepto: estudio nocturno — carbón cálido, hueso y tipografía muy espaciada como el logotipo.
   Secciones alternan carbón y tinta; el único acento es el hueso. */
:root {
  --ink: #0b0a09;
  --coal: #121110;
  --coal-2: #1a1816;
  --line: #2b2723;
  --bone: #ece6dc;
  --bone-dim: #cfc7ba;
  --stone: #8e877d;
  --paper: #efebe4;
  --f-display: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Jost", "Century Gothic", "Futura", system-ui, sans-serif;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--coal); color: var(--bone); font: 300 17px/1.65 var(--f-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 300; margin: 0; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 1px solid var(--bone); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--bone); color: var(--ink); padding: 8px 12px; z-index: 100; }
.skip:focus { left: var(--gutter); }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 26px; font: 400 13px var(--f-body); letter-spacing: .2em; text-transform: uppercase; text-decoration: none; border: 1px solid var(--bone); cursor: pointer; transition: background .2s, color .2s; }
.btn-solid { background: var(--bone); color: var(--ink); }
.btn-solid:hover { background: transparent; color: var(--bone); }
.btn-line { background: transparent; color: var(--bone); }
.btn-line:hover { background: var(--bone); color: var(--ink); }
.btn[disabled] { opacity: .5; cursor: wait; }

/* ---------- Navegación ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) var(--gutter-r) 14px var(--gutter); transition: background .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav.solid { background: rgba(11, 10, 9, .9); backdrop-filter: blur(10px); border-bottom-color: var(--line); }
.nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font: 300 15px var(--f-display); letter-spacing: .5em; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { text-decoration: none; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--bone-dim); }
.nav-links a:hover { color: var(--bone); }
.nav-links .nav-cta { border: 1px solid var(--bone); padding: 9px 16px; color: var(--bone); }
.nav-links .nav-cta:hover { background: var(--bone); color: var(--ink); }
.nav-login { display: inline-flex; align-items: center; gap: 8px; background: var(--bone); color: var(--ink) !important; padding: 9px 18px; text-decoration: none; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; border: 1px solid var(--bone); }
.nav-login::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.nav-login:hover { background: transparent; color: var(--bone) !important; }
.nav-login-m { display: none; }
.nav-toggle { display: none; background: none; border: 0; width: 40px; height: 40px; padding: 10px 8px; cursor: pointer; flex-direction: column; justify-content: space-around; }
.nav-toggle span { display: block; height: 1px; background: var(--bone); transition: transform .25s; }
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-login-m { display: inline-flex; position: relative; z-index: 2; margin-left: auto; padding: 8px 14px; font-size: 12px; }
  .nav-links .nav-login { display: none; }
  .nav-links { position: fixed; inset: 0; background: var(--ink); flex-direction: column; justify-content: center; gap: 26px; opacity: 0; pointer-events: none; transition: opacity .25s; }
  .nav-links a { font-size: 16px; }
  body.menu-open .nav-links { opacity: 1; pointer-events: auto; }
  body.menu-open .nav-toggle span:first-child { transform: translateY(5px) rotate(45deg); }
  body.menu-open .nav-toggle span:last-child { transform: translateY(-5px) rotate(-45deg); }
  .nav-toggle, .nav-brand { position: relative; z-index: 2; }
}

/* ---------- Inicio ---------- */
.hero { position: relative; min-height: min(100svh, 920px); display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(900px 600px at 50% 38%, #221f1b 0%, var(--ink) 70%);
  padding: calc(110px + env(safe-area-inset-top, 0px)) var(--gutter-r) 120px var(--gutter); }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
.hero-ring { position: absolute; width: min(110vw, 760px); aspect-ratio: 1; top: 50%; left: 50%; transform: translate(-50%, -54%); pointer-events: none; max-width: none; }
.hero-ring svg { width: 100%; height: 100%; animation: spin 90s linear infinite; }
.hero-ring circle { fill: none; stroke: var(--line); stroke-width: 1; }
.hero-ring .dash { stroke-dasharray: 2 10; stroke: #3a352f; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-inner { position: relative; z-index: 1; display: grid; justify-items: center; text-align: center; gap: 18px; max-width: 760px; }
.hero-mark { width: clamp(130px, 20vw, 210px); height: auto; animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.hero-name { font: 400 clamp(24px, 3vw, 32px) var(--f-display); letter-spacing: .5em; margin-right: -.5em; margin-top: 6px; }
.hero-name span { display: block; font-size: .42em; font-weight: 400; letter-spacing: .9em; margin-right: -.9em; color: var(--bone); margin-top: 10px; }
.nav-brand small { display: block; font-size: 8px; letter-spacing: .72em; margin-top: 3px; color: var(--stone); }
.nav-brand span { line-height: 1.1; font-weight: 400; }
.hero h1 { font-size: clamp(30px, 5vw, 58px); font-weight: 200; letter-spacing: .02em; line-height: 1.12; margin-top: 18px; }
.hero-lead { color: var(--bone-dim); max-width: 54ch; font-size: clamp(16px, 1.6vw, 19px); }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.hero-strip { position: absolute; bottom: 0; left: 0; right: 0; z-index: 1; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 34px; list-style: none; margin: 0;
  padding: 18px var(--gutter-r) calc(18px + env(safe-area-inset-bottom, 0px)) var(--gutter); border-top: 1px solid var(--line); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--stone); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Secciones ---------- */
.section { padding-block: clamp(72px, 10vw, 128px); }
.section-dark { background: var(--ink); }
.sec-head { display: grid; gap: 14px; margin-bottom: clamp(36px, 5vw, 56px); max-width: 720px; }
.sec-head-row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.sec-head-row > div:first-child { display: grid; gap: 14px; }
.eyebrow { font-size: 12px; letter-spacing: .34em; text-transform: uppercase; color: var(--stone); }
.sec-head h2, .about h2, .contact h2 { font-size: clamp(28px, 3.8vw, 44px); letter-spacing: .02em; line-height: 1.15; }
.sec-lead { color: var(--bone-dim); max-width: 60ch; }

/* ---------- Servicios ---------- */
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.service { padding: 34px 28px 10px 0; display: grid; gap: 16px; align-content: start; }
.service + .service { padding-left: 28px; border-left: 1px solid var(--line); }
.service-k { font: 300 12px var(--f-display); letter-spacing: .3em; color: var(--stone); text-transform: uppercase; }
.service h3 { font-size: 24px; letter-spacing: .04em; }
.service p { color: var(--bone-dim); font-size: 16px; }
.service ul { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 0; }
.service li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; display: flex; justify-content: space-between; gap: 12px; }
.service li::after { content: "→"; color: var(--stone); }
@media (max-width: 860px) { .services { grid-template-columns: 1fr; } .service, .service + .service { padding: 30px 0 6px; border-left: 0; } .service + .service { border-top: 1px solid var(--line); } }

/* ---------- Portafolio ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button { background: none; border: 1px solid var(--line); color: var(--bone-dim); font: 400 12px var(--f-body); letter-spacing: .18em; text-transform: uppercase; padding: 9px 14px; cursor: pointer; }
.filters button[aria-selected="true"] { border-color: var(--bone); color: var(--bone); }
.grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-flow: dense; gap: 14px; }
.work { position: relative; overflow: hidden; background: var(--coal-2); border: 1px solid var(--line); cursor: pointer; text-align: left; color: inherit; font: inherit; padding: 0; display: block; max-width: 100%; }
.work.wide { grid-column: span 4; aspect-ratio: 16 / 9; }
.work.tall { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; min-height: 100%; }
.work.square { grid-column: span 2; aspect-ratio: 1; }
.work img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s, filter .6s; filter: grayscale(.25); }
.work:hover img { transform: scale(1.04); filter: none; }
.work-ph { position: absolute; inset: 0; display: grid; place-items: center;
  background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(236, 230, 220, .025) 14px 15px), radial-gradient(circle at 50% 45%, #24211d, var(--coal-2) 70%); }
.work-ph::before, .work-ph::after { content: ""; position: absolute; width: 22px; height: 22px; border: 1px solid #4a443d; }
.work-ph::before { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.work-ph::after { bottom: 14px; right: 14px; border-left: 0; border-top: 0; }
.work-ph img { width: 54px; height: auto; opacity: .18; filter: none; transform: none !important; }
.work-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 18px; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px;
  background: linear-gradient(transparent, rgba(11, 10, 9, .85)); }
.work-info h3 { font-size: 17px; letter-spacing: .04em; }
.work-info p { font-size: 13px; color: var(--stone); }
.work-tag { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--bone-dim); white-space: nowrap; }
.work.hide { display: none; }
@media (max-width: 860px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .work.wide { grid-column: span 2; } .work.tall { grid-column: span 1; grid-row: span 2; } .work.square { grid-column: span 1; } }
@media (max-width: 480px) { .grid { grid-template-columns: 1fr; } .work.wide, .work.tall, .work.square { grid-column: span 1; grid-row: auto; aspect-ratio: 4 / 3; } }

/* ---------- Nosotros ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 80px); align-items: start; }
.about-text { display: grid; gap: 18px; }
.about-text > p:not(.eyebrow) { color: var(--bone-dim); max-width: 60ch; }
.values { list-style: none; padding: 0; margin: 10px 0 0; display: grid; }
.values li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.values b { font: 300 15px var(--f-display); letter-spacing: .3em; text-transform: uppercase; }
.values span { color: var(--bone-dim); font-size: 15px; }
.team { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.member { display: grid; gap: 10px; }
.member-photo { aspect-ratio: 4 / 5; background: var(--coal-2); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; max-width: 100%; }
.member-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); }
.member-photo span { font: 200 42px var(--f-display); color: #3a352f; }
.member b { font-weight: 400; display: block; }
.member small { color: var(--stone); font-size: 13px; letter-spacing: .08em; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .values li { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Proceso ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.steps li { padding: 28px 26px 34px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 10px; align-content: start; }
.step-n { font: 200 34px var(--f-display); color: var(--stone); font-variant-numeric: tabular-nums; }
.steps h3 { font-size: 19px; letter-spacing: .06em; }
.steps p { color: var(--bone-dim); font-size: 15px; }
@media (max-width: 860px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Clientes ---------- */
.clients { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.client { aspect-ratio: 3 / 2; display: grid; place-items: center; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px; max-width: 100%; }
.client img { max-height: 42px; width: auto; opacity: .75; filter: grayscale(1) brightness(1.6); }
.client b { font: 300 14px var(--f-display); letter-spacing: .24em; text-transform: uppercase; color: var(--bone-dim); text-align: center; }
.client.empty span { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: #4a443d; text-align: center; }
@media (max-width: 860px) { .clients { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px) { .clients { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Preguntas ---------- */
.faq-wrap { max-width: 860px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative; font-size: 18px; font-weight: 400; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font: 200 26px var(--f-display); color: var(--stone); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 0 24px; color: var(--bone-dim); max-width: 64ch; }

/* ---------- Contacto ---------- */
.contact { background: radial-gradient(800px 500px at 15% 20%, #1f1c18, var(--coal) 70%); }
.contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(36px, 6vw, 80px); align-items: start; }
.contact-text { display: grid; gap: 18px; }
.contact-text > p:not(.eyebrow) { color: var(--bone-dim); max-width: 46ch; }
.contact-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; }
.contact-list li { padding: 14px 0; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.contact-list small { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--stone); }
.contact-list a { text-decoration: none; font-size: 17px; overflow-wrap: anywhere; }
.contact-list a:hover { text-decoration: underline; text-underline-offset: 4px; }
.form { display: grid; gap: 16px; background: rgba(11, 10, 9, .55); border: 1px solid var(--line); padding: clamp(20px, 3vw, 34px); min-width: 0; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form label { display: grid; gap: 7px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--stone); min-width: 0; }
.form input, .form select, .form textarea { font: 300 16px var(--f-body); color: var(--bone); background: var(--ink); border: 1px solid var(--line); padding: 12px 13px; border-radius: 0; width: 100%; min-width: 0; letter-spacing: 0; text-transform: none; }
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--bone-dim); }
.form [aria-invalid="true"] { border-color: #b4545d; }
.form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 15px; color: var(--bone-dim); min-height: 1em; }
.form-note.err { color: #e59aa1; }
.form-note.ok { color: var(--bone); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } .form .btn { justify-self: stretch; } }

/* ---------- Pie ---------- */
.footer { background: var(--ink); border-top: 1px solid var(--line); padding-block: 48px calc(28px + env(safe-area-inset-bottom, 0px)); }
.footer-grid { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand b { display: block; font: 300 16px var(--f-display); letter-spacing: .5em; }
.footer-brand span { font-size: 11px; letter-spacing: .4em; color: var(--stone); }
.footer-tag { font: 200 18px var(--f-display); letter-spacing: .12em; color: var(--bone-dim); }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--stone); }
.footer-links a:hover { color: var(--bone); }
.footer-links .team-link { border-left: 1px solid var(--line); padding-left: 22px; }
.footer-copy { margin-top: 32px; font-size: 13px; color: #5d574f; }

/* ---------- Visor del portafolio ---------- */
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(5, 5, 4, .94); display: grid; place-items: center;
  padding: calc(56px + env(safe-area-inset-top, 0px)) var(--gutter-r) calc(24px + env(safe-area-inset-bottom, 0px)) var(--gutter); }
.lb-close { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); right: var(--gutter-r); background: none; border: 1px solid var(--line); color: var(--bone); width: 42px; height: 42px; font-size: 16px; cursor: pointer; }
.lb-body { width: min(1100px, 100%); display: grid; gap: 14px; }
.lb-media { aspect-ratio: 16 / 9; background: var(--coal-2); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; max-width: 100%; }
.lb-media iframe { width: 100%; height: 100%; border: 0; }
.lb-media img { width: 100%; height: 100%; object-fit: contain; }
.lb-empty { text-align: center; color: var(--stone); padding: 24px; display: grid; gap: 8px; justify-items: center; }
.lb-empty img { width: 64px; opacity: .3; }
.lb-cap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lb-cap h3 { font-size: 22px; }
.lb-cap p { color: var(--stone); }

/* Vistas: cada sección es una página */
main > section[hidden] { display: none !important; }
.nav-links a[aria-current="page"] { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }
