/* ============================================
   Office Furniture Eugene — Shared Design System
   Reusable tokens, typography, and base styles
   ============================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&family=Work+Sans:wght@600;700;800&display=swap');

/* --- Design Tokens --- */
:root {
  /* Brand Colors */
  --ofe-navy:        #0f0e17;
  --ofe-navy-mid:    #1E262E;
  --ofe-navy-light:  #2a3542;
  --ofe-blue:        #0081c6;
  --ofe-blue-dark:   #006094;
  --ofe-accent:      #0081c6;
  --ofe-accent-hover:#006094;
  --ofe-orange:      #ff6310;
  --ofe-cream:       #FEEEDD;
  --ofe-white:       #ffffff;
  --ofe-offwhite:    #FAFBFC;
  --ofe-gray-100:    #f2f5f7;
  --ofe-gray-200:    #e1e8ed;
  --ofe-gray-400:    #94a3b8;
  --ofe-gray-600:    #64748b;
  --ofe-gray-800:    #1e293b;
  --ofe-text:        #11181f;
  --ofe-text-light:  #fffffe;

  /* Typography */
  --font-heading:    'Work Sans', sans-serif;
  --font-body:       'Open Sans', sans-serif;

  /* Spacing Scale */
  --sp-xs:  0.25rem;
  --sp-sm:  0.5rem;
  --sp-md:  1rem;
  --sp-lg:  1.5rem;
  --sp-xl:  2rem;
  --sp-2xl: 3rem;
  --sp-3xl: 4rem;
  --sp-4xl: 6rem;

  /* Radii */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  20px;

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:   0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg:   0 8px 30px rgba(0,0,0,0.12);
  --shadow-xl:   0 20px 60px rgba(0,0,0,0.15);

  /* Transitions */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --duration-sm: 0.2s;
  --duration-md: 0.4s;
  --duration-lg: 0.6s;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--ofe-text);
  background: var(--ofe-offwhite);
  line-height: 1.6;
}

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

a {
  color: var(--ofe-blue);
  text-decoration: none;
  transition: color var(--duration-sm) var(--ease-out);
}
a:hover {
  color: var(--ofe-blue-dark);
}

/* --- Shared Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* --- Shared Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85em 1.8em;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-sm) var(--ease-out);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.btn-primary {
  background: var(--ofe-blue);
  color: var(--ofe-white);
}
.btn-primary:hover {
  background: var(--ofe-blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 129, 198, 0.3);
  color: var(--ofe-white);
}

.btn-outline {
  background: transparent;
  color: var(--ofe-white);
  border: 2px solid rgba(255,255,255,0.3);
}
.btn-outline:hover {
  border-color: var(--ofe-white);
  background: rgba(255,255,255,0.08);
  color: var(--ofe-white);
}

.btn-blue {
  background: var(--ofe-blue);
  color: var(--ofe-white);
}
.btn-blue:hover {
  background: var(--ofe-blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 129, 198, 0.3);
  color: var(--ofe-white);
}

/* --- Shared Preview Header --- */
.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-md) var(--sp-xl);
  background: var(--ofe-navy);
  position: sticky;
  top: 0;
  z-index: 100;
}
.preview-header__logo img {
  height: 36px;
  width: auto;
}
.preview-header__label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ofe-blue);
  background: rgba(0, 129, 198, 0.12);
  padding: 0.3em 0.8em;
  border-radius: var(--radius-sm);
}

/* --- Utility --- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--sp-xl);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* --- Animations --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

/* --- Modal Gallery (Glassmorphic) --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 14, 23, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-md) var(--ease-out),
              visibility var(--duration-md);
  cursor: zoom-out;
}
.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-gallery {
  position: relative;
  max-width: min(900px, 88vw);
  width: 100%;
  cursor: default;
  animation: scaleIn var(--duration-md) var(--ease-out);
  /* Glass panel */
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.modal-gallery__img-wrap {
  position: relative;
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  max-height: 70vh;
}
.modal-gallery__img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  display: block;
}

.modal-gallery__footer {
  padding: var(--sp-lg) var(--sp-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.modal-gallery__info {
  min-width: 0;
}
.modal-gallery__title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ofe-white);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.modal-gallery__counter {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 2px;
}

.modal-thumbs {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.modal-thumb {
  width: 48px;
  height: 36px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.4;
  transition: all var(--duration-sm);
}
.modal-thumb.active {
  border-color: var(--ofe-blue);
  opacity: 1;
}
.modal-thumb:hover {
  opacity: 0.75;
}
.modal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Close button — glass pill */
.modal-close {
  position: absolute;
  top: var(--sp-md);
  right: var(--sp-md);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--ofe-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-sm);
  z-index: 1001;
}
.modal-close:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.25);
}
.modal-close svg {
  width: 16px;
  height: 16px;
}

/* Nav arrows — glass circles */
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--ofe-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-sm);
  z-index: 1001;
}
.modal-nav:hover {
  background: rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.08);
}
.modal-nav svg {
  width: 20px;
  height: 20px;
}
.modal-nav--prev { left: var(--sp-md); }
.modal-nav--next { right: var(--sp-md); }
.modal-nav[hidden] { display: none; }

@media (max-width: 600px) {
  .modal-gallery {
    max-width: 96vw;
    border-radius: var(--radius-lg);
  }
  .modal-gallery__footer {
    flex-direction: column;
    align-items: flex-start;
    padding: var(--sp-md);
  }
  .modal-nav {
    width: 36px;
    height: 36px;
  }
  .modal-nav--prev { left: var(--sp-sm); }
  .modal-nav--next { right: var(--sp-sm); }
  .modal-thumb {
    width: 40px;
    height: 30px;
  }
}

/* --- SEO Content Section --- */
.uo-about {
  padding: var(--sp-3xl) 0;
  border-top: 1px solid var(--ofe-gray-200);
}
.uo-about__inner {
  max-width: 780px;
}
.uo-about h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ofe-navy);
  margin-bottom: var(--sp-lg);
}
.uo-about p {
  font-size: 0.95rem;
  color: var(--ofe-gray-600);
  line-height: 1.8;
  margin-bottom: var(--sp-lg);
}
.uo-about p:last-child {
  margin-bottom: 0;
}
.uo-about ul {
  list-style: none;
  margin: 0 0 var(--sp-lg);
  padding: 0;
}
.uo-about ul li {
  position: relative;
  font-size: 0.95rem;
  color: var(--ofe-gray-600);
  line-height: 1.8;
  padding-left: var(--sp-xl);
}
.uo-about ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ofe-blue);
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-lg) var(--ease-out),
              transform var(--duration-lg) var(--ease-out);
}
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}
