/* ========================================================================
   SOUTHERN OHIO SOLES — main.css
   Design system: variables, reset, typography, layout, buttons, forms,
   badges, section eyebrows, shared utilities.
   Loaded by every page on the site.
   ======================================================================== */

/* Google Fonts — preconnect tags should also be in each HTML <head> for perf */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@600;700;800&family=Poppins:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');


/* ---- CSS VARIABLES ---------------------------------------------------- */

:root {
  /* Charcoal — primary dark for nav, footer, hero backgrounds */
  --navy:         #1A1A1A;
  --navy-mid:     #2D2D2D;
  --blue:         #3D5A47;   /* forest green — primary accent */
  --blue-mid:     #4E7260;
  --blue-light:   #79A88B;
  --blue-pale:    #EDF4F0;

  /* Forest green — replaces orange; all var(--orange) refs resolve to forest green */
  --orange:       #3D5A47;
  --orange-dark:  #2D4236;
  --orange-light: #4E7260;
  --orange-pale:  #EDF4F0;

  /* Neutrals */
  --cream:        #F2F0EC;
  --warm-white:   #FAFAF9;
  --charcoal:     #1A1A1A;
  --logo-gray:    #A9A9A9;   /* brand gray from logo */

  /* Text */
  --text:         #1A1A1A;
  --text-mid:     #5C5C5C;
  --text-light:   #8A8A8A;

  /* Borders */
  --border:       #D8D5D0;
  --border-light: #EDECEA;

  /* Status colors */
  --forest:       #2D4236;
  --forest-light: #3D5A47;

  /* Sponsor tiers */
  --gold:         #D4A017;
  --silver:       #6B8399;
  --bronze:       #A0693A;

  /* Spacing scale */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.5rem;
  --space-6:  2rem;
  --space-8:  3rem;
  --space-10: 4rem;
  --space-12: 5rem;

  /* Border radii */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;
  --radius-xl:  20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
}


/* ---- RESET ------------------------------------------------------------ */

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

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

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

ul,
ol {
  list-style: none;
}


/* ---- BASE ------------------------------------------------------------- */

body {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--warm-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* ---- TYPOGRAPHY ------------------------------------------------------- */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
  color: var(--text-mid);
  line-height: 1.75;
}

/* Anchor defaults — pages override these in context */
a {
  color: var(--orange);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--orange-dark); }

strong { font-weight: 600; }

/* JetBrains Mono — for order IDs, labels, timestamps, step numbers */
.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  letter-spacing: 0.03em;
}


/* ---- LAYOUT ----------------------------------------------------------- */

/* Standard content container */
.container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

/* Narrow container for centered single-column content */
.container--narrow {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

/* Standard section vertical rhythm */
.section {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

.section--sm {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}

/* Two-column grid used across public pages */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; gap: 2rem; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }
  .container,
  .container--narrow { padding-left: 1.25rem; padding-right: 1.25rem; }
}


/* ---- SECTION EYEBROWS ------------------------------------------------- */
/*
   Usage:
   <div class="eyebrow">
     <span class="eyebrow-line"></span>
     <span class="eyebrow-label">OUR MISSION</span>
   </div>

   On dark/navy backgrounds, add class "eyebrow--light" to the wrapper.
*/

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.eyebrow-line {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--orange);
  flex-shrink: 0;
  border-radius: 2px;
}

.eyebrow-label {
  font-family: 'Poppins', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange);
}

/* Light variant for dark/navy backgrounds */
.eyebrow--light .eyebrow-line  { background: var(--orange-light); }
.eyebrow--light .eyebrow-label { color: var(--orange-light); }


/* ---- BUTTONS ---------------------------------------------------------- */
/*
   Base class: .btn
   Variants:   .btn-primary, .btn-secondary, .btn-outline-white, .btn-dark, .btn-ghost
   Sizes:      .btn--sm, .btn--lg
*/

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s,
              box-shadow 0.2s, transform 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.btn:hover  { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* Forest green — primary CTA */
.btn-primary {
  background: var(--orange);
  color: white;
  border-color: var(--orange);
}
.btn-primary:hover {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
  color: white;
  box-shadow: 0 6px 28px rgba(61,90,71,0.42), 0 2px 8px rgba(61,90,71,0.2);
}

/* White with forest green border — secondary CTA */
.btn-secondary {
  background: white;
  color: var(--orange);
  border-color: var(--orange);
}
.btn-secondary:hover {
  background: var(--orange-pale);
  color: var(--orange-dark);
  border-color: var(--orange-dark);
}

/* White/transparent outline — for use on dark navy backgrounds */
.btn-outline-white {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,0.45);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.1);
  border-color: white;
  color: white;
}

/* Charcoal — used in nav login button */
.btn-dark {
  background: var(--charcoal);
  color: white;
  border-color: var(--charcoal);
}
.btn-dark:hover {
  background: var(--navy-mid);
  border-color: var(--navy-mid);
  color: white;
}

/* Ghost / text-style — subtle actions */
.btn-ghost {
  background: transparent;
  color: var(--text-mid);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--cream);
  color: var(--text);
  border-color: var(--border);
}

/* Success green — approve actions in admin portal */
.btn-success {
  background: var(--forest);
  color: white;
  border-color: var(--forest);
}
.btn-success:hover {
  background: var(--forest-light);
  border-color: var(--forest-light);
  color: white;
}

/* Size modifiers */
.btn--sm {
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
}

.btn--lg {
  font-size: 1rem;
  padding: 0.9rem 2rem;
  border-radius: var(--radius-lg);
}


/* ---- STATUS BADGES ---------------------------------------------------- */
/*
   Pill-shaped colored labels for order status, request status, etc.
   Usage: <span class="badge badge--approved">Approved</span>
*/

.badge {
  display: inline-block;
  font-family: 'Poppins', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* Order / request flow */
.badge--pending    { background: #EDECEA; color: #5C5C5C; }
.badge--approved   { background: #D1FAE5; color: #065F46; }
.badge--ordered    { background: var(--blue-pale); color: var(--blue); }
.badge--shipped    { background: #EDE9FE; color: #5B21B6; }
.badge--delivered  { background: #D1FAE5; color: var(--forest); }
.badge--completed  { background: #D1FAE5; color: var(--forest); }
.badge--overdue    { background: #FEE2E2; color: #991B1B; }
.badge--rejected   { background: #FEE2E2; color: #991B1B; }

/* RFI / ticket status */
.badge--open       { background: var(--orange-pale); color: var(--orange-dark); }
.badge--in-review  { background: var(--blue-pale);   color: var(--blue); }
.badge--answered   { background: #D1FAE5; color: #065F46; }
.badge--closed     { background: var(--border-light); color: var(--text-light); }

/* Announcement categories */
.badge--training   { background: var(--blue-pale);   color: var(--blue-mid); }
.badge--deadline   { background: #EDECEA; color: #4A4A4A; }
.badge--event      { background: #D1FAE5; color: var(--forest); }
.badge--general    { background: var(--border-light); color: var(--text-mid); }

/* Role badges — on login cards */
.badge--rep        { background: var(--orange-pale);  color: var(--orange-dark); }
.badge--staff      { background: #D1FAE5; color: var(--forest); }
.badge--admin      { background: var(--blue-pale);    color: var(--blue-mid); }

/* Passion project stages */
.badge--stage-active   { background: var(--blue-pale);   color: var(--blue-mid); }
.badge--stage-complete { background: #D1FAE5; color: var(--forest); }
.badge--stage-locked   { background: var(--border-light); color: var(--text-light); }


/* ---- PAGE HERO BASE --------------------------------------------------- */
/*
   Shared dark navy hero used on all interior public pages.
   Full hero for the home page is defined in pages.css.
*/

.page-hero {
  background: #0b1610; /* fallback */
  padding: 7rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}

/* Blurred photo layer — inset oversize to hide blur-edge fringing */
.page-hero::before {
  content: '';
  position: absolute;
  inset: -40px;
  background:
    url('../assets/images/pexels-pok-rie-33563-3923721.jpg')
    var(--hero-bg-pos, center center) / cover no-repeat;
  filter: blur(6px);
  z-index: 0;
}

/* Dark overlay sits above the blurred photo */
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0,0,0,0.38) 0%, rgba(0,0,0,0.68) 100%);
  z-index: 1;
}

.page-hero__inner {
  position: relative;
  z-index: 2;
  text-align: center;
}

.page-hero__eyebrow {
  margin-bottom: 1.25rem;
  justify-content: center;
}

.page-hero h1 {
  color: white;
  font-size: clamp(2rem, 4vw, 3rem);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-hero p {
  color: rgba(255,255,255,0.7);
  font-size: 1.1rem;
  margin-top: 1rem;
  max-width: 580px;
  line-height: 1.7;
  margin-left: auto;
  margin-right: auto;
}


/* ---- FORM ELEMENTS ---------------------------------------------------- */
/*
   Shared across public contact/apply forms and portal forms.
   Portal-specific form chrome is in portals.css.
*/

.form-group {
  margin-bottom: 1.25rem;
}

.form-group--row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 600px) {
  .form-group--row { grid-template-columns: 1fr; }
}

.form-label {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}

.form-label .required {
  color: var(--orange);
  margin-left: 0.2rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  color: var(--text);
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 3px rgba(61,90,71,0.12);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-light);
}

.form-textarea {
  resize: vertical;
  min-height: 130px;
  line-height: 1.65;
}

/* Custom select arrow */
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%237A8099' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 0.35rem;
  line-height: 1.5;
}

.form-error {
  font-size: 0.78rem;
  color: #B91C1C;
  margin-top: 0.35rem;
}

/* Checkbox / radio row */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 1rem;
  height: 1rem;
  margin-top: 0.15rem;
  accent-color: var(--orange);
  flex-shrink: 0;
  cursor: pointer;
}

.form-check-label {
  font-size: 0.875rem;
  color: var(--text-mid);
  line-height: 1.5;
}


/* ---- CARDS ------------------------------------------------------------ */
/*
   Generic card shell used across public pages.
   More specific card variants live in pages.css.
*/

.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card--flat:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}


/* ---- DIVIDERS --------------------------------------------------------- */

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}


/* ---- UTILITY CLASSES -------------------------------------------------- */

/* Screen-reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Text alignment */
.text-center { text-align: center; }
.text-right  { text-align: right; }

/* Color utilities */
.text-orange { color: var(--orange); }
.text-navy   { color: var(--navy); }
.text-muted  { color: var(--text-light); }
.text-white  { color: white; }

/* Display */
.d-flex       { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* Spacing helpers */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-6 { margin-top: 3rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Max-width cap for body text */
.prose { max-width: 65ch; }
.prose p + p { margin-top: 1rem; }


/* ---- ENTRANCE ANIMATIONS ---------------------------------------------- */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ---- FOOTER ----------------------------------------------------------- */

.footer {
  background: var(--charcoal);
  padding: 4rem 0 2rem;
}

.footer__top {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer__mission {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.7;
  margin-top: 1rem;
  max-width: 380px;
}

.footer__nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer__nav-label {
  font-family: 'Poppins', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
  margin-bottom: 0.9rem;
}

.footer__nav ul li { margin-bottom: 0.55rem; }

.footer__nav ul a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color 0.15s;
}

.footer__nav ul a:hover { color: rgba(255,255,255,0.85); }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer__copy    { font-size: 0.77rem; color: rgba(255,255,255,0.3); }
.footer__contact { font-size: 0.77rem; color: rgba(255,255,255,0.38); }

/* Social icons */
.footer__social {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-top: 1.1rem;
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.42);
  border: 1px solid rgba(255,255,255,0.1);
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  flex-shrink: 0;
}

.footer__social-link:hover {
  color: white;
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.07);
}

.footer__social-link svg {
  width: 15px;
  height: 15px;
  display: block;
}

@media (max-width: 900px) {
  .footer__top { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer__nav { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .footer__nav { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}


/* ---- MOBILE / TABLET RESPONSIVE ADDITIONS -------------------------------- */

/* Buttons — minimum 44 px tap target on mobile */
@media (max-width: 768px) {
  .btn { min-height: 44px; }
}

/* ---- COMPREHENSIVE MOBILE OVERRIDES (max-width: 768px) ------------------- */

@media (max-width: 768px) {
  .container { padding: 0 1rem; }

  h1 { font-size: 2rem !important; margin-bottom: 0.75rem; }
  h2 { font-size: 1.6rem !important; margin-bottom: 0.75rem; }
  h3 { font-size: 1.3rem !important; margin-bottom: 0.75rem; }
  p  { font-size: 0.95rem; margin-bottom: 0.5rem; }

  .section { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }

  .btn-group { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .btn-group .btn { width: 100%; justify-content: center; text-align: center; }

  .footer { padding: 1.75rem 0 1rem; }
  .footer__top { flex-direction: column; margin-bottom: 1.25rem; padding-bottom: 1.25rem; gap: 1.5rem; }
  .footer__mission { display: none; }
  .footer__social { margin-top: 0.6rem; }
  .footer__nav { flex-direction: column; gap: 0.75rem; }
  .footer__nav-group ul { gap: 0.5rem; }
  .footer__nav-label { margin-bottom: 0.4rem; }
  .footer__nav ul li { margin-bottom: 0.25rem; }
  .footer__nav ul a { font-size: 0.8rem; }
  .footer__bottom { flex-direction: column; gap: 0.4rem; text-align: center; }
  .footer__copy,
  .footer__contact { font-size: 0.71rem; }
}

/* Section vertical padding — reduce from 5rem / 3rem on small screens */
@media (max-width: 600px) {
  .section     { padding-top: 3rem; padding-bottom: 3rem; }
  .section--sm { padding-top: 2rem; padding-bottom: 2rem; }
  .page-hero   { padding: 5rem 0 2.5rem; }
}


/* ── Back to Top Button ── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #0F1F3D;
  color: white;
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s, visibility 0.25s, transform 0.25s, background 0.2s;
  will-change: opacity, transform;
  z-index: 9999;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--blue);
}


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