/* mitros.app — a journey through the themes of Mitros: every section has its theme (colours, illustration,
   lettering); while scrolling the background and the colours fade from one theme to the next (main.js). */

@font-face { font-family: "Jakarta"; src: url(fonts/plus-jakarta-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(fonts/plus-jakarta-sans-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url(fonts/cinzel-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url(fonts/cinzel-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Cinzel Decorative"; src: url(fonts/cinzel-decorative-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Didot Greek"; src: url(fonts/gfs-didot-greek-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Uncial"; src: url(fonts/uncial-antiqua-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Fell SC"; src: url(fonts/im-fell-english-sc-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Marcellus"; src: url(fonts/marcellus-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Metamorphous"; src: url(fonts/metamorphous-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Cormorant"; src: url(fonts/cormorant-garamond-latin-600-italic.woff2) format("woff2"); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url(fonts/cormorant-garamond-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Special Elite"; src: url(fonts/special-elite-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Shippori"; src: url(fonts/shippori-mincho-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Orbitron"; src: url(fonts/orbitron-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }

/* ---- Theme colours (on <body data-theme>, they fade from one to the next) ---- */
:root { --ease: cubic-bezier(.4, 0, .2, 1); }
body { --ink: #f1e7d0; --muted: #c9bfa8; --accent: #d4aa4f; --accent-ink: #1a1408; --card: rgba(14, 21, 23, .62); --line: rgba(212, 170, 79, .35); }
body[data-theme="mito"] { --ink: #f3ead4; --muted: #cfc4a8; --accent: #d8b25a; --accent-ink: #1c1608; --card: rgba(12, 19, 21, .62); --line: rgba(216, 178, 90, .38); }
body[data-theme="dragonico"] { --ink: #fdebdc; --muted: #f0c2a5; --accent: #f97316; --accent-ink: #1f0a03; --card: rgba(36, 7, 4, .62); --line: rgba(249, 115, 22, .45); }
body[data-theme="arcano"] { --ink: #efe6ff; --muted: #cdbbf3; --accent: #c084fc; --accent-ink: #1a0b2e; --card: rgba(22, 10, 40, .62); --line: rgba(192, 132, 252, .45); }
body[data-theme="siderale"] { --ink: #eef2ff; --muted: #c4cbe6; --accent: #f5c542; --accent-ink: #141005; --card: rgba(5, 8, 20, .6); --line: rgba(245, 197, 66, .4); }
body[data-theme="nanico"] { --ink: #f6e8c8; --muted: #dac9a2; --accent: #e0aa1e; --accent-ink: #1c1405; --card: rgba(28, 19, 9, .64); --line: rgba(224, 170, 30, .45); }
body[data-theme="natura-verde"] { --ink: #1d2b18; --muted: #3e5236; --accent: #3f8f2e; --accent-ink: #ffffff; --card: rgba(244, 249, 240, .78); --line: rgba(63, 143, 46, .4); }
body[data-theme="steampunk"] { --ink: #f4e4c4; --muted: #d8c39b; --accent: #c99b3c; --accent-ink: #1d1407; --card: rgba(34, 22, 12, .66); --line: rgba(201, 155, 60, .45); }
body[data-theme="ciliegio"] { --ink: #3d1b2b; --muted: #6e4457; --accent: #db4f8f; --accent-ink: #ffffff; --card: rgba(255, 244, 249, .8); --line: rgba(219, 79, 143, .35); }
body[data-theme="futuristico"] { --ink: #dcfbff; --muted: #9fd6e0; --accent: #22d3ee; --accent-ink: #021015; --card: rgba(2, 16, 24, .64); --line: rgba(34, 211, 238, .45); }
body[data-theme="vulcanico"] { --ink: #fff0e8; --muted: #f3c3ae; --accent: #ef5a2a; --accent-ink: #ffffff; --card: rgba(34, 7, 4, .68); --line: rgba(239, 90, 42, .45); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: #0b0f10; color: var(--ink);
  font: 400 17px/1.65 "Jakarta", system-ui, sans-serif;
  transition: color 1.1s var(--ease);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }

/* ---- The background: one layer per theme, the visible section's layer fades in ---- */
.stage { position: fixed; inset: 0; z-index: -1; background: #0b0f10; }
.layer { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s var(--ease); background-size: cover; background-position: center; }
.layer::after { content: ""; position: absolute; inset: 0; background: var(--veil); }
.layer.on { opacity: 1; }
.layer[data-theme="mito"] { --veil: linear-gradient(180deg, rgba(8, 13, 15, .55), rgba(8, 13, 15, .82)); }
.layer[data-theme="dragonico"] { --veil: radial-gradient(circle at 50% 40%, rgba(60, 8, 4, .55), rgba(25, 4, 2, .88)); }
.layer[data-theme="arcano"] { --veil: linear-gradient(180deg, rgba(18, 8, 34, .7), rgba(18, 8, 34, .86)); }
.layer[data-theme="siderale"] { --veil: linear-gradient(180deg, rgba(3, 5, 14, .55), rgba(3, 5, 14, .8)); }
.layer[data-theme="nanico"] { --veil: linear-gradient(180deg, rgba(22, 14, 6, .7), rgba(22, 14, 6, .88)); }
.layer[data-theme="natura-verde"] { --veil: linear-gradient(180deg, rgba(240, 247, 234, .72), rgba(240, 247, 234, .9)); }
.layer[data-theme="steampunk"] { --veil: linear-gradient(180deg, rgba(28, 18, 10, .7), rgba(28, 18, 10, .88)); }
.layer[data-theme="ciliegio"] { --veil: linear-gradient(180deg, rgba(255, 240, 246, .7), rgba(255, 240, 246, .9)); }
.layer[data-theme="futuristico"] { --veil: linear-gradient(180deg, rgba(2, 12, 20, .6), rgba(2, 12, 20, .86)); }
.layer[data-theme="vulcanico"] { --veil: radial-gradient(circle at 50% 30%, rgba(48, 8, 4, .62), rgba(20, 4, 2, .92)); }

/* ---- Top bar ---- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10; display: flex; align-items: center; gap: 16px;
  padding: 12px clamp(16px, 4vw, 40px); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--card) 70%, transparent); border-bottom: 1px solid var(--line);
  transition: background-color 1.1s, border-color 1.1s;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 20px "Cinzel", serif; letter-spacing: .08em; }
.brand img { width: 30px; height: 30px; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: 14px; }
.top nav a { color: var(--ink); text-decoration: none; opacity: .85; }
.top nav a:hover { opacity: 1; color: var(--accent); }
.top .cta { padding: 7px 16px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); opacity: 1; font-weight: 600; }
.top .cta:hover { color: var(--accent-ink); filter: brightness(1.08); }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang a { padding: 3px 10px; font-size: 12px; font-weight: 600; }
.lang a[aria-current] { background: var(--accent); color: var(--accent-ink); opacity: 1; }
@media (max-width: 760px) { .top nav .link { display: none; } .brand span { display: none; } }

/* ---- Sections ---- */
section { position: relative; min-height: 100vh; padding: 120px clamp(16px, 5vw, 64px) 90px; display: flex; align-items: center; scroll-margin-top: 60px; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; }
.kicker { font: 600 13px "Jakarta"; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
h2 { font-size: clamp(38px, 6vw, 68px); line-height: 1.05; margin: 0 0 18px; font-weight: 400; }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--ink); margin: 0 0 18px; }
.muted { color: var(--muted); }
ul.points { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
ul.points li { padding-left: 28px; position: relative; color: var(--muted); }
ul.points li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }

.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.feature.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature.flip .text { order: 2; }
@media (max-width: 900px) { .feature, .feature.flip { grid-template-columns: 1fr; } .feature.flip .text { order: 0; } }

.shot { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 6px color-mix(in srgb, var(--accent) 12%, transparent);
  transform: perspective(1600px) rotateY(-4deg) rotateX(2deg); transition: transform .8s var(--ease); }
.feature.flip .shot { transform: perspective(1600px) rotateY(4deg) rotateX(2deg); }
.shot:hover, .feature.flip .shot:hover { transform: none; }
.shot img { width: 100%; height: auto; }

/* Fade in when a section comes into view. */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.seen { opacity: 1; transform: none; }

/* ---- Lettering of each theme ---- */
#inizio h1 { font: 700 clamp(64px, 12vw, 150px)/1 "Cinzel Decorative", "Cinzel", serif; letter-spacing: .06em; margin: 0; color: var(--ink); text-shadow: 0 4px 30px rgba(0, 0, 0, .5); }
#video h2 { font-family: "Uncial", serif; }
#filo h2 { font-family: "Fell SC", serif; }
#mappa h2 { font-family: "Marcellus", serif; letter-spacing: .03em; }
#archivio h2 { font-family: "Metamorphous", serif; }
#glossario h2 { font-family: "Cormorant", serif; font-style: italic; font-weight: 600; }
#scrittoio h2 { font-family: "Special Elite", monospace; }
#temi h2 { font-family: "Shippori", serif; font-weight: 600; }
#telefono h2 { font-family: "Orbitron", sans-serif; font-weight: 600; letter-spacing: .04em; font-size: clamp(32px, 5vw, 56px); }
#scarica h2, .page h1 { font-family: "Cinzel", serif; font-weight: 700; }

/* ---- Opening: the thread of Ariadne ---- */
#inizio { text-align: center; }
#inizio .wrap { display: flex; flex-direction: column; align-items: center; }
.pegasus { width: clamp(120px, 18vw, 190px); filter: drop-shadow(0 0 26px rgba(216, 178, 90, .55)); animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }
.greek { font: 400 clamp(22px, 3vw, 30px) "Didot Greek", serif; color: var(--accent); letter-spacing: .12em; margin: 10px 0 6px; }
.greek small { font: 500 13px "Jakarta"; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); margin-left: 10px; }
.tagline { font: 500 clamp(20px, 2.6vw, 28px)/1.35 "Cinzel", serif; margin: 22px 0 12px; max-width: 820px; }
.hero-text { max-width: 680px; color: var(--muted); margin: 0 0 30px; }
.meander { width: min(640px, 90%); height: 18px; margin: 26px auto 0; color: var(--accent); opacity: .8;
  background: currentColor; -webkit-mask: url("img/meander.svg") repeat-x center / auto 100%; mask: url("img/meander.svg") repeat-x center / auto 100%; }
.buttons { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: 999px; font: 600 16px "Jakarta"; text-decoration: none; border: 1px solid var(--line); color: var(--ink); background: var(--card); backdrop-filter: blur(6px); transition: transform .2s, filter .2s, background-color 1.1s; cursor: pointer; }
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 40%, transparent); }
.btn svg { width: 20px; height: 20px; }
.small-note { margin-top: 18px; font-size: 13px; color: var(--muted); letter-spacing: .04em; }
.scroll-hint { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); animation: float 3s ease-in-out infinite; }

/* ---- Video ---- */
#video .wrap { text-align: center; }
.video { position: relative; max-width: 1040px; margin: 30px auto 0; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; border: 1px solid var(--line);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6), 0 0 60px color-mix(in srgb, var(--accent) 25%, transparent); background: #000; }
.video button { all: unset; position: absolute; inset: 0; cursor: pointer; display: block; }
.video img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.75); transition: filter .3s; }
.video button:hover img { filter: brightness(.9); }
.video .play { position: absolute; left: 50%; top: 50%; width: 92px; height: 92px; margin: -46px 0 0 -46px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 25%, transparent); }
.video .play svg { width: 36px; height: 36px; margin-left: 6px; fill: var(--accent-ink); }
.video .note { position: absolute; left: 0; right: 0; bottom: 14px; font-size: 12px; color: #e7e5e4; text-shadow: 0 1px 4px #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- Themes gallery ---- */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; margin-top: 32px; }
.themes figure { margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--card); transition: transform .3s; }
.themes figure:hover { transform: translateY(-4px) scale(1.02); }
.themes img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.themes figcaption { padding: 8px 12px; font: 600 14px "Jakarta"; }

/* ---- Phone ---- */
.phones { display: flex; gap: clamp(10px, 2vw, 22px); justify-content: center; align-items: flex-end; margin-top: 36px; flex-wrap: wrap; }
.phone { width: clamp(150px, 19vw, 230px); border-radius: 30px; padding: 9px; background: #05080a; border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0, 0, 0, .6), 0 0 30px color-mix(in srgb, var(--accent) 20%, transparent); }
.phone img { border-radius: 22px; }
.phone:nth-child(2) { transform: translateY(-24px); } .phone:nth-child(3) { transform: translateY(-12px); }
.badge { display: inline-block; padding: 3px 12px; border-radius: 999px; border: 1px solid var(--accent); color: var(--accent); font: 600 12px "Jakarta"; letter-spacing: .12em; text-transform: uppercase; vertical-align: middle; margin-left: 10px; }
#telefono .wrap { text-align: center; }
#telefono .lead, #temi .lead { max-width: 760px; margin-left: auto; margin-right: auto; }
#temi .wrap { text-align: center; }

/* ---- Download ---- */
.downloads { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; margin-top: 30px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 28px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.card h3 { margin: 0 0 4px; font: 700 24px "Cinzel", serif; display: flex; align-items: center; gap: 10px; }
.card h3 svg { width: 28px; height: 28px; fill: var(--accent); }
.card .meta { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.card.suggested { box-shadow: 0 0 0 2px var(--accent); }
details { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
summary { cursor: pointer; font-weight: 600; color: var(--ink); }
details ol { margin: 10px 0 0; padding-left: 22px; color: var(--muted); }
details li { margin: 6px 0; }
details p { color: var(--muted); font-size: 14px; }
kbd { font: 600 13px "Jakarta"; background: color-mix(in srgb, var(--accent) 18%, transparent); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; color: var(--ink); }
.yours { margin-top: 26px; display: flex; gap: 16px; align-items: flex-start; }
.yours svg { flex: none; width: 34px; height: 34px; stroke: var(--accent); }

/* ---- Footer and other pages ---- */
footer { position: relative; padding: 50px clamp(16px, 5vw, 64px) 40px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--card) 85%, transparent); text-align: center; color: var(--muted); font-size: 14px; }
footer .row { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: center; margin-top: 10px; }
footer a { color: var(--ink); }
.page { max-width: 820px; margin: 0 auto; padding: 130px clamp(16px, 5vw, 32px) 80px; }
.page h1 { font-size: clamp(36px, 5vw, 54px); margin: 0 0 8px; }
.page h2 { font: 700 24px "Cinzel", serif; margin: 38px 0 10px; }
.page p, .page li { color: var(--muted); }
.page .card { margin-top: 20px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .layer, .reveal, .shot, body, .top { transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .pegasus, .scroll-hint { animation: none; }
  .shot, .feature.flip .shot { transform: none; }
}

/* ---- Pictures that grow (main.js): a copy of the picture over the page ---- */
.can-zoom img.zoom { cursor: zoom-in; }
.zoom-dim { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .6); opacity: 0; transition: opacity .3s var(--ease); cursor: zoom-out; }
.zoom-clone { position: fixed; z-index: 41; transform-origin: center center; object-fit: contain; background: #000; border-radius: 12px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .7), 0 0 0 1px var(--line); transition: transform .32s var(--ease), border-radius .32s var(--ease); will-change: transform; }
.zoom-clone { cursor: zoom-out; }
/* Background music button: fixed at the bottom left; the bars move while the music plays. */
.music { position: fixed; left: 18px; bottom: 18px; z-index: 45; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(226, 181, 78, .55); background: rgba(14, 12, 10, .72); color: #e2b54e; cursor: pointer; padding: 0;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 6px 20px -6px rgba(0, 0, 0, .8); transition: border-color .2s, background .2s; }
.music:hover { border-color: #e2b54e; background: rgba(30, 24, 18, .85); }
.music:focus-visible { outline: 2px solid #e2b54e; outline-offset: 3px; }
.music svg { width: 22px; height: 22px; }
.music .bars rect { transform-origin: 50% 100%; transform-box: fill-box; transform: scaleY(.6); }
.music.on .bars rect { animation: music-bar 1s ease-in-out infinite; }
.music.on .bars rect:nth-child(2) { animation-delay: -.3s; }
.music.on .bars rect:nth-child(3) { animation-delay: -.6s; }
.music .slash { transition: opacity .2s; }
.music.on .slash { opacity: 0; }
@keyframes music-bar { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .music.on .bars rect { animation: none; transform: none; } }
@media (prefers-reduced-motion: reduce) { .zoom-clone, .zoom-dim { transition: none; } }
