:root {
    --red: #a91814;
    --red-dark: #83110e;
    --green: #123f25;
    --ink: #111;
    --cream: #f6f1e9;
    --paper: #fff;
    --line: #ded7ce;
    --muted: #746e67;
    --success: #23663a;
    --danger: #8c1b16;
    --shadow: 0 14px 40px rgba(17, 17, 17, .08);
    --motion-fast: 160ms;
    --motion-base: 280ms;
    --motion-slow: 680ms;
    --ease-out: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; background: var(--cream); color: var(--ink); overflow-x: hidden; }
body.modal-open { overflow: hidden; }
body.nav-open { overflow: hidden; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid rgba(169, 24, 20, .32); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.site-nav { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; min-height: 73px; padding: 11px 4vw; backdrop-filter: blur(10px); }
.brand img { display: block; width: 170px; max-height: 48px; object-fit: contain; }
.nav-links { display: flex; gap: 18px; align-items: center; }
.nav-links a { color: #111; text-decoration: none; font-weight: 700; font-size: 14px; transition: color var(--motion-fast) ease, background var(--motion-fast) ease, transform var(--motion-fast) ease; }
.nav-links a:hover { color: var(--red); }
.nav-login { background: #111; color: #fff !important; padding: 10px 15px; border-radius: 999px; }
.nav-register { border: 1px solid var(--line); padding: 9px 14px; border-radius: 999px; }
.nav-toggle { display: none; border: 0; background: #111; color: #fff; border-radius: 10px; width: 42px; height: 42px; cursor: pointer; font-weight: 900; transition: transform var(--motion-base) var(--ease-out), background var(--motion-fast) ease; }

.hero { min-height: 78vh; display: grid; grid-template-columns: 1fr 1fr; align-items: center; background: #fff; }
.hero-copy { min-width: 0; padding: 7vw; }
.eyebrow { color: var(--red); font-weight: 800; letter-spacing: 1.7px; font-size: 12px; }
h1, h2, h3, p { overflow-wrap: anywhere; }
.hero h1 { font-family: Georgia, serif; font-size: clamp(45px, 6vw, 90px); line-height: .98; margin: 16px 0; }
.hero p { font-size: 18px; line-height: 1.7; color: var(--muted); max-width: 620px; }
.hero-img { height: 78vh; background: url('../img/hero.jpg') center / cover no-repeat; }
.cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: var(--red); color: #fff; text-decoration: none; padding: 14px 19px; border-radius: 999px; font-weight: 800; margin-top: 14px; cursor: pointer; transition: transform var(--motion-fast) ease, background var(--motion-fast) ease, box-shadow var(--motion-fast) ease; }
.cta:hover { background: var(--red-dark); }
.cta.dark { background: #111; }
.cta.light { background: #fff; color: #111; }

.content-section { padding: 70px 5vw; }
.section-head { max-width: 850px; margin-bottom: 28px; }
.section-head h2 { font-family: Georgia, serif; font-size: clamp(38px, 5vw, 54px); margin: 8px 0; }
.section-head p { color: var(--muted); line-height: 1.6; }
.story { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; background: #fff; }
.story > img { width: 100%; border-radius: 20px; }
.story h2 { font-family: Georgia, serif; font-size: clamp(34px, 4vw, 48px); margin: 10px 0; }
.story p { color: var(--muted); line-height: 1.65; }
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 22px; }
.value { background: var(--cream); padding: 18px; border-radius: 14px; line-height: 1.45; }
.value b { display: block; margin-bottom: 7px; color: var(--green); }

.filters { display: flex; gap: 9px; align-items: center; margin-bottom: 24px; position: sticky; top: 72px; background: var(--cream); padding: 12px 0; z-index: 20; }
.filter-chips { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; min-width: 0; }
.filters button { min-height: 42px; border: 1px solid var(--line); background: #fff; padding: 10px 14px; border-radius: 999px; cursor: pointer; font-weight: 700; white-space: nowrap; transition: color var(--motion-fast) ease, background var(--motion-fast) ease, border-color var(--motion-fast) ease, transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease; }
.filters button.active { background: var(--red); color: #fff; border-color: var(--red); }
.search { padding: 11px 14px; border: 1px solid var(--line); border-radius: 999px; min-width: 260px; margin-left: auto; background: #fff; }
.result-count { color: var(--muted); font-size: 13px; margin: -12px 0 20px; }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.product { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 8px 20px rgba(0, 0, 0, .035); transition: transform var(--motion-base) var(--ease-out), box-shadow var(--motion-base) ease, border-color var(--motion-base) ease, opacity var(--motion-base) ease; }
.product[hidden] { display: none; }
.product img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #f7f7f7; transition: transform 600ms var(--ease-out); }
.product-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.series { font-size: 10px; color: var(--red); font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.product h3 { font-family: Georgia, serif; font-size: 21px; margin: 7px 0; }
.ingredients { font-size: 13px; color: var(--muted); line-height: 1.45; min-height: 55px; }
.meta { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: #555; border-top: 1px solid #eee; padding-top: 10px; }
.price { font-size: 24px; font-weight: 900; margin: 14px 0; }
.price small { font-size: 11px; color: var(--muted); }
.detail { margin-top: auto; border: 0; background: #111; color: #fff; border-radius: 10px; padding: 11px; cursor: pointer; font-weight: 800; transition: transform var(--motion-fast) ease, background var(--motion-fast) ease; }
.detail:hover { background: var(--red); }
.empty-products { display: none; background: #fff; border: 1px dashed var(--line); border-radius: 18px; padding: 32px; text-align: center; color: var(--muted); }

.account-invite { background: #111; color: #fff; display: grid; grid-template-columns: 1.3fr auto; align-items: center; gap: 32px; }
.account-invite h2 { font-family: Georgia, serif; font-size: clamp(34px, 4vw, 52px); margin: 8px 0; }
.account-invite p { color: #d8d4cf; max-width: 720px; line-height: 1.65; }
.account-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.banner { background: var(--green); color: #fff; display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 30px; padding: 70px 5vw; }
.banner img { width: 100%; border-radius: 18px; }
.banner h2 { font-family: Georgia, serif; font-size: clamp(36px, 4vw, 52px); }
.banner p { line-height: 1.6; color: #dfebe3; }

.site-footer { background: #111; color: #fff; padding: 45px 5vw; display: flex; justify-content: space-between; gap: 30px; }
.site-footer img { width: 220px; background: #fff; border-radius: 14px; padding: 10px; }
.site-footer p { color: #d3d3d3; line-height: 1.55; }
.site-footer a { color: #fff; }

.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .68); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 100; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 200ms ease, visibility 200ms; }
.modal.show { opacity: 1; visibility: visible; pointer-events: auto; }
.modal-card { background: #fff; border-radius: 20px; max-width: 900px; width: 100%; max-height: calc(100vh - 40px); display: grid; grid-template-columns: 1fr 1fr; overflow: auto; box-shadow: 0 30px 80px rgba(0, 0, 0, .28); opacity: 0; transform: translateY(20px) scale(.985); transition: opacity var(--motion-base) ease, transform var(--motion-base) var(--ease-out); }
.modal.show .modal-card { opacity: 1; transform: translateY(0) scale(1); }
.modal-card > img { width: 100%; height: 100%; min-height: 420px; object-fit: cover; }
.modal-content { padding: 28px; }
.modal-content h2 { font-family: Georgia, serif; font-size: 38px; margin: 14px 0; }
.modal-content p { color: var(--muted); line-height: 1.6; }
.close { float: right; border: 0; background: #eee; border-radius: 50%; width: 36px; height: 36px; cursor: pointer; font-size: 22px; }

.auth-page { min-height: calc(100vh - 73px); display: grid; place-items: center; padding: 50px 20px; background: linear-gradient(135deg, var(--cream), #fff); }
.auth-card { width: min(100%, 560px); background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: clamp(24px, 5vw, 42px); box-shadow: var(--shadow); }
.auth-card.wide { width: min(100%, 820px); }
.auth-card h1 { font-family: Georgia, serif; font-size: 42px; margin: 8px 0 12px; }
.auth-card > p { color: var(--muted); line-height: 1.6; }
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 800; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 11px; background: #fff; padding: 12px 13px; }
.field textarea { min-height: 100px; resize: vertical; }
.field small { color: var(--muted); }
.field-check { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0 18px; line-height: 1.45; }
.field-check input { margin-top: 3px; }
.form-button { width: 100%; border: 0; border-radius: 11px; background: var(--red); color: #fff; padding: 13px 18px; font-weight: 800; cursor: pointer; }
.form-button:hover { background: var(--red-dark); }
.auth-links { text-align: center; margin-top: 20px; }
.auth-links a { color: var(--red); font-weight: 800; }
.alert { border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; line-height: 1.5; }
.alert-success { background: #e7f4ea; color: var(--success); }
.alert-error { background: #f8dfdd; color: var(--danger); }
.alert-info { background: #edf3f8; color: #27546f; }
.alert ul { margin: 0; padding-left: 20px; }

/* Ölçülü giriş ve scroll animasyonları */
@keyframes nav-enter {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes hero-copy-enter {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes hero-image-enter {
    from { opacity: 0; transform: scale(1.025); clip-path: inset(0 0 0 12%); }
    to { opacity: 1; transform: scale(1); clip-path: inset(0); }
}

.motion-ready .site-nav { animation: nav-enter 520ms var(--ease-out) both; }
.motion-ready .hero-kicker,
.motion-ready .hero-title,
.motion-ready .hero-description,
.motion-ready .hero-cta { opacity: 0; animation: hero-copy-enter var(--motion-slow) var(--ease-out) both; }
.motion-ready .hero-kicker { animation-delay: 100ms; }
.motion-ready .hero-title { animation-delay: 180ms; }
.motion-ready .hero-description { animation-delay: 270ms; }
.motion-ready .hero-cta { animation-delay: 350ms; }
.motion-ready .hero-img { transform-origin: center; animation: hero-image-enter 900ms var(--ease-out) 80ms both; }

.motion-ready [data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity var(--motion-slow) ease, transform var(--motion-slow) var(--ease-out);
    transition-delay: var(--reveal-delay, 0ms);
}
.motion-ready [data-reveal="left"] { transform: translateX(-30px); }
.motion-ready [data-reveal="right"] { transform: translateX(30px); }
.motion-ready [data-reveal].is-visible,
.motion-ready.motion-fallback [data-reveal] {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}
.motion-ready [data-reveal]:not(.is-visible) { will-change: opacity, transform; }
.motion-ready [data-reveal].is-visible { will-change: auto; }

@media (hover: hover) and (pointer: fine) {
    .nav-links a:hover { transform: translateY(-1px); }
    .cta:hover { transform: translateY(-2px); box-shadow: 0 9px 22px rgba(131, 17, 14, .2); }
    .filters button:hover { transform: translateY(-1px); border-color: #bdb3a8; box-shadow: 0 5px 14px rgba(17, 17, 17, .06); }
    .product:hover { transform: translateY(-5px); border-color: #d0c5ba; box-shadow: var(--shadow); }
    .product:hover img { transform: scale(1.035); }
    .detail:hover { transform: translateY(-1px); }
}
.cta:active, .filters button:active, .detail:active { transform: scale(.98); }

@media (max-width: 1050px) {
    .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .values { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 800px) {
    .nav-toggle { display: block; }
    .nav-toggle[aria-expanded="true"] { background: var(--red); transform: rotate(90deg); }
    .nav-links { position: absolute; top: 100%; left: 0; right: 0; display: flex; visibility: hidden; opacity: 0; pointer-events: none; align-items: stretch; flex-direction: column; gap: 4px; max-height: calc(100dvh - 72px); overflow-y: auto; background: #fff; border-bottom: 1px solid var(--line); padding: 14px 5vw 20px; box-shadow: var(--shadow); transform: translateY(-10px); transform-origin: top; transition: opacity 220ms ease, transform 220ms var(--ease-out), visibility 220ms; }
    .nav-links.open { visibility: visible; opacity: 1; pointer-events: auto; transform: translateY(0); }
    .nav-links a { border-radius: 10px; padding: 12px 10px; }
    .nav-links a:not(.nav-login):not(.nav-register):hover { background: var(--cream); }
    .nav-login, .nav-register { text-align: center; }
    .hero, .story, .banner, .modal-card, .account-invite { grid-template-columns: 1fr; }
    .hero-img { width: 100%; height: min(52vh, 560px); order: -1; }
    .hero { min-height: auto; }
    .hero-copy { padding: 52px 6vw 60px; }
    .hero h1 { font-size: clamp(44px, 11vw, 66px); }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .search { order: 2; width: 100%; margin-left: 0; }
    .account-actions { justify-content: flex-start; }
    .story { gap: 38px; }
    .banner { gap: 38px; }
    .modal-card > img { min-height: 280px; max-height: 45vh; }
}

@media (max-width: 560px) {
    .brand img { width: 145px; }
    .site-nav { min-height: 68px; padding: 10px 5vw; }
    .nav-links { max-height: calc(100dvh - 67px); }
    .content-section, .banner { padding: 52px 5vw; }
    .hero-img { height: min(52vh, 470px); }
    .hero-copy { padding: 40px 7vw 48px; }
    .hero h1 { font-size: clamp(40px, 12.5vw, 55px); line-height: 1.01; }
    .hero p { font-size: 16px; }
    .product-grid, .values, .auth-grid { grid-template-columns: 1fr; }
    .site-footer { flex-direction: column; padding: 38px 7vw; }
    .filters { position: static; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .filter-chips { width: auto; margin-inline: -5vw; padding: 2px 5vw 7px; flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; }
    .filter-chips::-webkit-scrollbar { display: none; }
    .filter-button { flex: 0 0 auto; scroll-snap-align: start; }
    .search { order: -1; min-height: 46px; }
    .product .ingredients { min-height: 0; }
    .product { border-radius: 16px; }
    .product-body { padding: 15px; }
    .meta { flex-wrap: wrap; }
    .account-actions, .account-actions .cta { width: 100%; }
    .modal { align-items: flex-end; padding: 8px; }
    .modal-card { max-height: calc(100dvh - 16px); border-radius: 18px; transform: translateY(28px) scale(.99); }
    .modal.show .modal-card { transform: translateY(0) scale(1); }
    .modal-card > img { min-height: 220px; max-height: 34vh; }
    .modal-content { padding: 21px; }
    .modal-content h2 { font-size: 32px; }
    .auth-page { min-height: calc(100dvh - 68px); padding: 24px 12px; }
    .auth-card { border-radius: 17px; padding: 22px 18px; }
    .auth-card h1 { font-size: clamp(34px, 11vw, 42px); }
    .site-footer img { width: min(220px, 100%); }
}

@media (max-width: 380px) {
    .hero h1 { font-size: 39px; }
    .content-section, .banner { padding-inline: 18px; }
    .search { min-width: 0; }
    .cta { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-delay: 0ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        transition-delay: 0ms !important;
    }
    .motion-ready [data-reveal],
    .motion-ready .hero-kicker,
    .motion-ready .hero-title,
    .motion-ready .hero-description,
    .motion-ready .hero-cta,
    .motion-ready .hero-img {
        opacity: 1 !important;
        transform: none !important;
        clip-path: none !important;
    }
}
