/* 404 + yetkisiz sayfa: pano uzerinde bantli kagit sahnesi (components/not_found_scene.py, nf-*). */

.nf404 {
  --navy: #0B2E4F; --board: #C3DDF6; --paper: #FFFDF6; --wine: #B0123B; --pink: #BE185D;
  --soft: #4A5547; --deep: #003D33; --green: #00BF8F; --t1: #FFE3B0; --lemon: #F5F062;
  --fs: 21px;
  font-family: "Public Sans", "Helvetica Neue", sans-serif;
  color: #11140F;
}
.nf404 *, .nf404 *::before, .nf404 *::after { box-sizing: border-box; }

/* pano */
.nf-board {
  position: relative; overflow: hidden; min-height: calc(100vh - 32px);
  display: flex; flex-direction: column; gap: 18px; padding: 28px 22px;
  border-radius: 28px; background-color: var(--board);
  background-image: radial-gradient(rgba(11, 46, 79, .10) 1.2px, transparent 1.4px); background-size: 14px 14px;
}
.nf404 .nf-brand { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 18px; letter-spacing: -.01em; color: var(--navy); }

/* kagit */
.nf404 .nf-paper {
  position: relative; width: 100%; max-width: 440px; margin: 6px auto auto; padding: 24px 22px 0;
  display: flex; flex-direction: column; gap: 12px;
  background: var(--paper); border-radius: 6px; box-shadow: 0 26px 40px -24px rgba(17, 20, 15, .45); transform: rotate(-1.2deg);
}
.nf404 .nf-tape { position: absolute; height: 26px; background: rgba(245, 158, 11, .55); }
.nf404 .nf-tape--l { left: 30px; top: -12px; width: 86px; transform: rotate(-8deg); }
.nf404 .nf-tape--r { right: 26px; top: -10px; width: 76px; transform: rotate(7deg); }
.nf404 .nf-stamp {
  position: absolute; left: -6px; top: -14px; z-index: 2; padding: 4px 10px; line-height: 1; font-size: 15px;
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; letter-spacing: .08em;
  color: var(--wine); background: var(--paper); border: 3px solid var(--wine); border-radius: 8px; transform: rotate(-8deg); opacity: .88;
}
.nf404 .nf-left, .nf404 .nf-right { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.nf404 .nf-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--wine); }
.nf404 .nf-title { margin: 0; font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 31px; line-height: 1.02; letter-spacing: -.03em; color: var(--navy); }
.nf404 .nf-body { margin: 0; font-size: 14.5px; line-height: 1.5; }
.nf404 .nf-hand { margin: 0; font-family: Caveat, cursive; font-weight: 700; font-size: 22px; line-height: 1.1; color: var(--pink); }

/* raptiyeli limon kagit */
.nf404 .nf-sheet {
  position: relative; align-self: center; width: 176px; height: 214px; margin: 10px 0 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 3px;
  background: var(--lemon) repeating-linear-gradient(var(--lemon) 0 27px, #D9D347 27px 28px);
  box-shadow: 0 18px 26px -16px rgba(11, 46, 79, .55); transform-origin: 50% 6px; animation: nf-swing 4.6s ease-in-out infinite;
}
.nf404 .nf-sheet::after {
  content: ""; position: absolute; right: 0; bottom: 0; width: 30px; height: 30px; border-top-left-radius: 4px;
  background: linear-gradient(315deg, var(--board) 50%, #CFC93A 50%); box-shadow: -3px -3px 6px -3px rgba(11, 46, 79, .25);
}
.nf404 .nf-pin { position: absolute; left: 50%; top: -9px; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: var(--wine); box-shadow: inset -3px -3px 0 rgba(0, 0, 0, .22), 0 4px 4px -2px rgba(11, 46, 79, .5); }
.nf404 .nf-pin::after { content: ""; position: absolute; left: 5px; top: 4px; width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, .6); }
.nf404 .nf-n { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 68px; line-height: .9; letter-spacing: -.04em; color: var(--navy); }
.nf404 .nf-q { position: absolute; right: 14px; top: 6px; font-family: Caveat, cursive; font-weight: 700; font-size: 64px; color: var(--wine); transform: rotate(14deg); }
.nf404 .nf-sheet img { width: 74px; height: 86px; }
.nf404 .nf-stick {
  position: absolute; right: -6px; top: 6px; padding: 6px 12px; line-height: 1; font-size: 20px;
  font-family: Caveat, cursive; font-weight: 700; color: #fff; background: var(--pink); border-radius: 12px; transform: rotate(8deg);
  box-shadow: 0 8px 16px -8px rgba(17, 20, 15, .5);
}
.nf404 .nf-stick--navy { background: var(--navy); }
@keyframes nf-swing { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(2deg); } }

/* adres: kirmizi kalemle cizili + oneri */
.nf404 .nf-addr { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 0; }
.nf404 .nf-path {
  display: inline-block; max-width: 100%; padding: 2px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: "IBM Plex Mono", monospace; font-weight: 600; font-size: 14px; color: #5A6B7C; background: var(--t1); border-radius: 5px;
  text-decoration: line-through wavy var(--wine) 2px; text-decoration-skip-ink: none;
}
.nf404 .nf-sug {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 12px; max-width: 100%;
  color: var(--navy); text-decoration: none; background: #fff; border: 2px dashed var(--pink); border-radius: 12px;
  transition: transform .25s cubic-bezier(.25, 1, .5, 1);
}
.nf404 .nf-sug:hover { transform: rotate(-1.5deg) translateY(-2px); }
.nf404 .nf-sug:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.nf404 .nf-sug-hand { font-family: Caveat, cursive; font-weight: 700; font-size: 21px; line-height: 1; color: var(--pink); white-space: nowrap; }
.nf404 .nf-sug-path { font-family: "IBM Plex Mono", monospace; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* koparilabilir seritler: yazi etiket uzunluguna gore kendiliginden kuculur (--len, kapsayici genisligi) */
.nf404 .nf-tear { container-type: inline-size; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 8px -22px 0; border-top: 2px dashed #A9B4A6; }
.nf404 .nf-strip {
  position: relative; display: flex; align-items: center; justify-content: center; height: 72px; padding: 0 8px; border: 0; border-radius: 0; cursor: pointer;
  font-family: "Public Sans", sans-serif; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; text-decoration: none;
  font-size: 19px; font-size: min(var(--fs), calc(60cqw / var(--len)));
  transition: transform .35s cubic-bezier(.25, 1, .5, 1), box-shadow .35s, background-color .2s;
}
.nf404 .nf-strip:focus-visible { outline: 3px solid var(--navy); outline-offset: -3px; }
.nf404 .nf-strip--go {
  --c: #00BF8F; background: var(--c); color: var(--deep); border-right: 2px dashed #A9B4A6; border-bottom-left-radius: 6px;
  transform-origin: 100% 50%; animation: nf-tug 5s ease-in-out infinite;
}
.nf404 .nf-strip--go:hover { animation: none; background: #1ED0A0; transform: translateY(-5px) rotate(-3deg); box-shadow: 0 14px 16px -12px rgba(17, 20, 15, .5); }
.nf404 .nf-strip--back {
  --c: #FBD9E6; background: var(--c); color: #7A0E2E; transform-origin: 0 0; transform: rotate(3deg) translateY(6px);
  box-shadow: 0 10px 14px -10px rgba(17, 20, 15, .45); animation: nf-hang 3.4s ease-in-out infinite;
}
.nf404 .nf-strip--back::before {
  content: ""; position: absolute; left: -6px; top: 0; bottom: 0; width: 6px;
  background: linear-gradient(135deg, var(--c) 25%, transparent 25%) 0 0 / 12px 12px, linear-gradient(225deg, var(--c) 25%, transparent 25%) 0 0 / 12px 12px;
}
.nf404 .nf-strip--back:hover { animation: nf-flap .5s ease-in-out infinite alternate; }
.nf404 .nf-strip--go.torn { animation: nf-tearoff .42s ease-in forwards; }
.nf404 .nf-strip--back.torn { animation: nf-fall .42s cubic-bezier(.5, 0, 1, .6) forwards; }
@keyframes nf-tug { 0%, 84%, 100% { transform: none; } 88% { transform: translateX(-3px) rotate(-1.4deg); } 92% { transform: translateX(2px) rotate(.9deg); } 96% { transform: translateX(-1px); } }
@keyframes nf-hang { 0%, 100% { transform: rotate(2deg) translateY(6px); } 50% { transform: rotate(6deg) translateY(8px); } }
@keyframes nf-flap { from { transform: rotate(6deg) translateY(8px); } to { transform: rotate(13deg) translateY(11px); } }
@keyframes nf-tearoff { 0% { transform: none; opacity: 1; } 30% { transform: translateY(-6px) rotate(-5deg); } 100% { transform: translate(-34px, -110px) rotate(-22deg); opacity: 0; } }
@keyframes nf-fall { 0% { transform: rotate(3deg) translateY(6px); opacity: 1; } 100% { transform: translateY(180px) rotate(42deg); opacity: 0; } }

/* masaustu: sol kagit cizimi, sag metin */
@media (min-width: 760px) {
  .nf404 { --fs: 26px; }
  .nf-board { padding: 36px 56px; }
  .nf404 .nf-paper { max-width: 920px; margin: auto; display: grid; grid-template-columns: 330px 1fr; gap: 0; padding: 48px 48px 0; transform: rotate(-1deg); }
  .nf404 .nf-tape--l { left: 60px; width: 110px; }
  .nf404 .nf-tape--r { right: 70px; width: 96px; }
  .nf404 .nf-stamp { left: -30px; top: -20px; font-size: 17px; }
  .nf404 .nf-left { align-items: center; justify-content: center; padding-bottom: 44px; }
  .nf404 .nf-right { gap: 14px; justify-content: center; padding: 0 0 34px 20px; }
  .nf404 .nf-sheet { width: 216px; height: 262px; margin: 0; }
  .nf404 .nf-n { font-size: 84px; }
  .nf404 .nf-q { font-size: 80px; right: 18px; top: 8px; }
  .nf404 .nf-sheet img { width: 90px; height: 104px; }
  .nf404 .nf-stick { right: -22px; top: 14px; font-size: 23px; }
  .nf404 .nf-title { font-size: 48px; }
  .nf404 .nf-body { font-size: 16.5px; }
  .nf404 .nf-hand { font-size: 26px; }
  .nf404 .nf-tear { grid-column: 1 / -1; margin: 0 -48px; }
  .nf404 .nf-strip { height: 88px; }
}

@media (prefers-reduced-motion: reduce) {
  .nf404 .nf-sheet, .nf404 .nf-strip { animation: none !important; transition: none; }
  .nf404 .nf-strip--go:hover { transform: none; }
}
