/* assets/css/landing.css - Karşılama sayfası (landing.php)
   Tuval mantığı: her şey .board içinde yüzde ile konumlanır; yazı boyutu tuval enine (cqw) bağlıdır. */

:root {
    --line: #929000;      /* dolaşan çizgi */
    --ink: #000;          /* Türkçe satır */
    --leaf: #4f8f00;      /* ikinci dil satırı */
    --violet: #9437ff;    /* iletişim */
    --paper: #fff;
}

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

html { background: var(--paper); }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: 'Bodoni Moda', 'Bodoni 72', Didot, 'Times New Roman', serif;
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.stage {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Tuval ---------- */
.board {
    position: relative;
    flex: none;
    container-type: inline-size;
    --mx: 0;
    --my: 0;
}

.board--wide {
    width: min(100vw, 100vh * 1440 / 810);
    width: min(100vw, 100svh * 1440 / 810);
    aspect-ratio: 1440 / 810;
    --u: 0.06944cqw;                     /* 1 tuval birimi = en / 1440 */
    --fs: max(13px, calc(var(--u) * 14.5));
    --shift: 1;
}

.board--tall {
    display: none;
    width: min(100vw, 520px);
    aspect-ratio: 390 / 1730;
    --u: 0.25641cqw;                     /* en / 390 */
    --fs: calc(var(--u) * 14.5);
    --shift: 0;
}

@media (max-aspect-ratio: 1/1), (max-width: 900px) {
    .board--wide { display: none; }
    .board--tall { display: block; }
    .stage { align-items: flex-start; }
}

/* ---------- Görseller ---------- */
.cut, .shade {
    position: absolute;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
}

.cut {
    z-index: 1;
    translate: calc(var(--mx) * var(--depth) * var(--shift) * 1px) calc(var(--my) * var(--depth) * var(--shift) * 1px);
    transition: translate 0.9s cubic-bezier(0.16, 1, 0.3, 1), scale 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    animation: cut-in 1s cubic-bezier(0.16, 1, 0.3, 1) both, drift 11s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.09s), calc(var(--i) * -1.7s);
}

.cut--star, .cut--fish { mix-blend-mode: multiply; }
.cut--photo { animation-name: cut-in, none; }
.cut--shell, .cut--lily { z-index: 4; }
.cut[data-k] { cursor: pointer; }
.cut.is-hot { scale: 1.035; }

.shade {
    z-index: 2;
    pointer-events: none;
    animation: fade-in 1.6s ease both;
    animation-delay: 2.6s;
}

@keyframes cut-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes drift {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-0.55%) rotate(0.6deg); }
}

/* ---------- Çizgiler ---------- */
.lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    overflow: visible;
    pointer-events: none;
    fill: var(--line);
}

.ln-mask, .pen, .pen-shadow {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1000 1000;
    animation: draw var(--t) cubic-bezier(0.45, 0.05, 0.3, 1) both;
    animation-delay: var(--d);
}

.ln-mask { stroke: #fff; stroke-width: 9; }
.pen { stroke: var(--line); stroke-width: 2.3; }
.pen-shadow {
    stroke: #000;
    stroke-width: 3;
    opacity: 0.13;
    transform: translate(13px, 15px);
    filter: blur(4px);
}

.ln-arrows, .pen-arrow {
    animation: fade-in 0.35s ease both;
    animation-delay: calc(var(--d) + var(--t) - 0.1s);
}

.pen-arrow {
    fill: none;
    stroke: var(--line);
    stroke-width: 2.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@keyframes draw {
    from { stroke-dashoffset: var(--from); }
    to { stroke-dashoffset: 0; }
}

/* ---------- Yazılar ---------- */
.ttl {
    position: absolute;
    z-index: 5;
    margin: 0;
    translate: -50% -50%;
    font-size: var(--fs);
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    white-space: nowrap;
    animation: fade-in 0.9s ease both;
    animation-delay: 0.5s;
}

.board--tall .ttl { font-size: calc(var(--u) * 13.5); line-height: 1.3; }

.lbl {
    position: absolute;
    z-index: 5;
    display: block;
    margin-top: calc(var(--u) * 2.5);
    font-size: var(--fs);
    line-height: 1.17;
    white-space: nowrap;
    color: var(--ink);
    text-decoration: none;
    animation: lbl-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: var(--d);
}

.lbl .l1, .lbl .l2 { display: block; }
.lbl .l2 {
    padding-left: 2.48em;
    color: var(--leaf);
}

.lbl--contact .l1, .lbl--contact .l2 { color: var(--violet); }

a.lbl .l1, a.lbl .l2 {
    text-decoration: underline wavy transparent 1px;
    text-underline-offset: 0.24em;
    transition: text-decoration-color 0.3s ease;
}

a.lbl:hover .l1, a.lbl:focus-visible .l1 { text-decoration-color: var(--line); }
a.lbl:focus-visible { outline: 1.5px solid var(--line); outline-offset: 0.35em; border-radius: 0.2em; }

/* Dokunma alanını büyüt (yerleşimi bozmadan) */
a.lbl::after {
    content: '';
    position: absolute;
    inset: -0.55em -0.8em;
}

@keyframes lbl-in {
    from { opacity: 0; transform: translateY(0.5em); }
    to { opacity: 1; transform: none; }
}

/* ---------- Dil seçimi ---------- */
.langs {
    position: absolute;
    z-index: 5;
    right: 2.2%;
    top: 2.4%;
    display: flex;
    gap: 1.1em;
    font-size: max(14px, var(--fs));
    animation: fade-in 1s ease both;
    animation-delay: 0.6s;
}

.board--tall .langs {
    right: 4%;
    top: 0.25%;
    font-size: calc(var(--u) * 15);
}

.langs a {
    color: #6f6f6a;
    text-decoration: none;
    padding: 0.5em 0.2em;
}

.langs a:hover, .langs a:focus-visible { color: var(--ink); }
.langs a[aria-current] { color: var(--ink); text-decoration: underline wavy var(--line) 1px; text-underline-offset: 0.3em; }

/* ---------- Dikey tuval: kaydırdıkça belirir (yalnızca JS varken bekletilir) ---------- */
.js .board--tall [data-io]:not(.is-in),
.js .board--tall [data-io]:not(.is-in) * {
    animation-play-state: paused !important;
}

.board--tall .shade { animation-delay: 1.2s; }

/* ---------- Hareket azaltma ---------- */
@media (prefers-reduced-motion: reduce) {
    .cut, .shade, .ttl, .lbl, .langs, .ln-arrows, .pen-arrow, .ln-mask, .pen, .pen-shadow {
        animation: none !important;
    }
    .cut { translate: none; transition: none; }
}
