/* ============================================
   Qualis Coffee & Food — Coming Soon
   Brand palette from logo
   ============================================ */

:root {
  /* Brand */
  --qualis-dark: #5A3522;
  --qualis-dark-soft: #7B543F;
  --qualis-medium: #7F5E4C;
  --qualis-caramel: #A4816C;
  --qualis-warm: #C19B7C;
  --qualis-cream: #F8F3E9;
  --qualis-cream-warm: #FCF8F0;
  --qualis-beige: #F0E5D7;
  --qualis-gold: #E8AF40;
  --qualis-gold-soft: rgba(232, 175, 64, 0.25);

  /* UI */
  --text: var(--qualis-dark);
  --text-soft: var(--qualis-dark-soft);
  --bg: var(--qualis-cream);
  --surface: var(--qualis-cream-warm);
  --accent: var(--qualis-gold);
  --border: var(--qualis-warm);

  /* Motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-smooth: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-s: 0.35s;
  --duration-m: 0.6s;
  --duration-l: 1s;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-s: 0.01s;
    --duration-m: 0.01s;
    --duration-l: 0.01s;
  }
}

/* Safe area for notched / mobile */
@supports (padding: env(safe-area-inset-top)) {
  .splash,
  .header,
  .footer {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  .header { padding-top: env(safe-area-inset-top); }
  .footer { padding-bottom: env(safe-area-inset-bottom); }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: clamp(1rem, 2vw + 0.5rem, 1.125rem);
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overscroll-behavior: none;
}

/* Splash aktifken ana içerik gizli; bittikten sonra dil / coming soon / footer görünür */
.header,
.main,
.footer {
  opacity: 1;
  transition: opacity var(--duration-m) var(--ease-out-expo);
}
body.splash-active .header,
body.splash-active .main,
body.splash-active .footer {
  opacity: 0;
  pointer-events: none;
}

/* Subtle noise overlay */
.noise {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

/* Ambient gradient orbs */
.gradient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
  animation: orb-float 20s var(--ease-in-out-smooth) infinite;
}

.gradient-orb--1 {
  width: min(60vw, 400px);
  height: min(60vw, 400px);
  background: var(--qualis-gold-soft);
  top: -10%;
  left: -10%;
  animation-delay: 0s;
}

.gradient-orb--2 {
  width: min(50vw, 320px);
  height: min(50vw, 320px);
  background: rgba(193, 155, 124, 0.2);
  bottom: -5%;
  right: -5%;
  animation-delay: -7s;
}

.gradient-orb--3 {
  width: min(40vw, 260px);
  height: min(40vw, 260px);
  background: rgba(164, 129, 108, 0.15);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -14s;
}

@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(3%, -2%) scale(1.05); }
  66% { transform: translate(-2%, 3%) scale(0.98); }
}

/* ========== Açılış / Splash (SVG + marka) ========== */
.splash {
  position: fixed;
  inset: 0;
  z-index: 20;
  min-height: 100vh;
  min-height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--duration-m) var(--ease-out-expo),
              visibility 0s linear var(--duration-m);
}

.splash.splash--out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash__inner {
  text-align: center;
  max-width: min(90vw, 320px);
}

.splash__logo-wrap {
  margin-bottom: 0.75rem;
  animation: splash-logo-in 0.9s var(--ease-out-expo) both;
}

.splash__logo {
  width: clamp(120px, 38vw, 200px);
  height: auto;
  display: block;
  margin: 0 auto;
}

.splash__svg {
  width: clamp(160px, 55vw, 200px);
  height: auto;
  margin: 0 auto 0.5rem;
  color: var(--qualis-warm);
  animation: splash-line-in 0.5s var(--ease-out-expo) 0.45s both;
}

.splash__path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: splash-path-draw 0.75s var(--ease-out-expo) both;
}

.splash__path--1 { animation-delay: 0.5s; }
.splash__path--2 { animation-delay: 0.7s; }
.splash__path--3 { animation-delay: 0.9s; }

.splash__brand {
  font-family: 'Baskervville', Georgia, serif;
  font-size: clamp(2.25rem, 12vw, 3.5rem);
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.1em;
  letter-spacing: 0.02em;
  animation: splash-text-in 0.6s var(--ease-out-expo) 1.05s both;
}

.splash__tagline {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(0.6rem, 2.5vw, 0.75rem);
  font-weight: 500;
  letter-spacing: 0.35em;
  color: var(--text-soft);
  margin: 0;
  animation: splash-text-in 0.5s var(--ease-out-expo) 1.25s both;
}

@keyframes splash-logo-in {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes splash-line-in {
  from {
    opacity: 0;
    transform: scaleX(0.6);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes splash-path-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes splash-text-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .splash__path,
  .splash__path--1,
  .splash__path--2,
  .splash__path--3 { animation: none; stroke-dashoffset: 0; }
  .splash__logo-wrap,
  .splash__svg,
  .splash__brand,
  .splash__tagline { animation-duration: 0.01s; animation-delay: 0s; }
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1.25rem 1.5rem;
  z-index: 10;
  display: flex;
  justify-content: flex-end;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  padding: 0.35rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(90, 53, 34, 0.06);
}

.lang-btn {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-soft);
  background: none;
  border: none;
  min-width: 44px;
  min-height: 44px;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color var(--duration-s) var(--ease-out-expo),
              background-color var(--duration-s) var(--ease-out-expo);
}

.lang-btn:hover {
  color: var(--text);
}

.lang-btn.active {
  color: var(--text);
  background: var(--qualis-beige);
}

.lang-divider {
  color: var(--qualis-caramel);
  font-weight: 300;
  opacity: 0.7;
}

/* Main content — mobil öncelikli, footer ile üst üste binmesin diye flex-grow */
.main {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.25rem 2rem;
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
  text-align: center;
  max-width: 520px;
  width: 100%;
}

@media (min-width: 480px) {
  .main { padding: 6rem 1.5rem 2rem; }
}

.logo-wrap {
  margin-bottom: 0.5rem;
  animation: logo-in var(--duration-l) var(--ease-out-expo) both;
}

.logo {
  width: clamp(160px, 42vw, 220px);
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 8px 24px rgba(90, 53, 34, 0.12));
}

.brand-name {
  font-family: 'Baskervville', Georgia, serif;
  font-size: clamp(2.5rem, 10vw, 3.75rem);
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.15em;
  letter-spacing: 0.02em;
  animation: fade-up var(--duration-m) var(--ease-out-expo) 0.15s both;
}

.brand-tagline {
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  color: var(--text-soft);
  margin: 0 0 2.5rem;
  animation: fade-up var(--duration-m) var(--ease-out-expo) 0.25s both;
}

.coming-block {
  margin-bottom: 2.5rem;
  animation: fade-up var(--duration-m) var(--ease-out-expo) 0.35s both;
}

.coming-text {
  font-family: 'Baskervville', Georgia, serif;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.35em;
  line-height: 1.25;
}

.coming-sub {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-soft);
  margin: 0;
  line-height: 1.5;
}

.cta-instagram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.85rem 1.5rem;
  background: var(--qualis-dark);
  color: var(--qualis-cream);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 999px;
  border: 2px solid var(--qualis-dark);
  transition: transform var(--duration-s) var(--ease-out-expo),
              background-color var(--duration-s) var(--ease-out-expo),
              color var(--duration-s) var(--ease-out-expo),
              box-shadow var(--duration-s) var(--ease-out-expo);
  animation: fade-up var(--duration-m) var(--ease-out-expo) 0.45s both;
  box-shadow: 0 4px 20px rgba(90, 53, 34, 0.25);
}

.cta-instagram:hover {
  background: var(--qualis-medium);
  border-color: var(--qualis-medium);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(90, 53, 34, 0.3);
}

.cta-instagram:focus-visible {
  outline: 2px solid var(--qualis-gold);
  outline-offset: 3px;
}

.cta-instagram__icon {
  flex-shrink: 0;
}

.cta-instagram__label {
  white-space: nowrap;
}

@media (max-width: 380px) {
  .cta-instagram__label { font-size: 0.85rem; }
  .brand-tagline { letter-spacing: 0.2em; }
}

/* Footer */
.footer {
  flex-shrink: 0;
  width: 100%;
  padding: 1.25rem 1.5rem;
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
  z-index: 10;
  text-align: center;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
}

.footer-email {
  font-size: 0.8rem;
  color: var(--text-soft);
  text-decoration: none;
  opacity: 0.95;
  transition: color var(--duration-s) var(--ease-out-expo);
}

.footer-email:hover {
  color: var(--text);
}

.footer-sep {
  font-size: 0.7rem;
  color: var(--qualis-caramel);
  opacity: 0.8;
}

.footer-text {
  font-size: 0.75rem;
  color: var(--text-soft);
  margin: 0;
  opacity: 0.9;
}

@keyframes logo-in {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* View transition for language switch (when supported) */
@supports (view-transition-name: none) {
  .coming-text,
  .coming-sub,
  .cta-instagram__label,
  .footer-text {
    view-transition-name: none;
  }
}
