/* ==========================================================================
   Funny's Snack — Ortak Stiller
   ========================================================================== */

:root {
  --c-red: #EA4752;
  --c-bg: #FCEBEA;
  --c-text: #606060;
  --c-card: #E793A3;
  --c-card-accent: #E894A4;
  --c-pill: #B05169;
  --c-navy: #084771;
  --c-blue: #8ED7EA;
  --c-purple: #D9D0E5;
  --c-white: #FFFFFF;

  --font-display: "Archivo", "Arial Black", sans-serif;
  --font-body: "Lexend", "Helvetica Neue", Arial, sans-serif;

  --container: 1090px;
  --gutter: 24px;
  --radius-lg: 24px;
  --radius-md: 18px;

  /* Logo her sayfada aynı konum ve boyutta */
  --logo-w: clamp(130px, 13vw, 190px);
  --logo-h: calc(var(--logo-w) * .904); /* SVG oranı 210.71 x 190.48 */
  --logo-top: clamp(12px, 2.5vw, 36px);
}

/* Reset
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.4;
  overflow-x: hidden;
}

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

/* hidden özniteliği, display tanımlayan kurallara karşı da geçerli olsun */
[hidden] {
  display: none !important;
}

h1, h2, h3, p, ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

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

button {
  font: inherit;
  cursor: pointer;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section-greeting {
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 400;
  color: var(--c-text);
}

.section-title {
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 900;
  font-size: 32px;
  line-height: 1.12;
  text-transform: uppercase;
  color: var(--c-text);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, color .2s ease, background .2s ease;
}

.btn:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Beyaz zemin, kırmızı yazı — "Çekilişe Katıl" butonuyla aynı dil */
.btn--light {
  min-height: 46px;
  padding: 0 34px;
  border-radius: 999px;
  background: var(--c-white);
  color: var(--c-red);
  font-size: 17px;
}

.btn--light:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .18);
  color: var(--c-pill);
}

/* Kırmızı zemin, beyaz yazı — açık (pembe) zeminli sayfalar için */
.btn--primary {
  min-height: 52px;
  padding: 0 40px;
  border-radius: 999px;
  background: var(--c-red);
  color: var(--c-white);
  font-size: 18px;
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(234, 71, 82, .3);
  background: var(--c-pill);
}

/* Yazı buton — tasarımdaki "İLERİ" stili */
.btn--text {
  padding: 0;
  background: none;
  color: #000;
  font-size: 17px;
}

.btn--text::after {
  content: "→";
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity .2s ease, transform .2s ease;
}

.btn--text:hover::after,
.btn--text:focus-visible::after {
  opacity: 1;
  transform: none;
}

.btn:focus-visible {
  outline: 3px solid #000;
  outline-offset: 3px;
}

/* Site header / logo
   ========================================================================== */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  pointer-events: none;
}

.site-logo {
  position: absolute;
  top: var(--logo-top);
  /* Container'ın 52px soluna taşar; dar ekranda kenara yaslanır (SVG'nin iç boşluğu ~%11) */
  left: max(var(--gutter) - var(--logo-w) * .085, 50% - var(--container) / 2 - 52px);
  width: var(--logo-w);
  pointer-events: auto;
}

/* Password show / hide (kayıt, giriş, şifre ve profil formları) */

.field__password {
  position: relative;
}

.field__password .field__input {
  padding-right: 46px;
}

.field__toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--c-red);
  transform: translateY(-50%);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / 20px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / 20px no-repeat;
  cursor: pointer;
}

.field__toggle[aria-pressed="true"] {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M3 3l18 18'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M3 3l18 18'/%3E%3C/svg%3E");
}

/* Header bandı — maskotsuz sayfalarda logo yüksekliği kadar kırmızı alan */
.page-band {
  height: calc(var(--logo-top) + var(--logo-h) + 24px);
  background: var(--c-red);
}

/* Footer
   ========================================================================== */

.site-footer {
  background: var(--c-navy);
  color: rgba(255, 255, 255, .85);
  font-size: 14px;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 48px;
  padding-top: 56px;
  padding-bottom: 40px;
}

.site-footer__logo {
  display: block;
  width: 150px;
  margin-left: -13px; /* SVG'nin iç boşluğu */
}

.site-footer__brand p {
  max-width: 280px;
  margin-top: 12px;
  line-height: 1.6;
}

.site-footer__social {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  font-weight: 500;
  color: var(--c-white);
  transition: opacity .2s ease;
}

.site-footer__social:hover,
.site-footer__social:focus-visible {
  opacity: .8;
}

.site-footer__social-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--c-red);
}

.site-footer__social-icon::before {
  content: "";
  width: 20px;
  height: 20px;
  background: var(--c-white);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='5'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Ccircle cx='17.5' cy='6.5' r='.8' fill='%23000'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='5'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Ccircle cx='17.5' cy='6.5' r='.8' fill='%23000'/%3E%3C/svg%3E") center / contain no-repeat;
}

.site-footer__nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.site-footer__heading {
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-stretch: 115%;
  font-weight: 900;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--c-white);
}

.site-footer__col ul {
  display: grid;
  gap: 10px;
}

.site-footer__col a {
  transition: color .2s ease;
}

.site-footer__col a:hover,
.site-footer__col a:focus-visible {
  color: var(--c-white);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer__bottom {
  padding-top: 20px;
  padding-bottom: 24px;
  border-top: 1px solid rgba(255, 255, 255, .15);
  font-size: 12px;
  color: rgba(255, 255, 255, .6);
}

@media (max-width: 900px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 600px) {
  .site-footer__nav {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer__col:last-child {
    grid-column: 1 / -1;
  }
}

/* Profile menu
   ========================================================================== */

.profile-menu {
  position: absolute;
  top: var(--logo-top);
  right: max(var(--gutter), 50% - var(--container) / 2);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  pointer-events: auto;
}

.profile-menu__account {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.profile-menu__box {
  position: relative;
  /* Dönen coin (transform) kendi katmanını oluşturur; açılan panel onun üstünde kalsın */
  z-index: 1;
}

.profile-menu__welcome {
  font-family: var(--font-display);
  font-stretch: 110%;
  font-weight: 900;
  font-size: 15px;
  line-height: 48px; /* butonla aynı hizada */
  text-transform: uppercase;
  color: var(--c-white);
  white-space: nowrap;
}

.profile-menu__trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 16px 0 6px;
  border: 0;
  border-radius: 999px;
  background: var(--c-white);
  color: var(--c-text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  transition: box-shadow .2s ease;
}

.profile-menu__trigger:hover,
.profile-menu__trigger[aria-expanded="true"] {
  box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
}

.profile-menu__trigger:focus-visible {
  outline: 3px solid #000;
  outline-offset: 3px;
}

.profile-menu__avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--c-red);
  color: var(--c-white);
  font-family: var(--font-display);
  font-stretch: 110%;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: .02em;
}

/* İsim yoksa kullanıcı ikonu */
.profile-menu__avatar:empty::before {
  content: "";
  width: 18px;
  height: 18px;
  background: var(--c-white);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='4.5'/%3E%3Cpath d='M3 21c1.5-4.5 5-6.5 9-6.5s7.5 2 9 6.5z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='4.5'/%3E%3Cpath d='M3 21c1.5-4.5 5-6.5 9-6.5s7.5 2 9 6.5z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.profile-menu__name {
  font-weight: 500;
  color: #000;
}

/* Puan + dönen coin */

.profile-menu__points {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 400;
  color: var(--c-white);
  white-space: nowrap;
}

.profile-menu__points strong {
  font-family: var(--font-display);
  font-stretch: 110%;
  font-weight: 900;
  font-size: 15px;
}

.coin {
  width: 22px;
  height: 22px;
  animation: coin-spin 2.4s linear infinite;
}

@keyframes coin-spin {
  to { transform: rotateY(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .coin {
    animation: none;
  }
}

.profile-menu__chevron {
  width: 8px;
  height: 8px;
  margin: -4px 2px 0;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .2s ease, margin .2s ease;
}

.profile-menu__trigger[aria-expanded="true"] .profile-menu__chevron {
  margin-top: 4px;
  transform: rotate(-135deg);
}

.profile-menu__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 240px;
  padding: 8px;
  border-radius: var(--radius-md);
  background: var(--c-white);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .2);
  animation: menu-in .18s ease;
}

.profile-menu__panel[hidden] {
  display: none;
}

.profile-menu__head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--c-bg);
  font-size: 12px;
  color: var(--c-text);
  overflow-wrap: anywhere;
}

.profile-menu__head strong {
  font-family: var(--font-display);
  font-stretch: 110%;
  font-weight: 900;
  font-size: 14px;
  text-transform: uppercase;
  color: #000;
}

.profile-menu__head span:empty {
  display: none;
}

.profile-menu__list a,
.profile-menu__logout {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 400;
  color: var(--c-text);
  transition: background .15s ease, color .15s ease;
}

.profile-menu__list a:hover,
.profile-menu__list a:focus-visible {
  background: var(--c-bg);
  color: #000;
  outline: none;
}

.profile-menu__logout {
  margin-top: 6px;
  border-top: 1px solid var(--c-bg);
  border-radius: 0 0 10px 10px;
  font-family: var(--font-display);
  font-stretch: 110%;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--c-red);
}

.profile-menu__logout:hover,
.profile-menu__logout:focus-visible {
  background: var(--c-bg);
  outline: none;
}

@keyframes menu-in {
  from { opacity: 0; transform: translateY(-6px); }
}

@media (max-width: 767px) {
  :root {
    --gutter: 16px;
  }

  .profile-menu__trigger {
    height: 42px;
    padding: 0 12px 0 4px;
    gap: 8px;
  }

  .profile-menu__avatar {
    width: 34px;
    height: 34px;
  }

  .profile-menu__welcome {
    display: none;
  }
}
