/* =========================================================
   01. CSS VARIABLES
   ========================================================= */
:root {
  --bg: #ffffff;
  --text: #000000;
  --muted: #666666;
  --accent: #d04527;
  --line: rgba(0, 0, 0, 0.1);
  --panel: #f5f5f5;
  --glass-bg: rgba(255, 255, 255, 0.4);
  --glass-border: rgba(0, 0, 0, 0.1);
  --glass-blur: blur(12px);
  --white-glass: rgba(255, 255, 255, 0.15);
}

::selection {
  background-color: var(--accent);
  color: #fff;
}
::-moz-selection {
  background-color: var(--accent);
  color: #fff;
}

/* Footer Animation Styles */
.site-footer {
  position: relative;
  z-index: 1;
  transition: background-color 0.5s ease;
}

.footer-reveal-bg {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: var(--accent);
  z-index: -1;
  transition: height 0.3s ease-out;
}

.footer-inner h2 {
  transition: transform 0.5s ease, color 0.5s ease;
}

.footer-inner a {
  transition: transform 0.5s ease, color 0.5s ease;
}

/* Glass Effect Utility */
.glass-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.2) 100%);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

.about-glass-box {
  position: relative;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 1);
  border-radius: 24px;
  padding: 3rem;
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.about-glass-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.04;
  pointer-events: none;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.about-glass-box::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 20px var(--accent);
  z-index: -1;
}

.about-glimmer {
  position: absolute;
  top: -100%;
  left: -100%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 45%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 55%
  );
  pointer-events: none;
  z-index: 0;
}



/* =========================================================
   02. RESET & BASE STYLES
   ========================================================= */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Endless Font", sans-serif;
  background: #ffffff;
  color: var(--text);
  line-height: 1.5;
  transition: background-color 0.8s ease, color 0.8s ease;
  overflow-x: hidden;
  cursor: none;
}

.blur-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  backdrop-filter: blur(80px) grayscale(100%) contrast(110%);
  -webkit-backdrop-filter: blur(80px) grayscale(100%) contrast(110%);
  mask-image: radial-gradient(circle at var(--x, 50%) var(--y, 50%), transparent var(--radius, 200px), black 100%);
  -webkit-mask-image: radial-gradient(circle at var(--x, 50%) var(--y, 50%), transparent var(--radius, 200px), black 100%);
  transition: mask-image 0.1s ease;
  background: 
    linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.3)),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 4 4' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='dither'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='1' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23dither)' opacity='0.5'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

.cursor-glass-edge {
  position: fixed;
  top: 0;
  left: 0;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 11;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 
    inset 0 0 15px rgba(255, 255, 255, 0.2),
    0 0 15px rgba(0, 0, 0, 0.1);
  background: transparent;
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
}

.cursor-glass-edge.small {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

body.is-about-focus {
  background: #08090b;
  color: #f6f1e8;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

/* =========================================================
   03. LAYOUT / WRAPPERS
   ========================================================= */
.container {
  width: min(1400px, calc(100% - 2rem));
  margin: 0 auto;
}

.main-content {
  position: relative;
  z-index: 1;
  padding-top: 3.25rem;
  padding-bottom: 4.5rem;
}

.section {
  padding: 4rem 0 4rem;
  border-top: 1px solid var(--line);
  position: relative;
}

.section .container {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.61), transparent);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}
  border-radius: 24px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

/* =========================================================
   04. HEADER / NAVIGATION
   ========================================================= */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 74px;
}

.brand {
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: transparent;
  background: linear-gradient(135deg, #fff 0%, #aaa 50%, #fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  position: relative;
  display: inline-block;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.3));
  text-shadow: 0 1px 0 rgba(255,255,255,0.3), 0 -1px 0 rgba(0,0,0,0.5);
}

.brand::after {
  content: "alänge & aluege";
  position: absolute;
  left: 0;
  top: 1px;
  color: rgba(255,255,255,0.2);
  z-index: -1;
  filter: blur(1px);
}

.main-nav {
  display: flex;
  gap: 2rem;
  font-size: 0.9rem;
}

.main-nav a,
.hero-links a,
.site-footer a {
  position: relative;
  display: inline-block;
}

.main-nav a::after,
.hero-links a::after,
.site-footer a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.main-nav a:hover::after,
.hero-links a:hover::after,
.site-footer a:hover::after {
  transform: scaleX(1);
}

/* =========================================================
   05. TYPOGRAPHY
   ========================================================= */
.eyebrow {
  margin: 0 0 1rem;
  font-size: 0.6rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 400;
  opacity: 0.6;
}

.hero .eyebrow {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  border-radius: 6px;
  color: #000;
  opacity: 1;
  font-weight: 700;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
}


h1 {
  font-size: clamp(4rem, 15vw, 12rem);
  letter-spacing: -0.02em;
  line-height: 0.8;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  color: #000;
  position: relative;
  text-align: left;
  width: 100%;
  z-index: 5;
}

.project-detail__content h1 {
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  line-height: 1.1;
  margin-bottom: 0.8rem;
  letter-spacing: -0.06em;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.hero h1::after {
  display: none;
}

h2 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  letter-spacing: -0.08em;
  line-height: 0.9;
}

h3 {
  font-size: 1.4rem;
  letter-spacing: -0.05em;
}

.lead,
.about-copy p,
.project-copy p,
.services-list p {
  color: var(--muted);
  font-weight: 400;
}

.about-copy p {
  max-width: 740px;
  font-size: 1.2rem;
  color: #09090a;
  min-height: 1.5em;
  line-height: 1.6;
}

.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--accent);
  margin-left: 2px;
  animation: blink 0.7s infinite;
  vertical-align: text-bottom;
}

@keyframes blink {
  0%, 49% {
    opacity: 1;
  }
  50%, 100% {
    opacity: 0;
  }
}

.lead {
  max-width: 740px;
  font-size: 1.15rem;
  margin-bottom: 2rem;
}

/* =========================================================
   06. HERO / CTA BUTTONS
   ========================================================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-bottom: 2.5rem;
  position: relative;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-weight: 500;
  align-items: center;
  justify-content: flex-start;
}

.hero-links a,
.hero-links .archive-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1.3rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #d04527, #ff7b54, #d04527);
  background-size: 200% auto;
  color: #ffffff;
  border: 1px solid var(--accent);
  box-shadow: 0 8px 18px rgba(208, 69, 39, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  animation: button-gradient 3s linear infinite;
}

@keyframes button-gradient {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.hero-links a:hover,
.hero-links .archive-trigger:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(208, 69, 39, 0.22);
  filter: brightness(1.02);
}

.hero-links a:last-child {
  background: #ffffff;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  box-shadow: 0 4px 12px rgba(208, 69, 39, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hero-links a:last-child:hover {
  background: rgba(208, 69, 39, 0.04);
  box-shadow: 0 8px 16px rgba(208, 69, 39, 0.15);
  filter: none;
}

.hero-links a::after,
.hero-links .archive-trigger::after {
  display: none;
}

/* =========================================================
   07. PROJECTS / WORK GRID
   ========================================================= */
.section-header {
  margin-bottom: 1.25rem;
}

.work-library {
  display: grid;
  gap: 0.6rem;
}

.project-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
  transition: border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.project-card:first-child {
  border-top: 0;
}

.project-card.is-active {
  border-color: rgba(208, 69, 39, 0.45);
}

.project-card:hover {
  transform: translateY(-1px);
}

.project-thumb {
  min-height: 86px;
  border: 2px solid var(--text);
  background: var(--panel);
  display: flex;
  align-items: end;
  justify-content: flex-start;
  padding: 0.75rem;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.project-thumb-one { background: #efe2d0; }
.project-thumb-two { background: #f3eee6; }
.project-thumb-three { background: #efe4d8; }
.project-thumb-four { background: #f6f1e6; }
.project-thumb-five { background: #eee6d8; }
.project-thumb-six { background: #f0e7dd; }
.project-thumb-seven { background: #f6f0e8; }
.project-thumb-eight { background: #efe6dc; }
.project-thumb-nine { background: #f4efe8; }

.project-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.2s ease, padding-top 0.2s ease;
  padding-top: 0;
}

.project-card.is-active .project-copy {
  max-height: 220px;
  opacity: 1;
  padding-top: 0.45rem;
}

.project-meta {
  color: var(--accent);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.project-copy h3 {
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
}

/* =========================================================
   08. STATE VARIATIONS
   ========================================================= */
body.project-view-active {
  background: #ffffff;
  color: #09090a;
}

body.project-view-active .site-header {
  background: rgba(255, 255, 255, 0.82);
}

body.project-view-active .archive-panel {
  background: #ffffff;
  color: #09090a;
  box-shadow: inset 0 1px 0 rgba(9, 9, 10, 0.08);
}

body.project-view-active .archive-panel .work-library {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

body.project-view-active .project-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border: 1px solid rgba(9, 9, 10, 0.12);
  border-radius: 20px;
  overflow: hidden;
  background: #f7f3ee;
  min-height: 280px;
}

body.project-view-active .project-card .project-thumb {
  min-height: 180px;
  border: 0;
  border-bottom: 1px solid rgba(9, 9, 10, 0.08);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  background: linear-gradient(135deg, rgba(255,255,255,0.45), rgba(190,190,190,0.12));
}

body.project-view-active .project-card .project-copy {
  max-height: none;
  opacity: 1;
  padding: 1rem;
}

body.project-view-active .project-card .project-copy h3,
body.project-view-active .project-card .project-copy p,
body.project-view-active .project-card .project-copy .project-meta {
  color: #09090a;
}

body.project-view-active .project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(9, 9, 10, 0.08);
}

.archive-section {
  padding-top: 2rem;
  padding-bottom: 2rem;
  background: #000000;
  color: #ffffff;
  border-top: none;
}

.archive-header {
  margin-bottom: 2rem;
  color: #ffffff;
}

.archive-section .eyebrow {
  color: rgba(255, 255, 255, 0.7);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  align-items: start;
  grid-auto-flow: dense;
}

.project-tile {
  position: relative;
  overflow: hidden;
  display: block;
  background: transparent;
  border: 0;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease;
  aspect-ratio: 0.94;
  will-change: transform, opacity;
}

.project-tile--portrait {
  aspect-ratio: 0.72;
}

.project-tile--landscape {
  aspect-ratio: 1.38;
}

.project-tile:hover {
  transform: translateY(-4px);
  opacity: 0.96;
}

.project-tile img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  background: transparent;
  box-shadow: none;
}

.project-tile__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.25s ease, background 0.25s ease;
  box-sizing: border-box;
  pointer-events: none;
}

.project-tile:hover .project-tile__overlay {
  opacity: 1;
  background: rgba(255, 255, 255, 0.4);
}

.project-tile__overlay span {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: #09090a;
  text-align: center;
  padding: 1rem;
  max-width: 90%;
}

.project-tile:nth-child(2),
.project-tile:nth-child(4),
.project-tile:nth-child(7) {
  grid-column: span 1;
}

.project-tile:nth-child(3),
.project-tile:nth-child(5),
.project-tile:nth-child(6),
.project-tile:nth-child(9) {
  grid-column: span 1;
}

/* Custom aspect ratio adjustments for even frame filling */
.project-tile:nth-child(4) {
  aspect-ratio: 0.89;
}

.project-tile:nth-child(5) {
  aspect-ratio: 0.91;
}

.project-tile:nth-child(6) {
  aspect-ratio: 0.87;
}

.project-page .main-content {
  padding-top: 2rem;
}

.project-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(260px, 0.7fr);
  gap: 2rem;
  align-items: start;
}

.project-detail__gallery {
  display: grid;
  gap: 1rem;
}

.detail-image {
  margin: 0;
  padding: 0;
  background: #f3efe9;
  border: 1px solid var(--line);
  overflow: hidden;
}

.detail-image img {
  width: 100%;
  display: block;
  object-fit: contain;
}

.project-detail__content {
  background: rgba(255, 255, 255, 0.32);
  border: 1px solid var(--line);
  padding: 1.5rem;
}

.project-detail__content h1 {
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  line-height: 1.1;
  margin-bottom: 0.8rem;
  letter-spacing: -0.06em;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.project-detail__meta,
.project-detail__summary,
.project-detail__description {
  color: var(--muted);
}

.project-detail__meta {
  margin-bottom: 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.project-detail__summary {
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.5;
}

.project-detail__description {
  margin-bottom: 1.5rem;
  line-height: 1.7;
  font-size: 0.96rem;
}

.detail-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.detail-info-grid div {
  display: grid;
  gap: 0.3rem;
}

.detail-info-grid span {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-info-grid strong {
  font-size: 0.96rem;
  letter-spacing: -0.03em;
}

.detail-topbar {
  margin-bottom: 1.5rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
}

.detail-empty {
  padding: 4rem 0;
}

/* =========================================================
   09. FOOTER / CONTACT
   ========================================================= */
.site-footer {
  background: var(--accent);
  color: #ffffff;
  border-top: none;
  padding: 1.5rem 0 2.5rem;
}

.site-footer .eyebrow,
.site-footer h2,
.site-footer a {
  color: #ffffff;
}

.site-footer a:hover::after {
  background: #ffffff;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.5rem;
}

.footer-inner h2 {
  max-width: 520px;
  font-size: clamp(1.6rem, 2.3vw, 2.5rem);
  letter-spacing: -0.05em;
}

.footer-inner a {
  font-size: 1rem;
  font-weight: 600;
}

/* =========================================================
   10. RESPONSIVE DESIGN
   ========================================================= */
@media (max-width: 920px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-detail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .main-nav {
    display: none;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-tile__meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .project-card {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
