/* ==========================================================================
   Krispy Kreme demo storefront — global styles
   Colors sampled from the reference screenshots.
   ========================================================================== */

:root {
  --kk-green: #0B6A38;
  --kk-green-dark: #085229;
  --kk-red: #C8102E;
  --kk-red-dark: #A50D26;
  --kk-text: #303030;
  --kk-cream: #fff8ee;
  --kk-sand: #f4ede1;
  --kk-muted: #6f6f6f;
  --kk-border: #e3dccc;
  --kk-card: #ffffff;
  --kk-error: #b00020;
  --kk-error-bg: #fdecea;
  --kk-success: #1c7a3d;
  --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.08);
  --radius-pill: 999px;
  --font-body: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: var(--kk-text);
  background: var(--kk-cream);
  min-height: 100vh;
}

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

a { color: var(--kk-green); }

button { font-family: inherit; cursor: pointer; }

main { min-height: 60vh; }

/* --------------------------------------------------------------------------
   Utility bar (top strip with SHOPS / rewards / sign in)
   -------------------------------------------------------------------------- */

.utility-bar {
  background: #fff;
  border-bottom: 1px solid var(--kk-border);
}

.utility-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.utility-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--kk-text);
  text-decoration: none;
  background: none;
  border: none;
  padding: 4px 2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.utility-link:hover { color: var(--kk-green); }

.utility-btn {
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  border: 1px solid transparent;
}

.utility-btn.solid {
  background: var(--kk-green);
  color: #fff;
}

.utility-btn.solid:hover { background: var(--kk-green-dark); }

.utility-btn.outline {
  background: #fff;
  color: var(--kk-text);
  border-color: var(--kk-border);
}

.utility-btn.outline:hover { border-color: var(--kk-green); color: var(--kk-green); }

.rewards-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--kk-border);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  background: #fff;
}

.rewards-chip .points { font-size: 13px; }

.rewards-chip small {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--kk-muted);
  line-height: 1.1;
  display: block;
}

.hello-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--kk-text);
  background: none;
  border: none;
  padding: 4px 2px;
}

.hello-chip .who {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.hello-chip .who .name { font-size: 12px; }

.hello-chip .who .sub {
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--kk-muted);
}

.hello-chip:hover .name { color: var(--kk-green); }

/* --------------------------------------------------------------------------
   Main nav
   -------------------------------------------------------------------------- */

.main-nav {
  background: #fff;
  border-bottom: 1px solid var(--kk-border);
  position: relative;
}

.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--kk-text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.09em;
  padding: 6px 0;
}

.nav-links a:hover { color: var(--kk-green); }

.nav-cta { margin-left: auto; display: flex; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-pill);
  padding: 12px 24px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn.primary { background: var(--kk-red); color: #fff; }
.btn.primary:hover { background: var(--kk-red-dark); }

.btn.secondary { background: #fff; color: var(--kk-text); border-color: var(--kk-border); }
.btn.secondary:hover { border-color: var(--kk-green); color: var(--kk-green); }

.btn.green { background: var(--kk-green); color: #fff; }
.btn.green:hover { background: var(--kk-green-dark); }

.btn.wide { width: 100%; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

.hero {
  padding: 40px 24px 24px;
  background: var(--kk-cream);
}

.hero-inner {
  max-width: 1240px;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(100deg, #efe7d8 0%, #f6f0e4 55%, #f9f5ec 100%);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 380px;
}

.hero-art {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 30px 10px 0;
}

.hero-doughnuts {
  display: flex;
  align-items: flex-end;
  gap: 4px;
}

.doughnut {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  position: relative;
  box-shadow: inset 0 -14px 22px rgba(0, 0, 0, 0.18), 0 16px 24px rgba(0, 0, 0, 0.12);
}

.doughnut::after {
  content: '';
  position: absolute;
  inset: 34%;
  border-radius: 50%;
  background: var(--kk-cream);
  box-shadow: inset 0 6px 10px rgba(0, 0, 0, 0.22);
}

.doughnut.glazed { background: radial-gradient(circle at 35% 30%, #f7c873, #e8a944 70%, #d18f2c); }

.doughnut.choc { background: radial-gradient(circle at 35% 30%, #6b4423, #4a2c14 70%, #381f0d); }

.doughnut.sprinkle { background: radial-gradient(circle at 35% 30%, #f3d9e2, #e9b7c9 60%, #d993ac); }

.doughnut.sprinkle::before {
  content: '';
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  background-image:
    radial-gradient(circle at 20% 30%, #fff 2px, transparent 3px),
    radial-gradient(circle at 60% 20%, #ffd54f 2px, transparent 3px),
    radial-gradient(circle at 80% 45%, #ef5350 2px, transparent 3px),
    radial-gradient(circle at 40% 70%, #66bb6a 2px, transparent 3px),
    radial-gradient(circle at 70% 75%, #42a5f5 2px, transparent 3px);
}

.hero-copy {
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.eyebrow {
  color: #e07a1f;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 20px;
  margin: 0;
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 44px;
  line-height: 1.05;
  margin: 0;
  color: #8c4a12;
}

.hero-title .accent { color: #e07a1f; }

.hero-sub {
  color: #a5541d;
  font-family: var(--font-serif);
  font-size: 19px;
  margin: 0;
}

.hero-actions { display: flex; gap: 12px; margin-top: 8px; }

.limited-badge {
  position: absolute;
  left: 26px;
  bottom: 26px;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--kk-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.25;
  transform: rotate(-8deg);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

/* --------------------------------------------------------------------------
   Section heading
   -------------------------------------------------------------------------- */

.section-heading {
  font-family: var(--font-serif);
  color: var(--kk-green);
  font-size: 30px;
  text-align: center;
  margin: 40px 0 8px;
}

.section-sub {
  text-align: center;
  color: var(--kk-muted);
  margin: 0 0 24px;
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   Menu grid
   -------------------------------------------------------------------------- */

.menu-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.doughnut-card {
  background: var(--kk-card);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.doughnut-card h3 {
  font-size: 15px;
  margin: 4px 0 0;
  text-align: center;
}

.doughnut-card .desc {
  font-size: 12px;
  color: var(--kk-muted);
  text-align: center;
  margin: 0;
  flex: 1;
}

.doughnut-card .price {
  font-weight: 800;
  color: var(--kk-green);
  font-size: 15px;
}

.doughnut-card .price s {
  color: var(--kk-muted);
  font-weight: 400;
  font-size: 12px;
  margin-right: 6px;
}

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

.site-footer {
  background: #fff;
  border-top: 1px solid var(--kk-border);
  padding: 28px 24px;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  color: var(--kk-muted);
}

/* --------------------------------------------------------------------------
   Modal overlay (sign in / register)
   -------------------------------------------------------------------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 10, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
  overflow-y: auto;
}

.modal {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  padding: 40px 44px 36px;
}

.modal.wide { max-width: 860px; }

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--kk-muted);
  padding: 6px;
  line-height: 1;
}

.modal-close:hover { color: var(--kk-text); }

/* Rewards auth modal (sign in / register) */

.rewards-head {
  text-align: center;
  margin-bottom: 18px;
}

.rewards-logo {
  width: 180px;
  margin: 0 auto 18px;
  display: block;
}

.rewards-title {
  font-family: var(--font-serif);
  color: var(--kk-green);
  font-size: 26px;
  margin: 0 0 8px;
}

.rewards-lede {
  font-family: var(--font-serif);
  color: var(--kk-green);
  font-size: 19px;
  font-weight: 700;
  margin: 0;
  line-height: 1.45;
}

.rewards-lede .free { color: var(--kk-red); }

.switch-auth {
  text-align: center;
  font-size: 13px;
  color: var(--kk-muted);
  margin: 4px 0 22px;
}

.switch-auth button {
  background: none;
  border: none;
  color: var(--kk-green);
  font-weight: 700;
  text-decoration: underline;
  padding: 0;
  font-size: 13px;
}

/* Forms */

.auth-form { display: flex; flex-direction: column; gap: 16px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--kk-green);
  letter-spacing: 0.04em;
  margin-bottom: 5px;
}

.field label .req { color: var(--kk-red); }

.field input {
  width: 100%;
  border: 1px solid #cfc8b8;
  border-radius: 6px;
  padding: 11px 12px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--kk-text);
}

.field input:focus {
  outline: 2px solid rgba(0, 87, 63, 0.35);
  border-color: var(--kk-green);
}

.field input.invalid { border-color: var(--kk-error); }

.field .hint {
  font-size: 11px;
  font-style: italic;
  color: var(--kk-muted);
  margin-top: 5px;
}

.field .error {
  font-size: 11px;
  color: var(--kk-error);
  margin-top: 5px;
}

.password-wrap { position: relative; }

.password-wrap input { padding-right: 40px; }

.eye-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 2px;
  color: #777;
  font-size: 15px;
  line-height: 1;
}

.terms-row {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 11px;
  color: var(--kk-text);
  line-height: 1.5;
}

.terms-row input { margin-top: 2px; }

.auth-error {
  background: var(--kk-error-bg);
  border: 1px solid #f2b8b5;
  color: var(--kk-error);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin: 0 0 14px;
}

.auth-success {
  background: #e6f4ea;
  border: 1px solid #b3d9bd;
  color: var(--kk-success);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin: 0 0 14px;
}

.btn.stack + .btn.stack { margin-top: 12px; }

.btn.facebook { background: #3b5998; color: #fff; }
.btn.facebook:hover { background: #2e4a80; }

/* MFA / verification */

.mfa-note {
  text-align: center;
  color: var(--kk-muted);
  font-size: 13px;
  margin: 0 0 16px;
}

.mfa-note strong { color: var(--kk-text); }

.otp-input {
  text-align: center;
  font-size: 22px;
  letter-spacing: 0.5em;
  padding: 12px;
}

.link-btn {
  background: none;
  border: none;
  color: var(--kk-green);
  font-weight: 700;
  text-decoration: underline;
  font-size: 13px;
  padding: 0;
}

.center { text-align: center; }

/* --------------------------------------------------------------------------
   Profile page
   -------------------------------------------------------------------------- */

.profile-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 90px;
}

.profile-wrap h1 {
  font-family: var(--font-serif);
  font-size: 32px;
  text-align: center;
  margin: 0 0 28px;
}

.profile-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--kk-border);
  margin-bottom: 30px;
}

.profile-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 12px 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--kk-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}

.profile-tab.active {
  color: var(--kk-red);
  border-bottom-color: var(--kk-red);
}

.profile-panel { display: flex; flex-direction: column; gap: 20px; }

.profile-field {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-field .field { flex: 1; }

.profile-field input { background: #faf7f0; }

.pencil-btn {
  background: none;
  border: none;
  font-size: 15px;
  color: var(--kk-muted);
  padding: 6px;
}

.pencil-btn:hover { color: var(--kk-green); }

.profile-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.static-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--kk-border);
}

.static-field .k {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--kk-green);
}

.static-field .v { font-size: 14px; }

/* Edit-profile action row + inline icon buttons */
.edit-row {
  display: flex;
  align-items: center;
  margin-top: 20px;
}

.edit-row .btn svg { margin-right: 2px; }

.profile-edit-btn {
  background: none;
  border: none;
  color: var(--kk-green);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
}

.profile-edit-btn:hover { text-decoration: underline; color: var(--kk-green-dark); }

/* --------------------------------------------------------------------------
   Callback page
   -------------------------------------------------------------------------- */

.callback-wrap {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 40px 24px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 4px solid rgba(0, 87, 63, 0.2);
  border-top-color: var(--kk-green);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { padding-top: 36px; }
  .menu-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
}

@media (max-width: 560px) {
  .menu-grid { grid-template-columns: 1fr; }
  .form-row, .profile-pair { grid-template-columns: 1fr; }
  .modal { padding: 32px 22px; }
  .hero-title { font-size: 34px; }
  .utility-inner { justify-content: center; flex-wrap: wrap; }
}
