/* Francesco De Grazia — site styles
   Rebuilt from the Squarespace export: same fonts, colours and grid, none of the platform code. */

/* ---------- Fonts (self-hosted) ---------- */
@font-face {
  font-family: 'Cutive Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/cutive-mono-400.woff2) format('woff2');
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(../fonts/dm-mono-300.woff2) format('woff2');
}
@font-face {
  font-family: 'DM Mono';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url(../fonts/dm-mono-300-italic.woff2) format('woff2');
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/dm-mono-500.woff2) format('woff2');
}
@font-face {
  font-family: 'Source Code Pro';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/source-code-pro-500.woff2) format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  --black: #000;
  --white: #fff;
  --accent: #d9d9d9;
  --light-accent: #f5f5f5;

  --font-heading: 'Cutive Mono', 'Courier New', monospace;
  --font-body: 'DM Mono', 'Courier New', monospace;
  --font-button: 'Source Code Pro', 'Courier New', monospace;

  /* Squarespace type scale: size = (value - 1) * fluid + 1rem */
  --fluid: 1.2vw;

  --gutter: 6vw;
  --max-width: 1400px;
}
@media (min-width: 768px) {
  :root { --gutter: 4vw; }
}
@media (min-width: 1512px) {
  :root { --fluid: 1rem; }
}
@media (max-width: 767px) and (orientation: portrait) {
  :root { --fluid: min(1.2vh, 10.8px); }
}

/* ---------- Section themes ---------- */
.theme-white {
  --bg: var(--white); --text: var(--black); --heading: var(--black); --link: var(--black);
  --nav: var(--white); --btn-bg: var(--black); --btn-text: var(--white);
}
.theme-black {
  --bg: var(--black); --text: var(--white); --heading: var(--white); --link: var(--accent);
  --nav: var(--white); --btn-bg: var(--accent); --btn-text: var(--black);
}
.theme-bright {
  --bg: var(--accent); --text: var(--black); --heading: var(--black); --link: var(--black);
  --nav: var(--black); --btn-bg: var(--black); --btn-text: var(--accent);
}
.theme-black-bold {
  --bg: var(--black); --text: var(--white); --heading: var(--accent); --link: var(--accent);
  --nav: var(--black); --btn-bg: var(--accent); --btn-text: var(--black);
}
.theme-bright-inverse {
  --bg: var(--black); --text: var(--accent); --heading: var(--accent); --link: var(--accent);
  --nav: var(--accent); --btn-bg: var(--accent); --btn-text: var(--black);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 14px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--text, var(--black));
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
}

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

h1, h2, h3, h4 {
  margin: 0 0 1rem;
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--heading);
  font-size: calc((var(--v) - 1) * var(--fluid) + 1rem);
  line-height: calc(1.4em * (1 + (1 - var(--v)) / 25));
}
h1 { --v: 4; }
h2 { --v: 2.8; }
h3 { --v: 2.2; }
h4 { --v: 1.3; }

strong, b { font-weight: 500; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--link); }

/* Heading styles on other elements (keeps one real <h1> per page without changing the look) */
.h3 { --v: 2.2; }
.h4 {
  --v: 1.3;
  font-family: var(--font-heading);
  font-size: calc((var(--v) - 1) * var(--fluid) + 1rem);
  line-height: calc(1.4em * (1 + (1 - var(--v)) / 25));
  color: var(--heading);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.large { --v: 1.5; font-size: calc((var(--v) - 1) * var(--fluid) + 1rem); }
.center { text-align: center; }
.justify { text-align: justify; }
.on-dark { color: var(--white); --heading: var(--white); }
.on-light { color: var(--black); --heading: var(--black); }
.on-dark a, .on-light a { color: inherit; }

/* White text placed straight on a photo gets a soft shadow to stay legible */
.section-bg ~ .content .block.on-dark { text-shadow: 0 1px 10px rgba(0, 0, 0, .7); }
.section-bg ~ .content .block.on-dark .rule { box-shadow: 0 1px 6px rgba(0, 0, 0, .5); }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: .75em 1.5em;
  background: var(--accent);
  color: var(--black);
  font-family: var(--font-button);
}
.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  color: var(--nav);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 2vw;
  padding: 2.2vw var(--gutter);
}
.header-inner .brand { margin-right: auto; }
/* Soft shade behind the header so the menu stays readable over photos */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0 0 -3rem;
  z-index: -1;
  background: linear-gradient(rgba(0, 0, 0, .45), transparent);
  pointer-events: none;
}
.menu-open .site-header::before { display: none; }

.site-title {
  --v: 2;
  margin: 0;
  font-family: var(--font-heading);
  font-size: calc((var(--v) - 1) * var(--fluid) + 1rem);
  line-height: 1.4;
}
.site-title a { color: inherit; text-decoration: none; }
.site-tagline {
  display: block;
  margin-top: 2px;
  font-size: .6em;
  color: var(--white);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1vw;
}
.header-nav a {
  color: inherit;
  text-decoration: none;
  line-height: 1.7;
}
.header-nav a:hover,
.header-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: .3em; }

.social-icons {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: 1.5vw;
}
.social-icons a { display: block; color: inherit; }
.social-icons svg { display: block; width: 22px; height: 22px; fill: currentColor; }

/* [new] pixel badge next to byparallel.art */
@keyframes pixel-blink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes pixel-bounce {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(-3px); }
  50% { transform: translateY(0); }
  75% { transform: translateY(-2px); }
}
.new-badge {
  display: inline-block;
  margin-right: 4px;
  font-family: 'Courier New', monospace;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1.3;
  vertical-align: middle;
  color: #ff6a00;
  text-shadow: 0 0 6px rgba(255, 106, 0, .6);
  animation: pixel-blink 1.8s step-end infinite, pixel-bounce 2s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .new-badge { animation: none; }
}

/* Burger + mobile overlay menu */
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 10px;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  height: 1px;
  margin: 6px 0;
  background: currentColor;
  transition: transform .25s ease, opacity .25s ease;
}
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 6rem var(--gutter) 3rem;
  background: var(--bg);
  color: var(--text);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s;
}
.menu-open .mobile-menu { opacity: 1; visibility: visible; }
.menu-open { overflow: hidden; }
.menu-open .site-header { position: fixed; color: var(--black); }
.menu-open .site-tagline { color: var(--black); }
.mobile-menu nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4em;
  font-size: 8.5vmin;
  line-height: 1.3;
}
.mobile-menu nav a { color: inherit; text-decoration: none; }
.mobile-menu .social-icons { margin: 0; gap: 24px; }
.mobile-menu .social-icons svg { width: 26px; height: 26px; }

@media (max-width: 799px) {
  .header-nav,
  .site-header > .header-inner > .social-icons { display: none; }
  .menu-toggle { display: block; }
}
@media (min-width: 576px) { .mobile-menu nav { font-size: 6.6vmin; } }

/* ---------- Sections + Fluid Engine grid ----------
   Each block carries its Squarespace grid position:
   --m (mobile, 8 columns) and --d (desktop, 24 columns), as "row-start/col-start/row-end/col-end". */
.section {
  --pad: 3.3vmax;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
}
.section.h-small  { min-height: 33vh; }
.section.h-medium { min-height: 66vh; --pad: 6.6vmax; }
.section.h-large  { min-height: 100vh; --pad: 10vmax; }
.section.h-custom { min-height: var(--h); --pad: 4vw; align-items: flex-start; }
.section > .content {
  position: relative;
  width: 100%;
  padding: var(--pad) 0;
}
/* The header floats over the first section, so push its content below the header. */
main > .section:first-child > .content {
  padding-top: calc(var(--header-h, 7rem) + var(--pad));
}
.section-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.section-overlay {
  position: absolute;
  inset: 0;
  background: var(--bg);
}

.grid {
  --cols: 8;
  --row: 24px;
  position: relative;
  display: grid;
  grid-template-columns:
    minmax(var(--gutter), 1fr)
    repeat(var(--cols), minmax(0, calc(var(--max-width) / var(--cols))))
    minmax(var(--gutter), 1fr);
  grid-template-rows: repeat(var(--rows-m), minmax(var(--row), auto));
  overflow-x: clip;
}
@media (min-width: 768px) {
  .grid {
    --cols: 24;
    --container: min(var(--max-width), calc(100vw - var(--gutter) * 2));
    --row: calc(var(--container) * .0215);
    grid-template-rows: repeat(var(--rows-d), minmax(var(--row), auto));
  }
}

.block {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  grid-area: var(--m);
  z-index: var(--z, 1);
  min-width: 0;
}
.block.middle { justify-content: center; }
@media (max-width: 767px) {
  .block.m-top { justify-content: flex-start; }
}
@media (min-width: 768px) {
  .block { grid-area: var(--d); }
}

/* Text block with a tinted box behind it */
.box {
  height: 100%;
  padding: 6%;
  background: var(--box);
}

/* Bio boxes on the duo page: invisible until the photo underneath is hovered; hidden on phones */
.reveal {
  opacity: 0;
  transition: opacity 1s;
}
.reveal:hover { opacity: .8; }
@media (max-width: 768px) {
  .reveal { display: none; }
}

/* Image that fills its grid area */
.block.fill img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rule {
  width: 100%;
  height: 1px;
  border: 0;
  margin: 0;
  background: currentColor;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-block;
  padding: 1.2em 2.004em;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-family: var(--font-button);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: .02em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: opacity .1s linear;
}
.button:hover { opacity: .8; }
.block.button-block { align-items: center; }

/* ---------- Accordion (native <details>) ---------- */
.accordion details {
  border-top: 1px solid currentColor;
}
.accordion details:last-child {
  border-bottom: 1px solid currentColor;
}
.accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 30px 0;
  font-family: var(--font-heading);
  --v: 2.2;
  font-size: calc((var(--v) - 1) * var(--fluid) + 1rem);
  line-height: 1.4;
  color: var(--heading);
  cursor: pointer;
  list-style: none;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary:focus { outline: none; }
.accordion summary:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.accordion summary::after {
  content: '+';
  flex-shrink: 0;
  font-family: var(--font-body);
  transition: transform .2s ease;
}
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion .accordion-body { padding: 0 0 1.4rem; }

/* ---------- Footer ---------- */
.site-footer .grid {
  --rows-m: 6;
  --rows-d: 3;
}
.site-footer h4 { margin: 0; }
.site-footer .email {
  font-family: var(--font-body);
  font-size: 1rem;
}
.site-footer p { margin: 5px 0 0; font-size: .9em; color: var(--white); }
.site-footer .social-icons { justify-content: center; margin: 0; }
.site-footer .social-icons svg { width: 24px; height: 24px; }

/* ---------- Page-specific ---------- */

/* Home: the portrait fills exactly one screen */
.hero {
  height: 100vh;
  height: 100svh;
}

/* Home: album promo card, bottom-right */
.promo {
  position: fixed;
  right: var(--gutter);
  bottom: var(--gutter);
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  width: min(320px, calc(100vw - var(--gutter) * 2));
  padding: 1.5rem 1.5rem 1.5rem 1.75rem;
  background: var(--accent);
  color: var(--black);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
  transform: translateY(calc(100% + var(--gutter) + 20px));
  transition: transform .5s ease;
}
.promo.is-visible { transform: none; }
.promo[hidden] { display: none; }
.promo p {
  --v: 1.3;
  margin: 0;
  padding-right: 2rem;
  font-family: var(--font-heading);
  font-size: calc((var(--v) - 1) * var(--fluid) + 1rem);
  line-height: 1.4;
}
.promo .button {
  --btn-bg: var(--black);
  --btn-text: var(--accent);
}
.promo-close {
  position: absolute;
  top: .5rem;
  right: .5rem;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: 300 22px/1 var(--font-body);
  cursor: pointer;
}
.promo-close:hover { opacity: .6; }
@media (prefers-reduced-motion: reduce) {
  .promo { transition: none; }
}

/* About: blurred panel behind the bio */
/* Edges are feathered with a mask so the fog fades into the photo; the panel
   overhangs its grid area by --feather so the fade happens around the text, not under it. */
.blur-panel {
  --feather: 4vw;
  height: calc(100% + var(--feather) * 2);
  margin: calc(var(--feather) * -1);
  background: rgba(0, 0, 0, .22);
  -webkit-backdrop-filter: blur(28px);
  backdrop-filter: blur(28px);
  -webkit-mask-image:
    linear-gradient(to right, transparent, #000 var(--feather), #000 calc(100% - var(--feather)), transparent),
    linear-gradient(to bottom, transparent, #000 var(--feather), #000 calc(100% - var(--feather)), transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent, #000 var(--feather), #000 calc(100% - var(--feather)), transparent),
    linear-gradient(to bottom, transparent, #000 var(--feather), #000 calc(100% - var(--feather)), transparent);
  mask-composite: intersect;
}

/* Store: simple centred panel */
.section > .content.store {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 66vh;
  padding: 80px 20px;
  text-align: center;
}
main > .section:first-child > .content.store {
  padding-top: calc(var(--header-h, 7rem) + 80px);
}
.store h1 { font-size: 2.5rem; margin-bottom: 30px; }
.store p { font-size: 1.1rem; color: #ccc; margin-bottom: 10px; }
.store p.link { margin-bottom: 30px; }
.store a { color: var(--light-accent); }

/* Spotify embed */
.embed iframe {
  width: 100%;
  height: 552px;
  border: 0;
  border-radius: 12px;
}

/* 404 */
.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 100vh;
  padding: 8rem var(--gutter) 4rem;
  background: var(--bg);
  color: var(--text);
  text-align: center;
}
