/* =========================================================================
   TUĞBA & ONUR — Premium Dijital Düğün Davetiyesi
   style.css
   Luxury / Editorial / Elegant / Minimal / Modern / Sophisticated
   ========================================================================= */

/* -------------------------------------------------------------------------
   01. CSS VARIABLES
   ------------------------------------------------------------------------- */
:root {
    --bg: #F5F1EB;
    --bg-secondary: #E9E2D8;
    --dark: #24211E;
    --text: #2B2825;
    --muted: #766F67;
    --accent: #A99782;
    --white: #FFFFFF;

    --font-serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --container-max: 720px;
    --container-narrow: 560px;

    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 7rem;

    --ease-elegant: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);

    --radius-sm: 2px;
    --radius-md: 4px;

    color-scheme: light;
}

/* -------------------------------------------------------------------------
   02. RESET
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body, h1, h2, h3, h4, p, figure, blockquote, fieldset {
    margin: 0;
    padding: 0;
}

ul, ol { list-style: none; margin: 0; padding: 0; }

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

button, input, textarea, select {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
}

button { cursor: pointer; }

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

fieldset { border: none; }

/* -------------------------------------------------------------------------
   03. BASE
   ------------------------------------------------------------------------- */
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    padding-bottom: env(safe-area-inset-bottom);
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--dark);
    color: var(--white);
    padding: 0.75rem 1.25rem;
    z-index: 1000;
    border-radius: var(--radius-sm);
}
.skip-link:focus {
    left: var(--space-sm);
    top: var(--space-sm);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

::selection {
    background: var(--accent);
    color: var(--white);
}

/* -------------------------------------------------------------------------
   04. TYPOGRAPHY HELPERS
   ------------------------------------------------------------------------- */
.eyebrow {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    letter-spacing: 0.28em;
    color: var(--accent);
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: var(--space-sm);
    text-align: center;
}

.section-heading {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(2rem, 6vw, 3rem);
    letter-spacing: 0.01em;
    text-align: center;
    color: var(--dark);
    margin-bottom: var(--space-md);
    line-height: 1.15;
}

.section-text {
    text-align: center;
    color: var(--muted);
    font-size: 1rem;
    max-width: 40ch;
    margin: 0 auto var(--space-md);
    line-height: 1.75;
}

/* -------------------------------------------------------------------------
   05. LAYOUT
   ------------------------------------------------------------------------- */
.section-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--space-xl) var(--space-md);
}

.section-inner--narrow {
    max-width: var(--container-narrow);
}

section {
    content-visibility: auto;
    contain-intrinsic-size: 1px 800px;
}

/* -------------------------------------------------------------------------
   06. SCROLL REVEAL
   ------------------------------------------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 1s var(--ease-elegant), transform 1s var(--ease-elegant);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }

/* -------------------------------------------------------------------------
   07. FLOATING CONTROLS
   ------------------------------------------------------------------------- */
.floating-controls {
    position: fixed;
    top: max(1.25rem, env(safe-area-inset-top));
    right: 1.25rem;
    z-index: 500;
    display: flex;
    gap: 0.6rem;
}

.floating-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(245, 241, 235, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(169, 151, 130, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    transition: transform 0.35s var(--ease-soft), background 0.35s var(--ease-soft);
    box-shadow: 0 4px 18px rgba(36, 33, 30, 0.08);
}
.floating-btn:hover { transform: scale(1.06); }
.floating-btn:active { transform: scale(0.96); }

.music-icon {
    font-size: 1.1rem;
    line-height: 1;
    transition: opacity 0.3s;
}
.music-btn[aria-pressed="true"] .music-icon {
    animation: musicPulse 1.6s ease-in-out infinite;
}
@keyframes musicPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

/* -------------------------------------------------------------------------
   08. HERO
   ------------------------------------------------------------------------- */
.hero {
    position: relative;
    min-height: 100svh;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* İçeriği dikey merkezden biraz yukarı taşımak için alt boşluk ekliyoruz. */
    padding-bottom: clamp(3rem, 9vh, 6.5rem);
    overflow: hidden;
    background: var(--dark);
}

.hero__media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero__bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Dar/uzun mobil ekranlarda görsel zaten tam boyda gösterildiği için bu
       değerin dikey kırpmaya etkisi yok. Geniş/kısa (masaüstü) ekranlarda ise
       hem çiftin bütün siluetini hem de kedi/kanatlı dostu kadrede tutacak
       şekilde alta yakın ama tepesi kesilmeyecek bir denge noktası seçildi. */
    object-position: center 62%;
    transform: scale(1.1);
    animation: heroZoom 10s var(--ease-soft) forwards;
}

@keyframes heroZoom {
    from { transform: scale(1.1); }
    to { transform: scale(1.02); }
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(24, 22, 19, 0.5) 0%, rgba(24, 22, 19, 0.32) 42%, rgba(24, 22, 19, 0.72) 100%);
    opacity: 0;
    animation: heroFadeIn 1.6s var(--ease-soft) 0.15s forwards;
}

.hero__grain {
    position: absolute;
    inset: 0;
    opacity: 0.05;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    pointer-events: none;
}

@keyframes heroFadeIn {
    to { opacity: 1; }
}

.hero__content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
    padding: 0 var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero__eyebrow {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    letter-spacing: 0.5em;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: var(--space-md);
}

.hero__eyebrow span {
    display: block;
    opacity: 0;
}
.hero__eyebrow-line {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    letter-spacing: 0.35em;
    font-style: italic;
    color: var(--white);
}

.hero__names {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 0.95;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1em;
    margin-bottom: var(--space-md);
}

.hero__name {
    font-size: clamp(3.4rem, 16vw, 7.5rem);
    letter-spacing: 0.02em;
    opacity: 0;
}

.hero__amp {
    font-size: clamp(1.6rem, 6vw, 2.6rem);
    font-style: italic;
    color: var(--accent);
    opacity: 0;
    margin: 0.05em 0;
}

.hero__date {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 0.7rem;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    font-weight: 500;
    opacity: 0;
}

.hero__date-text,
.hero__day-text {
    white-space: nowrap;
}

.hero__date-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    display: inline-block;
}

.hero__invite {
    margin-top: var(--space-md);
    font-size: 0.72rem;
    letter-spacing: 0.32em;
    color: rgba(255, 255, 255, 0.7);
    opacity: 0;
}

/* Reveal timeline — orchestrated via data-reveal + JS 'is-in' class */
[data-reveal] { transition: opacity 1.1s var(--ease-elegant), transform 1.1s var(--ease-elegant); }
[data-reveal="1"] span,
[data-reveal="2"] { transform: translateY(0); }
.hero__eyebrow span { transform: translateY(10px); transition: opacity 1s var(--ease-elegant), transform 1s var(--ease-elegant); }
.hero__name, .hero__amp, .hero__date, .hero__invite { transform: translateY(18px); }

.js-hero-ready .hero__eyebrow span:nth-child(1) { transition-delay: 0.5s; }
.js-hero-ready .hero__eyebrow span:nth-child(2) { transition-delay: 0.85s; }
.js-hero-ready .hero__name:nth-of-type(1) { transition-delay: 1.25s; }
.js-hero-ready .hero__amp { transition-delay: 1.65s; margin-top: 20px; }
.js-hero-ready .hero__name:nth-of-type(2) { transition-delay: 1.85s; }
.js-hero-ready .hero__date { transition-delay: 2.25s; }
.js-hero-ready .hero__invite { transition-delay: 2.6s; }

.js-hero-ready .hero__eyebrow span,
.js-hero-ready .hero__name,
.js-hero-ready .hero__amp,
.js-hero-ready .hero__date,
.js-hero-ready .hero__invite {
    opacity: 1;
    transform: translateY(0);
}

.hero__scroll {
    position: absolute;
    bottom: max(2rem, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    color: rgba(255, 255, 255, 0.75);
    opacity: 0;
    animation: heroFadeIn 1.2s var(--ease-soft) 3s forwards;
}

.hero__scroll-label {
    font-size: 0.62rem;
    letter-spacing: 0.28em;
}

.hero__scroll-arrow {
    width: 1px;
    height: 28px;
    background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0));
    position: relative;
    overflow: hidden;
}
.hero__scroll-arrow::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent, var(--white));
    animation: scrollLine 2.2s ease-in-out infinite;
}
@keyframes scrollLine {
    0% { top: -100%; }
    60% { top: 100%; }
    100% { top: 100%; }
}

/* -------------------------------------------------------------------------
   09. COUNTDOWN
   ------------------------------------------------------------------------- */
.countdown-section {
    background: var(--bg-secondary);
}

.countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
    max-width: 560px;
    margin: 0 auto;
}

.countdown__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.4rem 0.4rem;
    background: var(--white);
    border-radius: var(--radius-md);
}

.countdown__number {
    font-family: var(--font-serif);
    font-size: clamp(1.9rem, 7vw, 3.2rem);
    font-weight: 500;
    color: var(--dark);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.countdown__label {
    margin-top: 0.5rem;
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    color: var(--muted);
    font-weight: 500;
}

/* -------------------------------------------------------------------------
   10. DAVETİMİZ (INVITE)
   ------------------------------------------------------------------------- */
.invite-section {
    background: var(--bg);
}

.invite-text {
    text-align: center;
    color: var(--text);
    font-size: 1.05rem;
    line-height: 1.95;
    max-width: 46ch;
    margin: 0 auto;
}

.invite-signature {
    margin-top: var(--space-lg);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.invite-signature__line {
    font-style: italic;
    color: var(--muted);
    font-family: var(--font-serif);
    font-size: 1.15rem;
}

.invite-signature__names {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    color: var(--dark);
    letter-spacing: 0.02em;
}

/* -------------------------------------------------------------------------
   11. DETAILS (TÖREN & DAVET)
   ------------------------------------------------------------------------- */
.details-section {
    background: var(--dark);
    color: var(--white);
}

.details-section .eyebrow { color: var(--accent); }

.details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: var(--space-lg);
}

.details-card {
    background: var(--dark);
    padding: var(--space-lg) var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
}

.details-card__icon {
    color: var(--accent);
    margin-bottom: 0.6rem;
}

.details-card__label {
    font-size: 0.65rem;
    letter-spacing: 0.26em;
    color: var(--accent);
    font-weight: 500;
}

.details-card__value {
    font-family: var(--font-serif);
    font-size: 1.7rem;
    color: var(--white);
}

.details-card__sub {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.55);
    max-width: 26ch;
}

/* -------------------------------------------------------------------------
   12. LOCATION / MAP
   ------------------------------------------------------------------------- */
.location-section {
    background: var(--bg);
}

.location-address {
    text-align: center;
    color: var(--muted);
    margin-bottom: var(--space-lg);
}

.map-frame {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-secondary);
    filter: grayscale(0.35) contrast(1.02);
    border: 1px solid rgba(169, 151, 130, 0.25);
}

.map-frame__iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.location-actions {
    margin-top: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .location-actions {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* -------------------------------------------------------------------------
   13. BUTTONS
   ------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.95rem 1.75rem;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    font-weight: 600;
    text-align: center;
    border-radius: var(--radius-sm);
    transition: transform 0.3s var(--ease-soft), background 0.3s var(--ease-soft), color 0.3s var(--ease-soft), border-color 0.3s var(--ease-soft);
    min-height: 48px;
    position: relative;
}

.btn:active { transform: scale(0.98); }

.btn--dark {
    background: var(--dark);
    color: var(--white);
}
.btn--dark:hover { background: #38332d; }

.btn--outline {
    background: transparent;
    color: var(--dark);
    border: 1px solid var(--dark);
}
.btn--outline:hover { background: var(--dark); color: var(--white); }

.btn--outline-light {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.6);
}
.btn--outline-light:hover { background: var(--white); color: var(--dark); }

.btn--block { width: 100%; }

.btn__spinner {
    display: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: var(--white);
    animation: spin 0.7s linear infinite;
}
.btn.is-loading .btn__spinner { display: inline-block; }
.btn.is-loading .btn__label { opacity: 0.7; }
.btn.is-loading { pointer-events: none; }

@keyframes spin { to { transform: rotate(360deg); } }

/* -------------------------------------------------------------------------
   14. FORMS
   ------------------------------------------------------------------------- */
.rsvp-section { background: var(--bg); }

.form {
    margin-top: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form__field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form__field label,
.form__radio-group legend {
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
}

.form__optional {
    text-transform: none;
    letter-spacing: 0;
    color: var(--accent);
}

.form__field input[type="text"],
.form__field input[type="tel"],
.form__field textarea,
.form__field input[type="file"] {
    background: var(--white);
    border: 1px solid rgba(169, 151, 130, 0.35);
    border-radius: var(--radius-sm);
    padding: 0.9rem 1rem;
    font-size: 1rem;
    color: var(--text);
    transition: border-color 0.25s var(--ease-soft);
    min-height: 48px;
}

.form__field textarea { min-height: 110px; resize: vertical; }

.form__field input:focus,
.form__field textarea:focus {
    border-color: var(--accent);
}

.form__field input::placeholder,
.form__field textarea::placeholder {
    color: var(--muted);
    opacity: 0.7;
}

.form__hint {
    font-size: 0.75rem;
    color: var(--muted);
}

.form__error {
    font-size: 0.78rem;
    color: #a3453a;
    min-height: 1em;
}

.form__radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(169, 151, 130, 0.35);
    border-radius: var(--radius-sm);
    background: var(--white);
    cursor: pointer;
    min-height: 48px;
}

.radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.radio__dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.radio__dot::after {
    content: '';
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    transform: scale(0);
    transition: transform 0.2s var(--ease-soft);
}
.radio input:checked + .radio__dot::after { transform: scale(1); }
.radio input:focus-visible + .radio__dot { outline: 2px solid var(--accent); outline-offset: 2px; }

.form__honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form__message {
    text-align: center;
    font-size: 0.9rem;
    min-height: 1.2em;
    padding-top: 0.25rem;
}
.form__message.is-success { color: #4a6a4d; }
.form__message.is-error { color: #a3453a; }

/* -------------------------------------------------------------------------
   15. RESPONSIVE — TABLET / DESKTOP
   ------------------------------------------------------------------------- */
@media (min-width: 768px) {
    :root {
        --space-xl: 9rem;
    }
    .details-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .countdown { gap: 1rem; }
}

@media (min-width: 1024px) {
    .hero__eyebrow { font-size: 0.85rem; }
}

/* -------------------------------------------------------------------------
   16. REDUCED MOTION
   ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal, [data-reveal], .hero__eyebrow span, .hero__name, .hero__amp, .hero__date, .hero__invite, .hero__bg {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
}

/* -------------------------------------------------------------------------
   17. PRINT (basic safety)
   ------------------------------------------------------------------------- */
@media print {
    .floating-controls, .hero__scroll { display: none !important; }
}
