/*
 * Additions for the WordPress version: language switcher, consent checkboxes,
 * real gallery pieces, legal/content pages and the 404 page.
 * Uses the design tokens defined in estudio.css (:root).
 */

/* Header: logo · menu · language switcher (desktop); logo · language · menu button (mobile) */
.main-header .site-logo{order:0}
.main-header .primary-nav{order:1;margin-left:auto}
.main-header .lang-switch{order:2}
.main-header .nav-toggle{order:3}
.lang-switch{display:flex;align-items:center;gap:2px;font-size:13px;font-weight:600;letter-spacing:.6px}
.lang-switch a{display:inline-grid;place-items:center;min-width:34px;min-height:34px;padding:4px 6px;border-radius:20px;color:var(--muted);transition:color .2s,background .2s}
.lang-switch a:hover{color:var(--wine)}
.lang-switch a[aria-current="true"]{color:var(--wine);background:var(--rose)}
.lang-switch a:focus-visible{outline:2px solid var(--wine);outline-offset:2px}
@media(max-width:600px){
  .main-header{gap:10px}
  .nav-toggle{white-space:nowrap}
  .main-header .lang-switch{margin-left:auto;margin-right:4px;font-size:12px}
  .lang-switch a{min-width:32px;min-height:32px}
}
@media(max-width:420px){
  .main-header .site-logo{width:146px}
  .main-header .nav-toggle{padding-inline:13px}
}

/* Contact form: honeypot, consent checkboxes, status messages */
.form-trap{position:absolute!important;left:-9999px;width:1px;height:1px;overflow:hidden}
.form-consents{display:grid;gap:10px;margin-top:20px}
.contact-form .form-check{display:grid;grid-template-columns:22px 1fr;gap:10px;align-items:start;margin:0;font-size:13px;font-weight:400;line-height:1.45;cursor:pointer}
.contact-form .form-check input{appearance:none;-webkit-appearance:none;width:20px;height:20px;margin:1px 0 0;padding:0;border:1px solid #a68f96;border-radius:5px;background:#fff9;display:grid;place-items:center;cursor:pointer;transition:background .2s,border-color .2s}
.contact-form .form-check input::after{content:"";width:10px;height:6px;border-left:2px solid white;border-bottom:2px solid white;transform:rotate(-45deg) translate(1px,-1px);opacity:0;transition:opacity .15s}
.contact-form .form-check input:checked{background:var(--wine);border-color:var(--wine)}
.contact-form .form-check input:checked::after{opacity:1}
.contact-form .form-check input:focus-visible{outline:2px solid var(--wine);outline-offset:2px}
.contact-form .form-check a,.form-note a{color:var(--wine);text-decoration:underline;text-underline-offset:2px}
.contact-form [aria-invalid="true"]{border-color:var(--wine-dark);box-shadow:0 0 0 1px var(--wine-dark)}
.contact-form .btn[disabled]{opacity:.7;cursor:progress}
.form-status.is-error{background:#fff4f6;border-color:var(--wine)}
.form-status.is-success{background:#f4f8f2;border-color:#9bb38f;color:#3f5a35}

/* Project gallery: real pieces share the placeholders' sizes */
.gallery-piece{position:relative;width:220px;height:285px;margin:0;border-radius:12px;overflow:hidden;background:var(--stone);flex-shrink:0}
.gallery-piece.gallery-vertical{width:180px;height:320px}
.gallery-piece.gallery-wide{width:400px;height:285px}
.gallery-piece>img,.gallery-piece>video{display:block;width:100%;height:100%;object-fit:cover}
.gallery-piece .gallery-label{position:absolute;top:12px;left:12px;z-index:1}
@media(max-width:600px){.gallery-piece{width:210px;height:275px}}

/* Footer: Instagram link and legal links */
.footer-note .social-link{color:var(--wine);font-weight:500;text-decoration:underline;text-underline-offset:3px}
.footer-legal{display:flex;flex-wrap:wrap;gap:6px 18px;justify-content:flex-end}
.footer-legal a{color:var(--muted);transition:color .2s}
.footer-legal a:hover{color:var(--wine)}
@media(max-width:600px){
  .footer-bottom{flex-direction:column;gap:12px}
  .footer-legal{justify-content:flex-start}
}

/* Cookie banner: accept and reject have exactly the same weight (AEPD guidance) */
.cookie-banner{
  position:fixed;left:clamp(16px,2vw,28px);bottom:calc(clamp(16px,2vw,28px) + env(safe-area-inset-bottom,0px));z-index:70;
  width:min(440px,calc(100vw - 32px));padding:22px 22px 20px;border:1px solid var(--line);border-radius:18px 46px 18px 18px;
  background:var(--cream);color:var(--ink);box-shadow:0 18px 50px #221b1226;
  opacity:0;transform:translateY(16px);transition:opacity .25s ease,transform .35s cubic-bezier(.22,1,.36,1);
}
.cookie-banner.is-visible{opacity:1;transform:none}
.cookie-banner-title{font-size:17px;font-weight:600;margin:0 0 8px}
.cookie-banner-text{font-size:13px;line-height:1.55;color:#4b4144;margin:0 0 16px}
.cookie-banner-text a{color:var(--wine);text-decoration:underline;text-underline-offset:2px}
.cookie-banner-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.cookie-banner-actions .btn{min-height:44px;padding:10px 16px;font-size:13px}
.cookie-banner-actions .btn:focus-visible{outline:2px solid var(--wine);outline-offset:2px}
body.menu-open .cookie-banner{visibility:hidden}
.footer-legal [data-cookie-settings]{cursor:pointer}
@media(max-width:600px){
  .cookie-banner{left:12px;right:12px;width:auto;bottom:calc(12px + env(safe-area-inset-bottom,0px));padding:18px 16px 16px;border-radius:14px 34px 14px 14px}
}
@media(prefers-reduced-motion:reduce){.cookie-banner{transition:none}}

/* Content pages (legal texts) and 404 */
.content-hero{background:var(--stone);padding:clamp(60px,9vw,120px) 0 clamp(40px,6vw,70px);border-bottom:1px solid var(--line)}
.content-hero h1{font-size:clamp(40px,6vw,88px);font-weight:500;letter-spacing:-.035em;line-height:1.02;max-width:16ch}
.content-hero h1 em{font-family:Playfair,Georgia,serif;color:var(--wine);font-weight:400}
.content-body{padding-block:clamp(45px,7vw,90px)}
.content-text{max-width:780px;font-size:16px;line-height:1.7;color:#30262b}
.content-text>*+*{margin-top:1.1em}
.content-text h2{font-size:clamp(24px,2.4vw,32px);font-weight:500;letter-spacing:-.02em;line-height:1.2;margin-top:2.2em;color:var(--ink)}
.content-text h3{font-size:19px;font-weight:600;margin-top:1.8em;color:var(--ink)}
.content-text>p:first-child{font-size:13px;color:var(--muted);letter-spacing:.3px}
.content-text a{color:var(--wine);text-decoration:underline;text-underline-offset:2px;overflow-wrap:anywhere}
.content-text ul,.content-text ol{padding-left:1.3em}
.content-text li+li{margin-top:.4em}
.content-text strong{font-weight:600}
.content-text table{width:100%;border-collapse:collapse;font-size:14px;line-height:1.5;display:block;overflow-x:auto}
.content-text th,.content-text td{border:1px solid var(--line);padding:10px 12px;text-align:left;vertical-align:top;min-width:120px}
.content-text th{background:var(--stone);font-weight:600}
.not-found .content-hero{min-height:60vh;display:flex;align-items:center}
.not-found-text{font-size:18px;line-height:1.5;max-width:520px;margin:24px 0 32px;color:var(--muted)}
