/*
Theme Name: AE Art Frame
Theme URI: https://adrianestrada.art
Author: Adrian Estrada
Description: A lean foundation theme for AdrianEstrada.art. It controls the frame, not Gutenberg section architecture.
Version: 1.5.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: ae-art-frame
License: GPLv2 or later
*/

:root{
  --ae-bg:#050505;
  --ae-surface:#0b0b0b;
  --ae-text:#f4f1ec;
  --ae-muted:#b9b2aa;
  --ae-accent:#fff;
  --ae-line:rgba(255,255,255,.18);
  --ae-soft-line:rgba(255,255,255,.08);
  --ae-font-body:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --ae-font-heading:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --ae-page:clamp(18px,4vw,64px);
  --ae-section:clamp(44px,8vw,120px);
  --ae-copy:min(72ch,calc(100% - (var(--ae-page) * 2)));
  --ae-wide:min(1480px,calc(100% - (var(--ae-page) * 2)));
  --ae-radius:clamp(14px,1.25vw,24px);
}

*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--ae-bg);color:var(--ae-text);font-family:var(--ae-font-body);font-size:clamp(16px,.95vw,18px);line-height:1.65;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}body::before{content:"";position:fixed;inset:0;z-index:-2;background-size:cover;background-position:center;pointer-events:none}body::after{content:"";position:fixed;inset:0;z-index:-1;background:radial-gradient(circle at top center,rgba(255,255,255,.035),transparent 36rem),linear-gradient(180deg,rgba(255,255,255,.02),transparent 20rem);pointer-events:none}a{color:inherit;text-decoration-thickness:1px;text-underline-offset:.22em}a:hover{opacity:.78}img,video,svg{max-width:100%;height:auto}button,input,textarea,select{font:inherit}.screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}

.ae-site{min-height:100vh;display:flex;flex-direction:column}.ae-main{flex:1;width:100%}.ae-header{position:sticky;top:0;z-index:50;background:rgba(5,5,5,.82);backdrop-filter:blur(16px);border-bottom:1px solid var(--ae-soft-line)}.admin-bar .ae-header{top:32px}.ae-header__inner{width:var(--ae-wide);margin-inline:auto;min-height:clamp(68px,6vw,88px);display:flex;align-items:center;justify-content:space-between;gap:clamp(22px,4vw,64px)}.ae-brand{font-family:var(--ae-font-heading);font-weight:750;font-size:clamp(22px,1.9vw,32px);letter-spacing:-.035em;text-decoration:none;white-space:nowrap}.custom-logo-link img{display:block;max-height:54px;width:auto}.ae-nav ul{list-style:none;margin:0;padding:0;display:flex;align-items:center;gap:clamp(18px,2.2vw,34px)}.ae-nav li{position:relative}.ae-nav a{display:inline-flex;align-items:center;min-height:38px;color:var(--ae-text);text-decoration:none;font-size:clamp(14px,.88vw,16px);font-weight:620}.ae-nav .current-menu-item>a,.ae-nav .current_page_item>a{border-bottom:1px solid var(--ae-accent)}.ae-nav .sub-menu{display:none;position:absolute;top:100%;left:50%;transform:translateX(-50%);min-width:210px;padding:12px;background:rgba(7,7,7,.96);border:1px solid var(--ae-line);border-radius:16px;box-shadow:0 22px 60px rgba(0,0,0,.4)}.ae-nav li:hover>.sub-menu,.ae-nav li:focus-within>.sub-menu{display:grid;gap:6px}.ae-nav .sub-menu a{display:flex;min-height:0;padding:8px 10px;border-radius:10px;white-space:nowrap}.ae-nav .sub-menu a:hover{background:rgba(255,255,255,.07);opacity:1}.ae-menu-toggle{display:none;background:transparent;color:var(--ae-text);border:1px solid var(--ae-line);border-radius:999px;padding:9px 13px}

.ae-header-centered .ae-header__inner{flex-direction:column;justify-content:center;gap:8px;padding-block:14px}.ae-header-centered .ae-brand{font-size:clamp(24px,2.2vw,36px)}.ae-header-centered .ae-nav ul{justify-content:center}.ae-header-compact .ae-header__inner{min-height:58px}.ae-header-compact .ae-brand{font-size:clamp(20px,1.45vw,26px)}.ae-header-compact .ae-nav a{font-size:14px;min-height:32px}

/* Page frame: foundation only. Do not reshape Gutenberg block architecture. */
.ae-page-frame{width:100%;padding-block:clamp(24px,5vw,72px)}
.entry-content{width:100%;max-width:none}
.entry-content > *{margin-block-start:0}
.entry-content h1,.entry-content h2,.entry-content h3,.entry-content h4,.entry-content h5,.entry-content h6,.ae-page-title{font-family:var(--ae-font-heading);line-height:1.12;letter-spacing:-.025em}
/* Do not force Gutenberg heading sizes. Page/block typography should remain editable in the editor. */
.ae-page-title{width:min(1180px,calc(100% - (var(--ae-page) * 2)));margin:0 auto clamp(28px,4vw,56px);font-size:clamp(36px,5vw,76px)}
.ae-hide-page-titles .ae-page-title,body.home .ae-page-title{display:none}

/* Basic visual language only. Gutenberg blocks keep their native layout behavior. */
.wp-block-button__link,.ae-button,button,input[type="submit"]{border-radius:999px;border:1px solid var(--ae-line);padding:12px 19px;background:var(--ae-text);color:#050505;text-decoration:none;font-weight:750;line-height:1;display:inline-flex;align-items:center;justify-content:center}
.wp-block-button.is-style-outline .wp-block-button__link,.ae-button--ghost{background:transparent;color:var(--ae-text)}
.wp-block-image img{border-radius:var(--ae-radius)}

/* Light plugin containment without controlling plugin layout architecture. */
.aeps-wrap,.aeps-showcase,.ae-youtube-wall,.aeyw-wrap,.ae-video-showcase,.ssc-form-wrap{width:var(--ae-wide);max-width:100%;margin-inline:auto}.aeps-card,.aeyw-card,.ae-video-card{background:rgba(255,255,255,.035)!important;border:1px solid var(--ae-soft-line)!important;border-radius:var(--ae-radius)!important;overflow:hidden;box-shadow:none!important}.aeps-card-title,.aeyw-title{color:var(--ae-text)!important}.aeps-card-text,.aeyw-meta{color:var(--ae-muted)!important}.ssc-form-wrap input,.ssc-form-wrap textarea,input,textarea,select{background:#0e0e0e;color:var(--ae-text);border:1px solid var(--ae-line);border-radius:14px;padding:13px 14px}.ssc-form-wrap label{color:var(--ae-muted)}video{background:#000;border-radius:calc(var(--ae-radius) - 4px)}

.ae-footer{border-top:1px solid var(--ae-soft-line);padding:clamp(36px,5vw,64px) 0;color:var(--ae-muted);background:#030303}.ae-footer__inner{width:var(--ae-wide);margin-inline:auto;display:flex;align-items:center;justify-content:space-between;gap:22px;flex-wrap:wrap;font-size:14px}.ae-footer a{text-decoration:none;color:var(--ae-text)}.ae-footer ul{display:flex;gap:20px;list-style:none;margin:0;padding:0}.ae-footer-widget{width:var(--ae-wide);margin:0 auto 28px}



/* Gutenberg compatibility guard: keep native blocks horizontal without changing their layout. */
.entry-content :where(p,li,h1,h2,h3,h4,h5,h6,figcaption){writing-mode:horizontal-tb;text-orientation:mixed;word-break:normal}
.entry-content :where(img,video,svg){max-width:100%;height:auto}

@media (max-width: 760px){.admin-bar .ae-header{top:46px}.ae-header__inner{min-height:66px}.ae-menu-toggle{display:inline-flex}.ae-nav{display:none;position:absolute;left:18px;right:18px;top:calc(100% + 10px);padding:18px;background:rgba(8,8,8,.98);border:1px solid var(--ae-line);border-radius:18px;box-shadow:0 20px 60px rgba(0,0,0,.44)}.ae-nav.is-open{display:block}.ae-nav ul{display:grid;gap:12px}.ae-nav a{font-size:18px;display:block;padding:7px 0}.ae-nav .sub-menu{display:grid;position:static;transform:none;box-shadow:none;min-width:0;margin:6px 0 4px 16px;padding:4px 0 4px 12px;border:0;border-left:1px solid var(--ae-line);border-radius:0;background:transparent}.ae-header-centered .ae-header__inner{flex-direction:row;justify-content:space-between;padding-block:0}}
@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.001ms!important}}


/* AE Video Frame block */
/* AE Video Frame block */
.wp-block-ae-art-frame-video-frame,
.ae-video-frame{
  --ae-video-max: 960px;
  --ae-video-width: 100%;
  --ae-video-radius: var(--ae-radius);
  --ae-video-edge: rgba(255,255,255,.16);
  --ae-video-edge-size: 0px;
  --ae-video-shadow: 35;
  width:min(var(--ae-video-width), var(--ae-video-max));
  max-width:100%;
  margin:clamp(28px,5vw,72px) auto;
}
.ae-video-frame--align-left{margin-left:0;margin-right:auto;}
.ae-video-frame--align-center{margin-left:auto;margin-right:auto;}
.ae-video-frame--align-right{margin-left:auto;margin-right:0;}
.ae-video-frame__shell{
  position:relative;
  background:#000;
  overflow:hidden;
  border-radius:var(--ae-video-radius);
  border:var(--ae-video-edge-size) solid var(--ae-video-edge);
  box-shadow:0 18px 70px rgba(0,0,0,calc(var(--ae-video-shadow) / 100));
}
.ae-video-frame--clean .ae-video-frame__shell{background:#000;}
.ae-video-frame--framed .ae-video-frame__shell{
  padding:clamp(8px,1.4vw,18px);
  background:linear-gradient(180deg,rgba(255,255,255,.055),rgba(255,255,255,.018));
}
.ae-video-frame--bare .ae-video-frame__shell{
  border-radius:var(--ae-video-radius);
  box-shadow:none;
  background:transparent;
}
.ae-video-frame__video{
  display:block;
  width:100%;
  height:100%;
  border-radius:calc(var(--ae-video-radius) - var(--ae-video-edge-size));
  object-fit:cover;
  background:#000;
}
.ae-video-frame--cinema .ae-video-frame__shell{aspect-ratio:16/9;}
.ae-video-frame--classic .ae-video-frame__shell{aspect-ratio:4/3;}
.ae-video-frame--square .ae-video-frame__shell{aspect-ratio:1/1;}
.ae-video-frame--vertical{--ae-video-max:min(var(--ae-video-max),520px);}
.ae-video-frame--vertical .ae-video-frame__shell{aspect-ratio:9/16;}
.ae-video-frame--natural .ae-video-frame__shell{aspect-ratio:auto;}
.ae-video-frame--natural .ae-video-frame__video{height:auto;object-fit:contain;}
.ae-video-frame__caption{
  max-width:100%;
  margin:12px auto 0;
  color:var(--ae-muted);
  font-size:clamp(13px,.85vw,15px);
  line-height:1.55;
}
.ae-video-frame__empty{
  min-height:220px;
  display:grid;
  place-items:center;
  color:var(--ae-muted);
  border:1px dashed var(--ae-line);
  border-radius:var(--ae-video-radius);
}
.alignfull.ae-video-frame,
.alignfull.wp-block-ae-art-frame-video-frame{
  width:100%;
  max-width:none;
  --ae-video-max:100%;
}
.alignwide.ae-video-frame,
.alignwide.wp-block-ae-art-frame-video-frame{
  width:var(--ae-wide);
  max-width:100%;
}


/* AE Audio Frame block */
.wp-block-ae-art-frame-audio-frame,
.ae-audio-frame{
  --ae-audio-max: 900px;
  --ae-audio-width: 100%;
  --ae-audio-radius: var(--ae-radius);
  --ae-audio-edge: rgba(255,255,255,.14);
  --ae-audio-edge-size: 0px;
  --ae-audio-shadow: 24;
  width:min(var(--ae-audio-width), var(--ae-audio-max));
  max-width:100%;
  margin:clamp(24px,4vw,60px) auto;
}
.ae-audio-frame--align-left{margin-left:0;margin-right:auto;}
.ae-audio-frame--align-center{margin-left:auto;margin-right:auto;}
.ae-audio-frame--align-right{margin-left:auto;margin-right:0;}
.ae-audio-frame__shell{
  display:grid;
  gap:14px;
  padding:clamp(14px,2.2vw,28px);
  background:rgba(255,255,255,.035);
  border:var(--ae-audio-edge-size) solid var(--ae-audio-edge);
  border-radius:var(--ae-audio-radius);
  box-shadow:0 18px 70px rgba(0,0,0,calc(var(--ae-audio-shadow) / 100));
  overflow:hidden;
}
.ae-audio-frame--clean .ae-audio-frame__shell{
  background:linear-gradient(180deg,rgba(255,255,255,.045),rgba(255,255,255,.018));
}
.ae-audio-frame--card .ae-audio-frame__shell{
  background:linear-gradient(135deg,rgba(255,255,255,.06),rgba(255,255,255,.018));
  border-width:max(var(--ae-audio-edge-size),1px);
}
.ae-audio-frame--bare .ae-audio-frame__shell{
  padding:0;
  background:transparent;
  border-color:transparent;
  box-shadow:none;
}
.ae-audio-frame__content{display:grid;gap:5px;}
.ae-audio-frame__eyebrow{
  color:var(--ae-muted);
  font-size:12px;
  line-height:1.2;
  letter-spacing:.14em;
  text-transform:uppercase;
  font-weight:750;
}
.ae-audio-frame__title{
  margin:0;
  color:var(--ae-text);
  font-family:var(--ae-font-heading);
  font-size:clamp(22px,2.2vw,36px);
  line-height:1.08;
  letter-spacing:-.035em;
}
.ae-audio-frame__description{
  margin:0;
  color:var(--ae-muted);
  font-size:clamp(14px,.95vw,16px);
  line-height:1.55;
}
.ae-audio-frame__player{
  display:block;
  width:100%;
  min-height:42px;
  border-radius:999px;
  background:#f2f2f2;
  color-scheme:light;
}
.ae-audio-frame--bare .ae-audio-frame__player{background:transparent;}
.ae-audio-frame__caption{
  max-width:100%;
  margin:10px auto 0;
  color:var(--ae-muted);
  font-size:clamp(13px,.85vw,15px);
  line-height:1.55;
}
.ae-audio-frame__empty{
  min-height:86px;
  display:grid;
  place-items:center;
  color:var(--ae-muted);
  border:1px dashed var(--ae-line);
  border-radius:var(--ae-audio-radius);
}
.alignfull.ae-audio-frame,
.alignfull.wp-block-ae-art-frame-audio-frame{
  width:100%;
  max-width:none;
  --ae-audio-max:100%;
}
.alignwide.ae-audio-frame,
.alignwide.wp-block-ae-art-frame-audio-frame{
  width:var(--ae-wide);
  max-width:100%;
}


/* Native Gutenberg layout compatibility
   AE Art Frame should not compress/reshape Cover, Group, Columns, Image, or Heading blocks. */
/* Gutenberg hotfix:
   Do not alter native block layouts, widths, columns, images, or typography.
   Let the editor control those. */

/* AE Art Frame page layout foundation
   Direct Gutenberg children on subpages get sane readable gutters and content width.
   Homepage/plugin hero output is intentionally excluded. Nested Gutenberg layouts are not reshaped. */
body:not(.home):not(.front-page) .entry-content{
  padding-inline:var(--ae-page);
}
body:not(.home):not(.front-page) .entry-content > :where(p,h1,h2,h3,h4,h5,h6,ul,ol,blockquote,pre,figure,.wp-block-group,.wp-block-cover,.wp-block-columns,.wp-block-media-text,.wp-block-buttons,.wp-block-image,.wp-block-audio,.wp-block-video,.wp-block-shortcode):not(.alignwide):not(.alignfull):not(.ae-video-frame):not(.wp-block-ae-art-frame-video-frame):not(.ae-audio-frame):not(.wp-block-ae-art-frame-audio-frame){
  max-width:1180px;
  margin-left:auto;
  margin-right:auto;
}
body:not(.home):not(.front-page) .entry-content > .alignwide{
  max-width:1600px;
  margin-left:auto;
  margin-right:auto;
}
body:not(.home):not(.front-page) .entry-content > .alignfull{
  max-width:none;
  margin-left:calc(var(--ae-page) * -1);
  margin-right:calc(var(--ae-page) * -1);
}
body:not(.home):not(.front-page) .entry-content > :first-child{
  margin-top:0;
}




/* AE Video Frame showcase-style player surface and transparent pre-play button.
   Scope: AE Video Frame only. */
.wp-block-ae-art-frame-video-frame.ae-video-frame .ae-video-frame__shell,
.ae-video-frame.wp-block-ae-art-frame-video-frame .ae-video-frame__shell,
.ae-video-frame .ae-video-frame__shell{
  position:relative;
  background:#000;
  overflow:hidden;
  border-radius:var(--ae-video-radius);
  border:var(--ae-video-edge-size) solid var(--ae-video-edge);
  box-shadow:0 18px 50px rgba(0,0,0,calc(var(--ae-video-shadow) / 100));
  display:flex;
  align-items:center;
  justify-content:center;
}

.wp-block-ae-art-frame-video-frame.ae-video-frame--framed .ae-video-frame__shell,
.ae-video-frame.ae-video-frame--framed .ae-video-frame__shell,
.wp-block-ae-art-frame-video-frame.ae-video-frame--clean .ae-video-frame__shell,
.ae-video-frame.ae-video-frame--clean .ae-video-frame__shell{
  padding:0;
  background:#000;
}

.wp-block-ae-art-frame-video-frame .ae-video-frame__video,
.ae-video-frame .ae-video-frame__video{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  background:#000;
  border:0;
  border-radius:inherit;
}

.ae-video-frame__play{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:clamp(58px,7vw,92px);
  height:clamp(58px,7vw,92px);
  border-radius:999px;
  border:2px solid rgba(255,255,255,.86);
  background:rgba(0,0,0,.42);
  backdrop-filter:blur(3px);
  -webkit-backdrop-filter:blur(3px);
  cursor:pointer;
  z-index:4;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
  margin:0;
  appearance:none;
  -webkit-appearance:none;
  transition:transform .18s ease, background .18s ease, opacity .18s ease;
}

.ae-video-frame__play:hover,
.ae-video-frame__play:focus-visible{
  transform:translate(-50%,-50%) scale(1.08);
  background:rgba(0,0,0,.62);
}

.ae-video-frame__play::before{
  content:"";
  display:block;
  width:0;
  height:0;
  border-top:clamp(12px,1.45vw,20px) solid transparent;
  border-bottom:clamp(12px,1.45vw,20px) solid transparent;
  border-left:clamp(20px,2.25vw,33px) solid #fff;
  margin-left:6%;
}

.ae-video-frame.is-playing .ae-video-frame__play,
.ae-video-frame.has-played .ae-video-frame__play,
.ae-video-frame.is-error .ae-video-frame__play{
  opacity:0;
  pointer-events:none;
}

.wp-block-ae-art-frame-video-frame video::-webkit-media-controls-panel,
.ae-video-frame video::-webkit-media-controls-panel{
  background-image:linear-gradient(180deg,rgba(0,0,0,.05),rgba(0,0,0,.72));
}

.wp-block-ae-art-frame-video-frame.ae-video-frame--bare .ae-video-frame__shell,
.ae-video-frame.ae-video-frame--bare .ae-video-frame__shell{
  box-shadow:none;
  border-color:transparent;
}

/* Design control hooks */
body{
  background:var(--ae-bg);
  color:var(--ae-text);
  font-family:var(--ae-font-body);
}
h1,h2,h3,h4,h5,h6,
.ae-site-title,
.site-title,
.wp-block-heading{
  font-family:var(--ae-font-heading);
}
.ae-header{
  min-height:var(--ae-header-height);
}
.ae-header__inner{
  max-width:var(--ae-header-width);
  margin-inline:auto;
}
.ae-site-title,
.site-title{
  font-size:var(--ae-site-title-size);
}
.ae-nav,
.ae-nav a,
.primary-menu a{
  font-size:var(--ae-nav-size);
}
.ae-nav ul,
.primary-menu{
  gap:var(--ae-nav-gap);
}
a{
  color:var(--ae-accent);
}
.wp-block-button__link,
.ae-button,
.button,
button,
input[type=submit]{
  font-family:var(--ae-font-body);
}

