/* ==========================================================================
   Temel katman — sıfırlama, tipografi, butonlar, formlar, yardımcılar
   ========================================================================== */

/* ---------- Sıfırlama ve taşma koruması ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--f-body);
    font-size: var(--fs-base);
    line-height: 1.7;
    color: var(--c-ink);
    background: var(--c-paper);
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

img {
    height: auto;
}

/* hidden özniteliği bileşen display değerlerini her zaman ezer */
[hidden] {
    display: none !important;
}

::selection {
    background: var(--c-clay);
    color: var(--c-paper);
}

/* Kağıt dokusu (grain) — tüm sayfaya çok hafif doku verir */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 2000;
    pointer-events: none;
    opacity: 0.06;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Erişilebilirlik ---------- */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 3000;
    padding: 0.75rem 1.25rem;
    border-radius: var(--r-pill);
    background: var(--c-ink);
    color: var(--c-paper);
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    top: 12px;
}

:focus-visible {
    outline: 2px solid var(--c-clay);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ---------- Tipografi ---------- */
h1,
h2,
h3,
h4,
.display-font {
    font-family: var(--f-display);
    font-weight: 400;
    font-optical-sizing: auto;
    font-variation-settings: "SOFT" 100, "WONK" 0;
    letter-spacing: -0.02em;
    line-height: 1.08;
    color: inherit;
}

h1 {
    font-size: var(--fs-h1);
}

h2 {
    font-size: var(--fs-h2);
}

h3 {
    font-size: var(--fs-h3);
}

h4 {
    font-size: var(--fs-h4);
}

h1 em,
h2 em,
h3 em {
    font-style: italic;
    font-weight: 300;
    color: var(--c-clay);
}

p {
    margin-bottom: 1rem;
}

.lead-text {
    font-size: var(--fs-lg);
    color: var(--c-ink-soft);
    max-width: 58ch;
}

a {
    color: var(--c-clay);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color var(--t-fast);
}

a:hover {
    color: var(--c-clay-deep);
}

/* Bölüm üst etiketi: "— Ritüel menüsü" */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--c-clay);
}

.eyebrow::before {
    content: "";
    width: 34px;
    height: 1px;
    background: currentColor;
}

.eyebrow--light {
    color: var(--c-brass);
}

/* Bölüm başlık bloğu */
.section-head {
    max-width: 760px;
    margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem);
}

.section-head h2 {
    margin-bottom: 1.25rem;
}

.section-head--center {
    margin-inline: auto;
    text-align: center;
}

.section-head--center .eyebrow {
    justify-content: center;
}

.section-head--center .lead-text {
    margin-inline: auto;
}

.section-head--split {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem 3rem;
    max-width: none;
}

.section-head--split > div {
    max-width: 640px;
}

/* ---------- Bölüm kabukları ---------- */
.section {
    position: relative;
    padding-block: var(--space-section);
}

.section--sand {
    background: var(--c-sand);
}

.section--stone {
    background: var(--c-stone);
    color: var(--c-sand);
}

.section--stone .lead-text {
    color: rgba(243, 234, 223, 0.72);
}

.section--stone h2 em,
.section--stone h3 em {
    color: var(--c-brass);
}

.container-wide {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* ---------- Butonlar ---------- */
.btn-spa {
    --btn-bg: var(--c-clay);
    --btn-fg: #fff;
    --btn-bd: var(--c-clay);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 52px;
    padding: 0.85rem 1.6rem;
    border: 1px solid var(--btn-bd);
    border-radius: var(--r-pill);
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-family: var(--f-body);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition:
        background var(--t-fast),
        color var(--t-fast),
        border-color var(--t-fast),
        transform var(--t-med) var(--ease-out),
        box-shadow var(--t-med) var(--ease-out);
}

.btn-spa:hover {
    --btn-bg: var(--c-clay-deep);
    --btn-bd: var(--c-clay-deep);
    color: var(--btn-fg);
    transform: translateY(-2px);
    box-shadow: var(--sh-clay);
}

.btn-spa:active {
    transform: translateY(0);
}

.btn-spa i {
    font-size: 1.1em;
    transition: transform var(--t-med) var(--ease-out);
}

.btn-spa:hover i.bi-arrow-right,
.btn-spa:hover i.bi-arrow-up-right {
    transform: translateX(3px);
}

.btn-spa--ghost {
    --btn-bg: transparent;
    --btn-fg: var(--c-ink);
    --btn-bd: rgba(43, 34, 29, 0.22);
}

.btn-spa--ghost:hover {
    --btn-bg: var(--c-ink);
    --btn-fg: var(--c-paper);
    --btn-bd: var(--c-ink);
    box-shadow: none;
}

.btn-spa--light {
    --btn-bg: var(--c-paper);
    --btn-fg: var(--c-ink);
    --btn-bd: var(--c-paper);
}

.btn-spa--light:hover {
    --btn-bg: var(--c-brass);
    --btn-fg: var(--c-ink);
    --btn-bd: var(--c-brass);
    box-shadow: none;
}

.btn-spa--outline-light {
    --btn-bg: transparent;
    --btn-fg: var(--c-sand);
    --btn-bd: rgba(243, 234, 223, 0.35);
}

.btn-spa--outline-light:hover {
    --btn-bg: var(--c-sand);
    --btn-fg: var(--c-ink);
    --btn-bd: var(--c-sand);
    box-shadow: none;
}

.btn-spa--sm {
    min-height: 42px;
    padding: 0.55rem 1.15rem;
    font-size: 0.85rem;
}

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

/* Metin bağlantısı (ok ile) */
.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--c-ink);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    padding-bottom: 2px;
}

.link-arrow:hover {
    color: var(--c-clay);
}

/* ---------- Form öğeleri ---------- */
.field {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.field > label,
.field-label {
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--c-ink-soft);
}

.input-spa {
    width: 100%;
    min-height: 54px;
    padding: 0.85rem 1.1rem;
    border: 1px solid var(--c-mist);
    border-radius: var(--r-md);
    background: #fff;
    color: var(--c-ink);
    font: inherit;
    font-size: 1rem; /* iOS yakınlaştırmasını engeller */
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
    appearance: none;
}

.input-spa::placeholder {
    color: var(--c-ink-mute);
}

.input-spa:focus {
    outline: none;
    border-color: var(--c-clay);
    box-shadow: 0 0 0 4px rgba(180, 97, 58, 0.14);
}

textarea.input-spa {
    min-height: 120px;
    resize: vertical;
}

select.input-spa {
    padding-right: 2.75rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%236b5d53' stroke-width='1.6' d='M3 6l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.1rem center;
}

.input-spa.is-invalid {
    border-color: var(--c-danger);
}

.field-error {
    display: none;
    font-size: var(--fs-xs);
    color: var(--c-danger);
}

.input-spa.is-invalid ~ .field-error {
    display: block;
}

.check-spa {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: var(--fs-sm);
    color: var(--c-ink-soft);
    cursor: pointer;
}

.check-spa input {
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--c-clay);
}

/* Seçim çipleri (süre, cinsiyet tercihi vb.) */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip {
    position: relative;
}

.chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.chip span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 44px;
    padding: 0.55rem 1.1rem;
    border: 1px solid var(--c-mist);
    border-radius: var(--r-pill);
    background: #fff;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--c-ink-soft);
    cursor: pointer;
    transition: all var(--t-fast);
}

.chip span:hover {
    border-color: var(--c-clay);
    color: var(--c-ink);
}

.chip input:checked + span {
    border-color: var(--c-ink);
    background: var(--c-ink);
    color: var(--c-paper);
}

.chip input:focus-visible + span {
    outline: 2px solid var(--c-clay);
    outline-offset: 2px;
}

/* ---------- Görünür olunca beliren animasyon ---------- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity var(--t-slow) var(--ease-out),
        transform var(--t-slow) var(--ease-out);
    transition-delay: var(--d, 0ms);
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

.no-js .reveal {
    opacity: 1;
    transform: none;
}

@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;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ---------- Yardımcılar ---------- */
.visually-hidden-focusable:not(:focus) {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
}

.text-clay {
    color: var(--c-clay) !important;
}

.text-soft {
    color: var(--c-ink-soft) !important;
}

.divider-wave {
    display: block;
    width: 100%;
    height: 14px;
    color: var(--c-linen);
}
