/* Alexia Ferrario – Portfolio
   Alle Masse, Farben und Animationen sind aus dem Code der Original-Framer-Seite übernommen.
   Federn (Framer «spring» mit Dauer/Bounce) sind als exakte CSS-Kurven hinterlegt. */

:root {
  --blue: #0000ff;
  --blue-deep: #1802ff;
  --blue-close: #2023ff;
  --red: #ff0000;
  --bg: #ffffff;
  --accent: var(--blue);
  --light: "Area Inktrap Light", "Hanken Grotesk", sans-serif;
  --regular: "Area Inktrap Regular", "Hanken Grotesk", sans-serif;
  --semi: "Area Inktrap SemiBold", "Hanken Grotesk", sans-serif;
  --bold: "Area Inktrap Bold", "Hanken Grotesk", sans-serif;
  /* Framer spring: Dauer 0.7 s, Bounce 0.5 (Navigation, Schliessen-Knopf) */
  --spring-nav: linear(0, 0.0457, 0.1687, 0.319, 0.5002, 0.6613, 0.8201, 0.9398, 1.0404, 1.1035, 1.1441, 1.159, 1.1564, 1.1416, 1.1171, 1.0911, 1.0622, 1.038, 1.0153, 0.999, 0.9862, 0.9789, 0.975, 0.9745, 0.9764, 0.9797, 0.9836, 0.9883, 0.9923, 0.9963, 0.9991, 1.0015, 1.003, 1.0038, 1.0041, 1.0039, 1.0035, 1.0028, 1.0022, 1.0014, 1.0008, 1.0003, 0.9999, 0.9996, 0.9994, 0.9993, 0.9994, 0.9994, 1);
  --spring-nav-ms: 838ms;
  /* Framer spring: Dauer 0.4 s, Bounce 0.2 (Symbol, Bilder Quitte) */
  --spring-logo: linear(0, 0.0194, 0.0753, 0.1398, 0.2138, 0.2926, 0.3882, 0.4657, 0.5391, 0.6074, 0.6813, 0.736, 0.7844, 0.8343, 0.8695, 0.8995, 0.9245, 0.949, 0.9652, 0.9782, 0.9884, 0.9976, 1.0031, 1.0071, 1.0098, 1.0117, 1.0124, 1.0126, 1.0122, 1.0116, 1.0107, 1.0098, 1.0086, 1.0076, 1.0066, 1.0057, 1.0047, 1.0039, 1.0033, 1.0025, 1.002, 1.0016, 1.0012, 1.0009, 1.0006, 1.0004, 1.0003, 1.0001, 1);
  --spring-logo-ms: 422ms;
  /* Framer spring: Dauer 0.1 s, Bounce 0 (Buchstaben) */
  --spring-char: linear(0, 0.0632, 0.168, 0.226, 0.3419, 0.4498, 0.5453, 0.588, 0.6633, 0.7262, 0.7781, 0.8004, 0.8389, 0.8701, 0.8954, 0.9159, 0.9245, 0.9394, 0.9513, 0.9609, 0.9649, 0.9718, 0.9774, 0.9819, 0.9854, 0.987, 0.9895, 0.9916, 0.9933, 0.994, 0.9952, 0.9961, 0.9969, 0.9972, 0.9978, 0.9982, 0.9986, 0.9988, 0.999, 0.9992, 0.9993, 0.9995, 0.9995, 0.9996, 0.9997, 0.9998, 0.9998, 0.9998, 1);
  --spring-char-ms: 142ms;
  --ease-out-expo: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html, body { background: var(--bg); color: var(--accent); font-family: var(--bold); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; user-select: none; -webkit-user-drag: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Navigation (Pillen unten) ---------- */
.nav {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 60;
}
.nav a {
  position: relative; font-family: var(--bold); font-weight: 700; font-size: 16px; line-height: 1.2;
  padding: 4px 14px; border-radius: 1000px; white-space: nowrap;
  background: rgba(255, 255, 255, 0); color: var(--accent);
  opacity: .001; transform: translateY(20px);
  animation: navIn var(--spring-nav-ms) var(--spring-nav) forwards;
}
/* Rand wie im Original: echte 1.5px-Linie (wird wie dort auf Bildschirm-Pixel gerundet) */
.nav a::after { content: ""; position: absolute; inset: 0; border: 1.5px solid var(--accent); border-radius: inherit; pointer-events: none; }
.nav a:nth-child(1) { animation-delay: .2s; }
.nav a:nth-child(2) { animation-delay: .25s; }
.nav a:nth-child(3) { animation-delay: .3s; }
.nav a[aria-current="page"] { background: var(--accent); color: var(--bg); }
@keyframes navIn { from { opacity: .001; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* ---------- Klammern / Pfeile am Rand ---------- */
.edge { position: fixed; top: 50%; transform: translateY(-50%); font-family: var(--bold); font-weight: 700; font-size: 20px; line-height: 1.2; z-index: 10; pointer-events: none; white-space: pre; }
.edge.l { left: 24px; }
.edge.r { right: 26px; }
.guest .edge.r { right: 24px; }

/* ---------- Buchstabe für Buchstabe (Framer Text-Effekt «appear», 40 ms Abstand) ---------- */
.chars span { display: inline-block; white-space: pre; opacity: .001; animation: charIn var(--spring-char-ms) var(--spring-char) forwards; animation-delay: calc(var(--i) * 40ms); }
.chars.instant span { animation-duration: 0s; }
@keyframes charIn { to { opacity: 1; } }

/* ---------- WORK ---------- */
body.work { overflow: hidden; height: 100vh; height: 100dvh; overscroll-behavior: none; }
.canvas { position: fixed; inset: 0; overflow: hidden; cursor: grab; user-select: none; touch-action: none; opacity: 0; }
.canvas.on { opacity: 1; }
.canvas.dragging { cursor: grabbing; }
.canvas .item { position: absolute; left: 0; top: 0; will-change: transform; }
.canvas .intro { transform-origin: center center; }
.canvas .para { will-change: transform; }
.canvas img { display: block; object-fit: cover; transition: opacity .3s ease; }
.canvas img.link { cursor: pointer; }
.canvas img:hover { opacity: .9; }

.side-name { position: fixed; top: 50%; transform: translateY(-50%); font-family: var(--bold); font-weight: 700; font-size: 20px; line-height: 1.2; z-index: 10; pointer-events: none; white-space: pre; }
.side-name.left { left: 24px; }
.side-name.right { right: 24px; text-align: right; }

.logo {
  position: fixed; left: 50%; top: 50%; width: 64px; height: 64px; z-index: 10; pointer-events: none;
  transform: translate(-50%, -50%); opacity: .001;
  animation: logoIn var(--spring-logo-ms) var(--spring-logo) .2s forwards;
}
@keyframes logoIn { from { opacity: .001; transform: translate(-50%, -50%) rotate(-56deg); } to { opacity: 1; transform: translate(-50%, -50%) rotate(0); } }

/* ---------- PROJEKTSEITE (Quitte) ---------- */
.p-hero { height: 80vh; padding-top: 140px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 32px; text-align: center; overflow: clip; }
.p-hero h1 { width: 300px; max-width: calc(100% - 40px); font-family: var(--light); font-weight: 300; font-size: 58px; line-height: 1.1; color: var(--blue-deep); white-space: pre-line; }
.p-hero .sub { font-family: var(--semi); font-weight: 600; font-size: 16px; line-height: 1.2; white-space: pre-line; }
.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.tags li { list-style: none; font-family: var(--semi); font-weight: 600; font-size: 16px; line-height: 1.2; padding: 4px 14px; border-radius: 1000px; position: relative; }
.tags li::after { content: ""; position: absolute; inset: 0; border: 1.5px solid var(--blue); border-radius: inherit; pointer-events: none; }

.parallax { position: relative; overflow: hidden; height: 80vh; }
.parallax .pimg { position: absolute; left: 0; right: 0; background-size: cover; background-position: center; will-change: transform; backface-visibility: hidden; }
.p-cover { width: 100%; }
.pop-in { opacity: .001; transform: scale(var(--from, .8)); }
.pop-in.on { animation: popSpring var(--spring-logo-ms) var(--spring-logo) forwards; }
@keyframes popSpring { from { opacity: .001; transform: scale(var(--from, .8)); } to { opacity: 1; transform: none; } }

.p-info { max-width: 1200px; margin: 0 auto; padding: 120px 140px; display: flex; gap: 32px; align-items: flex-start; }
.p-info > div { flex: 1 0 0; min-width: 0; }
.p-text { display: flex; flex-direction: column; gap: 22px; }
.p-facts { display: flex; flex-direction: column; gap: 22px; }
.p-info h2 { font-family: var(--semi); font-weight: 600; font-size: 20px; line-height: 1.2; }
.p-text p { font-family: var(--semi); font-weight: 600; font-size: 16px; line-height: 1.4; white-space: pre-wrap; }
.facts { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.facts li { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0 11px; border-bottom: 1px solid #1f22ff; font-family: var(--semi); font-weight: 600; font-size: 16px; line-height: 1.2; }
.facts li span:last-child { text-align: right; }

.gallery-row { display: flex; gap: 10px; padding: 0 10px 10px; }
.gallery-row:first-child { padding-top: 10px; }
.gallery-row .parallax { flex: 1 0 0; min-width: 0; }

.close {
  position: fixed; left: calc(50% - 30px); bottom: 24px; z-index: 60;
  width: 60px; height: 60px; border-radius: 100000px; background: var(--blue-close);
  display: grid; place-items: center;
  opacity: .001; transform: translateY(20px);
  animation: navIn var(--spring-nav-ms) var(--spring-nav) .2s forwards;
}
.close svg { display: block; }

/* ---------- ALEXIA ---------- */
body.about { --accent: var(--red); }
.a-section { position: relative; height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 32px; overflow: clip; }
.about-title { position: relative; z-index: 3; width: 600px; max-width: 100%; text-align: center; font-family: var(--light); font-weight: 400; font-size: 58px; line-height: 1.1; color: var(--red); }
.about-photo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1; }
.about-photo .frame { height: 80vh; max-height: 600px; aspect-ratio: .67; }
.about-photo .grow { width: 100%; height: 100%; transform-origin: center center; opacity: 0; transform: scale(0); }
.about-photo .grow.on { transition: transform 1.2s var(--ease-out-expo), opacity 1.2s var(--ease-out-expo); opacity: 1; transform: none; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.a-red { background: var(--red); }
.typed { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 500px; max-width: calc(100% - 48px); text-align: center; color: #fff; font-family: var(--light); font-weight: 300; font-size: 32px; line-height: 1.2; z-index: 10; }
.typed p { white-space: pre; min-height: 1.2em; }

/* ---------- GÄSTEBUCH (Werte aus der Original-Komponente) ---------- */
body.guest { height: 100vh; height: 100dvh; overflow: hidden; }
.gb { position: relative; height: 100vh; height: 100dvh; padding: 0 32px 70px; display: flex; flex-direction: column; }
.gb-scroll { flex: 1; overflow-y: scroll; display: flex; flex-direction: column; gap: 16px; padding: 20px 0; scrollbar-width: none; }
.gb-scroll::-webkit-scrollbar { display: none; }
.gb-item { display: flex; flex-direction: column; width: 100%; align-items: center; padding: 0 5px; opacity: 0; animation: popup .5s cubic-bezier(.175, .885, .32, 1.275) forwards; }
@keyframes popup { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.05); } 100% { transform: scale(1); opacity: 1; } }
.gb-bubble {
  font-family: var(--bold); font-weight: 500; line-height: 1.4; font-size: 22px; position: relative; z-index: 2; transition: all .2s ease;
  padding: 20px 30px; background: #fff; color: var(--blue); text-align: center; border-radius: 100px;
  width: fit-content; display: flex; flex-direction: column; align-items: center; gap: 10px; white-space: pre-wrap; word-break: break-word;
}
.gb-bubble .msg { width: 100%; }
.gb-meta { font-size: 11px; font-weight: 400; opacity: .7; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.gb-meta b { font-weight: 700; }
.gb-meta i { font-style: normal; margin: 0 8px; }
.gb-form { background: transparent; z-index: 2; padding: 20px 5px; }
.gb-row { display: flex; gap: 10px; }
.gb-row .name { width: 30%; }
.gb-row input { padding: 15px; border: 1.5px solid var(--blue); border-radius: 50px; font-size: 16px; font-family: sans-serif; outline: none; background: #fff; color: var(--blue); width: 100%; }
.gb-row .text { flex: 1; }
.gb-row input::placeholder { color: var(--blue); opacity: .5; }
.gb-row button { color: #fff; border: none; font-size: 16px; font-weight: 700; font-family: sans-serif; cursor: pointer; background: var(--blue); border-radius: 50px; padding: 0 40px; }
.gb-row button:disabled { cursor: wait; }
.gb-alert { position: fixed; inset: 0; background: #ff0000; z-index: 999; display: flex; justify-content: center; align-items: center; color: #fff; font-size: 30px; font-weight: 900; text-align: center; cursor: pointer; }
.gb-alert[hidden] { display: none; }

/* ---------- COMING SOON ---------- */
body.soon { background: var(--blue-deep); color: #fff; height: 100vh; display: grid; place-items: center; font-size: 13px; }

/* ---------- Tablet / Handy (Framer-Breakpoints 810 px) ---------- */
@media (max-width: 1199.98px) {
  .p-info { padding: 80px 40px; }
}
@media (max-width: 809.98px) {
  .p-info { flex-direction: column; padding: 64px 20px; gap: 56px; }
  .p-info > div { width: 100%; }
  .gallery-row { flex-direction: column; }
  .about-photo .frame { max-height: 500px; }
  .gb { padding: 0 32px 50px; }
  /* Wie im Original: Namensfeld erst sichtbar, wenn man ins Formular tippt (Platz bleibt reserviert) */
  .gb-row .name { opacity: 0; transition: none; }
  .gb-form.active .name { opacity: 1; }
  .gb-item { padding: 0 16px; }
  .gb-bubble { font-size: 18px; max-width: 85% !important; }
  .gb-form { padding: 20px 16px; }
  .gb-row { flex-direction: column; }
  .gb-row .name { width: 100%; }
  .gb-row button { padding: 20px; }
  .side-name { font-size: 16px; }
  /* Klammern am Rand wie im Original: Projekt- und Alexia-Seite 6 px, Gästebuch und Work 10 px */
  .edge.l { left: 6px; } .edge.r { right: 6px; }
  .guest .edge.l, .side-name.left { left: 10px; } .guest .edge.r, .side-name.right { right: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .nav a, .logo, .close, .chars span, .gb-item, .pop-in { animation: none !important; opacity: 1 !important; transform: none; }
  .logo { transform: translate(-50%, -50%); }
  .close { transform: none; }
  .about-photo .grow { opacity: 1; transform: none; }
}
