/*
* LittleLink
* https://littlelink.io
* Free to use under the MIT license
* http://www.opensource.org/licenses/mit-license.php
*
* Customized for Joe's Sharp Picks Tip Jar
*/

/* Base Typography Scale & Spacing
–––––––––––––––––––––––––––––––––––––––––––––––––– */
:root {
  font-size: 16px;
  --scale-0: 1rem;       /* 16px */
  --scale-1: 1.25rem;    /* 20px */
  --scale-2: 1.563rem;   /* 25px */
  --scale-3: 1.953rem;   /* 31px */
  --scale-4: 2.441rem;   /* 39px */
  --scale-5: 3.052rem;   /* 49px */

  --spacing-xs: 0.5rem;  /* 8px */
  --spacing-s: 1rem;     /* 16px */
  --spacing-m: 1.5rem;   /* 24px */
  --spacing-l: 2rem;     /* 32px */
  --spacing-xl: 3rem;    /* 48px */
  --spacing-xxl: 4rem;   /* 64px */
}

/* Base Styles & Dark Theme Foundation
–––––––––––––––––––––––––––––––––––––––––––––––––– */
body {
  margin: 0;
  padding: 0;
  background-color: #121212;
  color: #ffffff;
  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

/* Accessibility Focus Visible
–––––––––––––––––––––––––––––––––––––––––––––––––– */
:focus-visible {
  outline: 2px solid #fbbf24;
  outline-offset: 2px;
}

/* Grid & Layout
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.container {
  position: relative;
  width: 100%;
  max-width: 32rem; /* 512px */
  text-align: center;
  margin: 0 auto;
  padding: var(--spacing-l) var(--spacing-s);
  box-sizing: border-box;
}

.column {
  width: 100%;
  box-sizing: border-box;
}

/* Mobile-First Centered Card
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.tip-card {
  background-color: #181b22;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.25rem;
  padding: 2.5rem 2rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-sizing: border-box;
}

/* Avatar / Emblem
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.avatar {
  width: 7.5rem; /* 120px */
  height: 7.5rem;
  border-radius: 50%;
  object-fit: cover;
  background-position: center;
  margin-bottom: var(--spacing-m);
  margin-left: auto;
  margin-right: auto;
  display: block;
}

.avatar--rounded {
  border-radius: 50%;
}

.avatar--soft {
  border-radius: 0.5rem;
}

.avatar--none {
  border-radius: 0;
}

/* Typography
–––––––––––––––––––––––––––––––––––––––––––––––––– */
h1 {
  margin: 0 0 var(--spacing-s) 0;
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: #ffffff;
}

.support-text {
  margin: 0 0 0.85rem 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: #e2e8f0;
}

.support-subtext {
  margin: 0 0 var(--spacing-l) 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #94a3b8;
  font-weight: 500;
}

.clarification-text {
  margin: var(--spacing-l) 0 0 0;
  padding-top: var(--spacing-m);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #64748b;
  max-width: 24rem;
}

/* CTA Wrapper & Buttons
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.cta-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 20rem; /* 320px */
  min-height: 3.25rem; /* 52px touch target */
  padding: 0.875rem 1.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  text-decoration: none;
  white-space: normal;
  border-radius: 0.75rem;
  cursor: pointer;
  box-sizing: border-box;
  text-align: center;
  line-height: 1.3;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

/* Beer Button (Warm Amber Theme) */
.button-beer {
  background: #f59e0b;
  background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
  color: #12141a;
  border: 1px solid rgba(251, 191, 36, 0.5);
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35);
}

.button-beer:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.45);
  color: #0c0e12;
}

.button-beer:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

.button-beer:focus-visible {
  outline: 3px solid #fbbf24;
  outline-offset: 3px;
}

/* Missing / Unconfigured TIP_URL state */
.button-beer.is-unconfigured {
  background: #242832;
  color: #94a3b8;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.button-beer.is-unconfigured:hover {
  filter: none;
  transform: none;
  color: #cbd5e1;
  border-color: rgba(255, 255, 255, 0.35);
}

/* Icons */
.icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

/* CTA Status Notice */
.cta-notice {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  max-width: 20rem;
  line-height: 1.4;
}

/* Footer
–––––––––––––––––––––––––––––––––––––––––––––––––– */
footer {
  margin: var(--spacing-l) 0 var(--spacing-s) 0;
  font-size: 0.75rem;
  color: #64748b;
}

footer a {
  color: #94a3b8;
  text-decoration: none;
}

footer a:hover {
  color: #fbbf24;
  text-decoration: underline;
}

/* Responsive Adjustments
–––––––––––––––––––––––––––––––––––––––––––––––––– */
@media (max-width: 34.375rem) { /* 550px */
  .container {
    padding: 1.75rem 1rem 1.5rem 1rem;
  }
  .tip-card {
    padding: 2rem 1.25rem;
    border-radius: 1rem;
  }
  h1 {
    font-size: 1.625rem;
  }
  .support-text {
    font-size: 0.975rem;
  }
  .support-subtext {
    font-size: 0.875rem;
    margin-bottom: var(--spacing-m);
  }
  .avatar {
    width: 6.5rem;
    height: 6.5rem;
  }
}

/* Narrow Mobile Screens (320px - 360px) */
@media (max-width: 22.5rem) {
  .container {
    padding: 1rem 0.5rem;
  }
  .tip-card {
    padding: 1.5rem 0.875rem;
  }
  h1 {
    font-size: 1.4rem;
  }
  .button, button {
    font-size: 1rem;
    padding: 0.75rem 1rem;
    min-height: 3rem;
  }
  .avatar {
    width: 5.5rem;
    height: 5.5rem;
  }
}

/* Reduced Motion Preference
–––––––––––––––––––––––––––––––––––––––––––––––––– */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Font Face Definitions (Local Bundled WOFF2 from LittleLink)
–––––––––––––––––––––––––––––––––––––––––––––––––– */
@font-face {
  font-display: swap;
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-regular.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 600;
  src: url('../fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-600.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 700;
  src: url('../fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-700.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 800;
  src: url('../fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-800.woff2') format('woff2');
}
