/* =========================================================
   Fatih Çay Evi — mobil öncelikli ana stil dosyası
   ========================================================= */

:root {
  --burgundy-950: #21090b;
  --burgundy-900: #3b1015;
  --burgundy-800: #651820;
  --burgundy-700: #861d28;
  --gold-500: #d8a93a;
  --gold-400: #f2ca63;
  --cream: #fff8e9;
  --ink: #201819;
  --muted: #706669;
  --white: #ffffff;
  --line: rgba(105, 39, 42, 0.12);
  --shadow: 0 14px 34px rgba(49, 14, 18, 0.12);
  --radius-lg: 20px;
  --radius-md: 15px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  font-family: "Poppins", Arial, sans-serif;
  font-size: 0.95rem;
  line-height: 1.65;
  background:
    radial-gradient(circle at 8% 3%, rgba(216, 169, 58, 0.16), transparent 26rem),
    linear-gradient(180deg, #fffdf8 0%, #f8efe7 100%);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

/* -------------------- Hero -------------------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 1rem 1rem 1.3rem;
  color: var(--white);
  text-align: center;
  background:
    radial-gradient(circle at 12% 0%, rgba(216, 169, 58, 0.22), transparent 13rem),
    linear-gradient(145deg, #21090b 0%, #591119 55%, #861d28 100%);
}

.hero::before,
.hero::after {
  position: absolute;
  z-index: -1;
  width: 11rem;
  height: 11rem;
  content: "";
  border-radius: 50%;
  opacity: 0.25;
  filter: blur(2px);
  animation: glow-drift 12s ease-in-out infinite alternate;
}

.hero::before {
  top: -7rem;
  left: -5rem;
  background: var(--gold-500);
}

.hero::after {
  display: none;
}

.hero-overlay {
  width: min(100%, 740px);
  margin: 0 auto;
}

.logo {
  width: clamp(7.25rem, 34vw, 9.5rem);
  aspect-ratio: 1;
  margin: 0 auto 0.6rem;
  padding: 0.5rem;
  object-fit: contain;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28), inset 0 1px rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(8px);
  animation: logo-float 5s ease-in-out infinite;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.65rem, 7.5vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.25);
}

.hero-title {
  margin: 0.32rem 0 0;
  color: var(--gold-400);
  font-size: clamp(0.92rem, 4.2vw, 1.2rem);
  font-weight: 600;
  line-height: 1.35;
}

.subtitle {
  margin: 0.42rem 0 0;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.slogan {
  max-width: 36rem;
  margin: 0.58rem auto 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.83rem;
  font-style: italic;
}

.slogan strong {
  color: var(--gold-400);
}

.status {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.72rem;
  padding: 0.48rem 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.16);
  font-size: 0.76rem;
  font-weight: 600;
  backdrop-filter: blur(7px);
}

.status i {
  flex: 0 0 auto;
  color: var(--gold-400);
}

/* -------------------- Genel paneller -------------------- */

.container {
  width: min(calc(100% - 1.5rem), 900px);
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

.panel {
  position: relative;
  min-width: 0;
  margin: 0 0 0.9rem;
  padding: 1.15rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.panel.show {
  animation: panel-in 0.5s ease both;
}

.panel::before {
  position: absolute;
  top: 0;
  left: 1.15rem;
  width: 4.2rem;
  height: 4px;
  content: "";
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, var(--burgundy-700), var(--gold-500));
}

.panel h2 {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0 0 0.75rem;
  color: var(--burgundy-800);
  font-size: clamp(1.15rem, 5vw, 1.55rem);
  line-height: 1.35;
}

.panel h2 i {
  flex: 0 0 auto;
  margin-top: 0.15em;
  color: var(--gold-500);
}

.panel h2 span,
.panel p,
.card h3,
.card p {
  min-width: 0;
  overflow-wrap: anywhere;
}

.panel p {
  margin: 0 0 0.75rem;
}

.panel p:last-child {
  margin-bottom: 0;
}

/* -------------------- Hoş geldiniz -------------------- */

.welcome-panel {
  padding-block: 0.95rem;
}

.welcome-panel h2 {
  margin-bottom: 0.4rem;
  font-size: clamp(1.08rem, 4.5vw, 1.35rem);
}

.welcome-panel p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

/* -------------------- Hava durumu -------------------- */

.weather-card {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.18);
  background:
    radial-gradient(circle at 85% 15%, rgba(255, 214, 113, 0.5), transparent 8rem),
    linear-gradient(135deg, #256b84, #16475d);
}

.weather-card::before {
  background: var(--gold-400);
}

.weather-card h2 {
  color: var(--white);
}

.weather-card h2 i {
  color: var(--gold-400);
}

#weather {
  display: grid;
  grid-template-columns: 3.7rem minmax(0, 1fr);
  align-items: center;
  gap: 0.9rem;
}

.weather-icon {
  font-size: 3rem;
  line-height: 1;
  text-align: center;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.2));
}

.weather-copy {
  min-width: 0;
}

#weather h3 {
  margin: 0;
  font-size: 1.2rem;
}

#weather p {
  margin: 0.1rem 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.88rem;
}

#weather .weather-temp {
  color: var(--white);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
}

/* -------------------- Çay tazeliği -------------------- */

.tea-live-panel {
  border-color: rgba(134, 29, 40, 0.14);
  background:
    radial-gradient(circle at 94% 0%, rgba(216, 169, 58, 0.13), transparent 9rem),
    rgba(255, 255, 255, 0.86);
}

.tea-live-intro {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
}

.tea-live-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.tea-badges {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.tea-service-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(162, 42, 50, 0.18);
  border-radius: 999px;
  color: #a22a32;
  background: rgba(162, 42, 50, 0.08);
  font-size: 0.6rem;
  font-weight: 700;
}

.tea-service-badge[hidden] { display: none; }

.tea-sync-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(26, 147, 82, 0.16);
  border-radius: 999px;
  color: #187444;
  background: rgba(26, 147, 82, 0.08);
  font-size: 0.6rem;
  font-weight: 700;
}

.tea-sync-badge > span {
  width: 0.43rem;
  height: 0.43rem;
  border-radius: 50%;
  background: currentColor;
}

.tea-sync-badge.is-offline {
  color: #a22a32;
  border-color: rgba(162, 42, 50, 0.16);
  background: rgba(162, 42, 50, 0.07);
}

.customer-tea-empty {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px dashed rgba(134, 29, 40, 0.2);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 248, 233, 0.72);
}

.customer-tea-empty[hidden] {
  display: none;
}

.customer-tea-empty > i {
  flex: 0 0 auto;
  color: var(--gold-500);
  font-size: 1.25rem;
}

.customer-tea-empty strong,
.customer-tea-empty span {
  display: block;
}

.customer-tea-empty strong {
  color: var(--burgundy-800);
  font-size: 0.78rem;
}

.customer-tea-empty span {
  margin-top: 0.1rem;
  font-size: 0.65rem;
}

.customer-tea-list {
  display: grid;
  gap: 0.55rem;
}

.customer-brew-row {
  --tea-state: var(--gold-500);
  --tea-state-soft: rgba(216, 169, 58, 0.12);
  position: relative;
  display: grid;
  min-width: 0;
  overflow: hidden;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.72rem;
  border: 1px solid color-mix(in srgb, var(--tea-state) 26%, transparent);
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0%, var(--tea-state-soft), transparent 7rem),
    linear-gradient(180deg, #fff, #fffaf2);
}

.customer-progress {
  grid-column: 1 / -1;
  min-width: 0;
}

.customer-progress-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.3rem;
  font-size: 0.55rem;
}

.customer-progress-heading span { color: var(--muted); }
.customer-progress-heading strong { color: var(--tea-state); }

.customer-progress-track {
  width: 100%;
  height: 0.48rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(90, 16, 24, 0.09);
  box-shadow: inset 0 1px 2px rgba(60, 20, 24, 0.1);
}

.customer-progress-track > span {
  position: relative;
  display: block;
  width: var(--progress);
  height: 100%;
  border-radius: inherit;
  background: var(--tea-state);
  box-shadow: 0 0 0.7rem var(--tea-state-soft);
  transition: width 0.7s linear, background-color 0.7s ease;
}

.customer-progress-track > span::after {
  position: absolute;
  inset: 0;
  width: 38%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.78), transparent);
  transform: translateX(-130%);
  animation: customer-loading-sweep 4s ease-in-out infinite;
}

@keyframes customer-loading-sweep {
  0%, 18% { transform: translateX(-130%); }
  82%, 100% { transform: translateX(360%); }
}


.customer-brew-row.state-brewing {
  --tea-state: #ca9124;
  --tea-state-soft: rgba(202, 145, 36, 0.12);
}

.customer-brew-row.state-new {
  --tea-state: #159553;
  --tea-state-soft: rgba(21, 149, 83, 0.12);
}

.customer-brew-row.state-fresh {
  --tea-state: #4da93e;
  --tea-state-soft: rgba(77, 169, 62, 0.12);
}

.customer-brew-row.state-normal {
  --tea-state: #d2a126;
  --tea-state-soft: rgba(210, 161, 38, 0.12);
}

.customer-brew-row.state-warning {
  --tea-state: #dd6d2c;
  --tea-state-soft: rgba(221, 109, 44, 0.12);
}

.customer-brew-row.state-expired {
  --tea-state: #c43139;
  --tea-state-soft: rgba(196, 49, 57, 0.12);
}

.customer-brew-icon {
  display: grid;
  width: 2.45rem;
  height: 2.45rem;
  place-items: center;
  border-radius: 12px;
  color: var(--tea-state);
  background: var(--tea-state-soft);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--tea-state) 22%, transparent);
  transition: box-shadow 0.6s ease, background-color 0.6s ease, color 0.6s ease;
}


.customer-brew-copy {
  min-width: 0;
}

.customer-brew-copy strong,
.customer-brew-copy span {
  display: block;
  overflow-wrap: anywhere;
}

.customer-brew-copy strong {
  color: var(--burgundy-800);
  font-size: 0.78rem;
}

.customer-brew-copy span {
  margin-top: 0.1rem;
  color: var(--tea-state);
  font-size: 0.64rem;
  font-weight: 700;
}

.customer-brew-timer {
  display: grid;
  min-width: 6.2rem;
  justify-items: end;
  color: var(--tea-state);
  font-variant-numeric: tabular-nums;
}

.customer-brew-timer strong {
  font-size: 0.78rem;
  line-height: 1.2;
  white-space: nowrap;
}

.customer-brew-timer small {
  margin-top: 0.05rem;
  color: var(--muted);
  font-size: 0.52rem;
  text-align: right;
}

.tea-info {
  color: var(--muted);
}

.fresh-bar {
  --progress-color: #18a957;
  display: block;
  width: 100%;
  height: 0.75rem;
  appearance: none;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #eadfdb;
  box-shadow: inset 0 2px 5px rgba(50, 20, 22, 0.12);
}

.fresh-bar::-webkit-progress-bar {
  border-radius: inherit;
  background: #eadfdb;
}

.fresh-bar::-webkit-progress-value {
  border-radius: inherit;
  background: var(--progress-color);
  transition: width 0.6s ease, background-color 0.3s ease;
}

.fresh-bar::-moz-progress-bar {
  border-radius: inherit;
  background: var(--progress-color);
  transition: width 0.6s ease, background-color 0.3s ease;
}

.fresh-text {
  margin: 0.85rem 0 0;
  color: var(--burgundy-800);
  font-size: clamp(0.98rem, 4.2vw, 1.12rem);
  line-height: 1.4;
}

.tea-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
}

.tea-item {
  min-width: 0;
  padding: 0.9rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  text-align: center;
  background: linear-gradient(180deg, #fffdf8, #fbf3e9);
}

.tea-item i {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--gold-500);
  font-size: 1.25rem;
}

.tea-item span {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.3;
}

.tea-item strong {
  display: block;
  color: var(--burgundy-800);
  font-size: clamp(0.9rem, 4vw, 1.05rem);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

/* -------------------- Menü butonu -------------------- */

.menu-panel {
  border-color: rgba(134, 29, 40, 0.14);
  background:
    radial-gradient(circle at 92% 15%, rgba(216, 169, 58, 0.14), transparent 8rem),
    rgba(255, 255, 255, 0.88);
}

.menuButton {
  display: inline-flex;
  width: 100%;
  min-height: 4.35rem;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  margin-top: 0.25rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  color: var(--white);
  text-align: left;
  text-decoration: none;
  font-weight: 700;
  background: linear-gradient(135deg, var(--burgundy-700), #b13d34);
  box-shadow: 0 12px 24px rgba(101, 24, 32, 0.28);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.menu-button-icon {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.12);
}

.menu-button-icon i,
.menu-button-arrow {
  color: var(--gold-400);
}

.menu-button-copy {
  display: grid;
  min-width: 0;
  gap: 0.05rem;
  line-height: 1.3;
}

.menu-button-copy strong {
  font-size: 0.98rem;
}

.menu-button-copy small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.68rem;
  font-weight: 500;
}

.menu-button-arrow {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}

/* -------------------- Galeri -------------------- */

.gallery-placeholder {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.gallery-box {
  display: grid;
  min-width: 0;
  min-height: 5.7rem;
  place-content: center;
  gap: 0.35rem;
  padding: 0.65rem 0.25rem;
  border: 1px dashed rgba(134, 29, 40, 0.25);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 248, 233, 0.8);
}

.gallery-box i {
  color: var(--gold-500);
  font-size: 1.35rem;
}

.gallery-box span {
  font-size: clamp(0.62rem, 3vw, 0.76rem);
  font-weight: 600;
}

/* -------------------- Hızlı erişim -------------------- */

.quick-text {
  color: var(--muted);
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.9rem;
}

.card {
  display: flex;
  min-width: 0;
  min-height: 8.1rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 0.45rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  background: linear-gradient(180deg, #ffffff, #fff8ed);
  box-shadow: 0 8px 18px rgba(67, 23, 27, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card > i {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
  place-items: center;
  margin-bottom: 0.5rem;
  border-radius: 50%;
  color: var(--burgundy-700);
  font-size: 1.2rem;
  background: rgba(216, 169, 58, 0.17);
}

.card h3 {
  margin: 0;
  color: var(--burgundy-800);
  font-size: 0.92rem;
  line-height: 1.3;
}

.card p {
  margin: 0.28rem 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.35;
}

/* -------------------- Footer -------------------- */

footer {
  padding: 1.05rem 1rem calc(1.05rem + env(safe-area-inset-bottom));
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  background: linear-gradient(140deg, var(--burgundy-950), var(--burgundy-800));
}

.site-footer p {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.5;
}

/* -------------------- Yukarı çık -------------------- */

#topBtn {
  position: fixed;
  right: max(0.8rem, env(safe-area-inset-right));
  bottom: max(0.8rem, env(safe-area-inset-bottom));
  z-index: 20;
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  background: linear-gradient(135deg, var(--burgundy-700), #bb4a31);
  box-shadow: 0 10px 22px rgba(77, 20, 24, 0.34);
  transform: translateY(1rem) scale(0.9);
  transition: opacity 0.24s ease, visibility 0.24s ease, transform 0.24s ease, filter 0.24s ease;
}

#topBtn.showTop {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

:focus-visible {
  outline: 3px solid var(--gold-400);
  outline-offset: 3px;
}

/* -------------------- Ekran kırılma noktaları -------------------- */

@media (max-width: 359px) {
  body {
    font-size: 0.9rem;
  }

  .container {
    width: min(calc(100% - 1rem), 900px);
  }

  .panel {
    padding: 1rem;
  }

  .card {
    min-height: 7.6rem;
    padding-inline: 0.3rem;
  }
}

@media (min-width: 640px) {
  body {
    font-size: 1rem;
  }

  .hero {
    padding: 2.2rem 2rem 2.5rem;
  }

  .logo {
    width: 11rem;
    margin-bottom: 0.8rem;
  }

  .container {
    width: min(calc(100% - 3rem), 900px);
    padding-top: 2rem;
  }

  .panel {
    margin-bottom: 1.2rem;
    padding: 1.7rem;
  }

  .welcome-panel {
    padding-block: 1.2rem;
  }

  .tea-details,
  .quick-actions,
  .gallery-placeholder {
    gap: 1rem;
  }

  .card {
    min-height: 9.5rem;
  }
}

@media (min-width: 820px) {
  .quick-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .gallery-box {
    min-height: 8rem;
  }

  #topBtn {
    right: 1.5rem;
    bottom: 1.5rem;
  }
}

@media (hover: hover) and (pointer: fine) {
  .logo:hover {
    animation-play-state: paused;
    transform: scale(1.035) rotate(1deg);
  }

  .menuButton:hover,
  .menuButton:focus-visible {
    filter: brightness(1.08);
    transform: translateY(-2px);
  }

  .menuButton:hover .menu-button-arrow,
  .menuButton:focus-visible .menu-button-arrow {
    transform: translateX(3px);
  }

  .card:hover,
  .card:focus-visible {
    border-color: rgba(134, 29, 40, 0.25);
    box-shadow: 0 13px 24px rgba(67, 23, 27, 0.14);
    transform: translateY(-4px);
  }

  #topBtn:hover,
  #topBtn:focus-visible {
    filter: brightness(1.12);
    transform: translateY(-2px) scale(1.03);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@keyframes logo-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes glow-drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(2rem, 1rem, 0) scale(1.12);
  }
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
