/* FlorianAigner.at – one-file stylesheet
   Includes: site styles + tile system (former tiles.css)
*/

/* =========================================================
   VARIABLES
   ========================================================= */
:root{
  --maxw: 960px;
  --maxw-2: 640px;
  --pad: 20px;
  --tile: 320px;

  /* Breakpoints */
  --bp-m: 1000px;
  --bp-s: 650px;

  --accent: #942;
  --paper: rgba(255,255,255,0.85);
  --ink: #000;
  --muted: #666;
}

/* =========================================================
   GLOBAL BASICS
   ========================================================= */
*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  font: 90% Arial, Helvetica, sans-serif;
  text-align: center;
  color: var(--ink);
  margin: 0;
  padding: 0;

  background-image: url(pics/scribble2l.jpg), url(pics/scribble2r.jpg);
  background-color: #ccc;
  background-repeat: no-repeat, no-repeat;
  background-position: left top, right top;
  background-attachment: fixed, fixed;
}

img{
  max-width: 100%;
  height: auto;
  display: block;
}

/* One-off helper: two images inside a tile (generic wrapper) */
.media-half{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  height: 100%;
}

.media-half img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* picture behaves like a block tile */
picture{ display: block; }
picture > img{
  display: block;
  width: 100%;
  height: auto;
}

/* =========================================================
   LINKS + FOCUS
   ========================================================= */
a{
  font-weight: bold;
  text-decoration: none;
  color: #333;
}
a:hover{ text-decoration: underline; }

a:focus-visible{
  outline: 3px solid rgba(148,68,34,0.5);
  outline-offset: 3px;
  border-radius: 0px;
}

/* subtle image hover zoom */
a img{ transition: transform 1s cubic-bezier(0.25,0.1,0.25,1); }
a:hover img{ transform: scale(1.05); 
}

/* =========================================================
   TYPOGRAPHY
   ========================================================= */
h1{
  font-size: 140%;
  margin: 0 0 0.35em 0;
  color: var(--accent);
}

h2{
  font-size: 110%;
  color: var(--ink);
  margin: 0 0 0.3em 0;
}

.meta{
  font-size: 85%;
  color: var(--muted);
  margin: 0 0 1.2em 0;
}

/* =========================================================
   UTILITIES (general)
   ========================================================= */
.hide-sm{ display: block; }
.show-sm{ display: none; }

/* NOTE: px fallback first (best compatibility), then var() */
@media (max-width: 1000px){
  .hide-sm{ display: none !important; }
  .show-sm{ display: block !important; }
}

/* =========================================================
   NAVIGATION
   ========================================================= */

/* --- Container ------------------------------------------------ */

.menu_box{
  list-style: none;
  margin: 0;
  padding: 0;

  position: relative;
  float: right;

  font-size: 120%;
  padding-right: calc(50% - (var(--maxw) / 2));
}


/* --- Menüstruktur -------------------------------------------- */

.menu_box > li{
  float: left;
}


/* --- Basis-Linkstil ------------------------------------------ */

.menu_box > li > a{
  display: block;

  padding: 15px 15px;
  text-align: center;

  color: #fff;
  text-decoration: none;
}


/* --- Hover / Fokus (UI-Verhalten) ---------------------------- */

.menu_box > li > a:hover,
.menu_box > li > a:focus,
.menu_box > li > a:focus-visible{
  color: #000;
  background-color: rgba(192,192,192,.5);
  text-decoration: none;
}


/* --- Aktiver Menüpunkt --------------------------------------- */
.menu_box > li > a.active,
.menu_box > li > a.active:hover,
.menu_box > li > a.active:focus,
.menu_box > li > a.active:focus-visible{
  color: #000;
  background-color: #fff;
}

/* --- Responsive Menü-Wrapper -------------------------------- */

#responsive-menu{
  position: fixed;
  top: 0;
  width: 100%;

  background-color: rgba(0,0,0,.66);
  border: 1px solid #000;

  height: auto;
  z-index: 10;
}


/* --- Toggle (Checkbox / Button) ------------------------------ */

#menu__toggle{
  display: none;


}/* =========================================================
   HEADER
   ========================================================= */
#header{
  width: 100%;
  height: 400px;

  background-color: #fff;
  background-image: url(pics/wallbannerHS.jpg);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;

  position: relative;
  z-index: -1;
  box-shadow: 0 0 3px 1px #666;
  overflow: hidden;
}

@keyframes zoomin{ from{ transform: scale(1); } to{ transform: scale(1.08); } }
@keyframes zoomout{ from{ transform: scale(1.08); } to{ transform: scale(1); } }

#header::before{
  content:'';
  position:absolute;
  inset:0;

  background-image: inherit;
  background-size: cover;
  background-repeat:no-repeat;
  background-position:center;

  animation:
    zoomin 10s cubic-bezier(0.5,0.3,0.5,1) 1 forwards,
    zoomout 10s cubic-bezier(0.5,0,0.5,1) 1 forwards 10s;
}

/* =========================================================
   GENERIC CONTAINER (non-tiles, e.g. socials)
   ========================================================= */
.container{
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  flex-direction: row;

  margin: auto;
  padding: 0;
  max-width: var(--maxw);

  text-align: left;
  background-color: var(--paper);
  overflow: hidden;
  position: relative;
}

/* =========================================================
   TILE SYSTEM — CORE  (former tiles.css)
   ========================================================= */

/* ---- Section ----
   Use: <div class="tileblock"> ... </div>
   (Typically stacked vertically on the page.)
*/
.tileblock{
  display: grid;
  grid-template-columns: repeat(3, var(--tile));
  justify-content: center;
  row-gap: 0;
  column-gap: 0;

  margin: 0 auto;
  max-width: var(--maxw);
  padding-left: 0;
  padding-right: 0;
}

/* ---- Tile layout breakpoints (px; custom-properties don't work in @media) ---- */
@media (max-width: 1000px){
  .tileblock{
    grid-template-columns: repeat(2, var(--tile));
    max-width: var(--maxw-2);
  }
}
@media (max-width: 650px){
  .tileblock{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }
}


/* ---- Breakpoints ----
   M: 2 columns fixed 320px, still centered.
   S: 2 columns fluid (1fr), full width, no side padding/max-width.
*/


/* ---- Tile base ---- */
.tile{ min-width: 0; }

/* ---- Tile types ---- */
.tile.media{
  overflow: hidden;   /* oder clip */
}

.tile.media img{
  display: block;
  width: 100%;
  height: auto;
}

.tile.text{
  padding: 18px;
  text-align: left;
  background: rgba(255,255,255,0.67);
  backdrop-filter: blur(2px);
}

/* ---- Logical spans ---- */
.span-1{ grid-column: span 1; }
.span-2{ grid-column: span 2; }
.span-3{ grid-column: 1 / -1; }

/* ---- Visibility helpers ---- */
@media (max-width: 1000px){
  .hide-ms{ display: none !important; }
}
@media (max-width: 650px){
  .hide-s{ display: none !important; }
}


/* ---- Expansion rule ----
   If an expandable text tile would be alone in a row in M/S,
   it expands to fill the whole 2-tile row.
*/
@media (max-width: 1000px){
  .tile.text.expand{ grid-column: span 2; }
}

/* ---- Reorder: Media – Text – Media → Media – Media – Text ---- */
@media (max-width: 1000px){
  .reorder-mmt{
    grid-template-areas:
      "m1 m2"
      "t  t";
  }
  .reorder-mmt .m1{ grid-area: m1; }
  .reorder-mmt .m2{ grid-area: m2; }
  .reorder-mmt .t { grid-area: t; }
}

/* ---- Spacer ---- */
.rowbreak{
  height: var(--rowgap, 32px);
  pointer-events: none;
}

/* ---- Wide text with internal 3→2→1 columns ----
   Use: <div class="tile text span-3 prose-cols">…</div>
*/
.tile.text.prose-cols{ column-gap: 24px; }

/* Überschriften möglichst nicht vom folgenden Abschnitt trennen */
.prose-cols h2,
.prose-cols h3{
  break-after: avoid-column;
}

/* Auf großen Bildschirmen können ausgewählte Abschnitte
   gezielt in einer neuen Spalte beginnen. */
@media (min-width: 1001px){
  .tile.text.prose-cols{ column-count: 3; }

  .prose-cols .column-start{
    break-before: column;
  }
}

@media (max-width: 1000px){
  .tile.text.prose-cols{ column-count: 2; }
}
@media (max-width: 650px){
  .tile.text.prose-cols{ column-count: 1; }
}


/* =========================================================
   SOCIALS + SMALL COMPONENTS
   ========================================================= */
.social{
  float: left;
  margin: 10px;
  width: 40px;
  height: 40px;
}

.container-audio{
  width: auto;
  height: auto;
  display: inline-block;
  vertical-align: top;
}

.copy-button{
  cursor: pointer;
  display: inline-block;
  margin: 10px;
  padding: 15px;
  background-color: #ccc;
  color: #000;
  border: 1px solid black;
}
.copy-button:hover{ background-color: #999; }

/* =========================================================
   BLOG
   ========================================================= */

/* Index cards */
.blog-item .blog-title{
  margin: 0;
}

.blog-meta{
  opacity: 0.8;
  font-size: 0.95em;
  margin-top: 4px;
}

.blog-teasertext{
  margin: 10px 0 0 0;
}

/* Square teaser image (always same look) */
.blog-teaser{
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 0px;
}

.blog-teaser img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Pager */
.blog-pager{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* On small screens: teaser full width above text */
@media (max-width: 650px){
  .blog-teaser{ grid-column: 1 / -1; }
  .blog-item .tile.text{ grid-column: 1 / -1; }
}


.longread{
  max-width: 720px;              /* angenehme Zeilenlänge */
  margin: 0 auto;
  padding: 24px 26px;            /* DER entscheidende Punkt */
  background: rgba(255,255,255,0.65);
  border-radius: 0px;
}

/* Mobile etwas kompakter */
@media (max-width: 650px){
  .longread{
    padding: 18px 16px;
  }
}

.longread p{
  margin: 0 0 14px 0;
  font-size: 110%;
  line-height: 1.5;
}

.longread h1{
  margin-top: 32px;
}

.longread h2{
  margin: 22px 0 10px 0;
  font-weight: 600;
}

.longread header{
  margin-bottom: 20px;
}

.longread footer{
  margin-top: 26px;
  opacity: 0.85;
}

/* =========================================================
   RESPONSIVE: NAV + HEADER + CONTAINER
   ========================================================= */

/* px fallback first */
@media (max-width: 1000px){
  .menu_box > li{ float: none; }

  body{
    background-image: url(pics/scribble2l.jpg);
    background-color: #ccc;
  }

  #responsive-menu{
    background-color: rgba(0,0,0,0);
    box-shadow: none;
    border: none;
  }

  #menu__toggle{ display: block; opacity: 0; }

  #menu__toggle:checked + .menu__btn > span{ transform: rotate(45deg); }
  #menu__toggle:checked + .menu__btn > span::before{ top: 0; transform: rotate(0deg); }
  #menu__toggle:checked + .menu__btn > span::after{ top: 0; transform: rotate(90deg); }
  #menu__toggle:checked ~ .menu_box{ top: 0 !important; }

  .menu__btn{
    position: fixed;
    top: 10px;
    left: calc(50% - 25px);
    width: 50px;
    height: 50px;
    cursor: pointer;
    background-color: rgba(0,0,0,0.8);
    border: 1px solid #003;
    z-index: 11;
  }

  .menu__btn > span,
  .menu__btn > span::before,
  .menu__btn > span::after{
    display: block;
    position: absolute;
    width: 30px;
    height: 3px;
    top: 24px;
    left: 10px;
    background-color: #fff;
    transition-duration: .25s;
  }

  .menu__btn > span::before{ content:''; top: -8px; left: 0; }
  .menu__btn > span::after{ content:''; top:  8px; left: 0; }

  .menu_box{
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-size: 120%;
    background-color: rgba(0,0,0,.8);
    display: block;
    position: fixed;
    left: calc(50% - 100px);
    top: -100%;
    width: 200px;
    height: auto;
    padding-top: 80px;
    list-style: none;
    transition-duration: .25s;
    z-index: 10;
  }

  #header{
    max-height: 260px;
    background-image: url(pics/wallbanners.jpg);
  }

  .container{
    max-width: var(--maxw-2);
    align-items: flex-start;
    justify-content: flex-start;
  }
}


@media (max-width: 650px){
  #header{ height: 200px; }

  .container{
    width: 100%;
    max-width: 100%;
    padding: 0;
  }
}

@media (prefers-reduced-motion: reduce){
  *{ animation:none !important; transition:none !important; }
}

/* =========================================================
   PAGE ORIENTATION / BREADCRUMBS
   ========================================================= */

.breadcrumb-tile{
  padding-top: 6px;
  padding-bottom: 6px;
}

.breadcrumb{
  margin: 0;
  line-height: 1.2;
  font-size: 0.95em;
  opacity: 0.8;
}

.breadcrumb a{
  text-decoration: underline;
}

.longread .breadcrumb{
  margin-bottom: 14px;
}

/* =========================================================
   BLOG BILDER
   ========================================================= */

.post-image{
  margin: 28px 0;
}

.post-image img{
  display: block;
  width: 100%;
  max-width: 900px;
  height: auto;
  margin-left: auto;
  margin-right: auto;
}

.post-image figcaption{
  max-width: 900px;
  margin: 8px auto 0 auto;
  font-size: 0.92em;
  opacity: 0.75;
  line-height: 1.4;
}
