/* ==========================================================================
   POSIE PROJECT — Components
   Header, nav, footer, buttons, cards, forms
   ========================================================================== */

/* — TOPBAR — */
.topbar {
  background: var(--rose-700);
  color: var(--rose-100);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.topbar a {
  color: var(--rose-100);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) 0;
}

.topbar a:hover { color: var(--butter-soft); }

.topbar-left {
  display: flex;
  gap: var(--space-5);
  align-items: center;
  flex-wrap: wrap;
}

.topbar-icon {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  flex-shrink: 0;
}

.topbar-hours {
  opacity: 0.9;
}

@media (max-width: 720px) {
  .topbar { font-size: 0.75rem; }
  .topbar-hours { display: none; }
}

/* — HEADER — */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

.site-header.scrolled {
  box-shadow: var(--shadow-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: var(--space-5);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--rose-700);
  flex-shrink: 0;
}

.nav-logo:hover { color: var(--rose-800); }

.nav-logo-img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--rose-200);
  border: 2px solid var(--rose-200);
  transition: transform 0.3s var(--ease);
}

.nav-logo:hover .nav-logo-img {
  transform: rotate(-6deg);
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.nav-logo-name {
  font-family: var(--font-script);
  font-size: 1.9rem;
  color: var(--rose-600);
  font-weight: 400;
  letter-spacing: 0;
}

.nav-logo-sub {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav-links a {
  display: inline-block;
  padding: var(--space-3) var(--space-4);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--r-full);
  transition: all 0.2s var(--ease);
  position: relative;
}

.nav-links a:hover {
  color: var(--rose-700);
  background: var(--rose-50);
}

.nav-links a.active,
.nav-links a[aria-current="page"] {
  color: var(--rose-700);
}

.nav-links a.active::after,
.nav-links a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 6px;
  height: 6px;
  background: var(--rose-500);
  border-radius: 50%;
  transform: translateX(-50%);
}

.nav-links .nav-cta {
  background: var(--sienna);
  color: var(--white);
  padding: var(--space-3) var(--space-5);
  margin-left: var(--space-3);
}

.nav-links .nav-cta:hover {
  background: var(--sienna-dark);
  color: var(--white);
  transform: translateY(-1px);
}

/* — HAMBURGER — */
.btn-hamburger {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border-radius: var(--r-full);
  transition: background 0.2s var(--ease);
}

.btn-hamburger:hover { background: var(--rose-50); }

.btn-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--rose-700);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}

@media (max-width: 980px) {
  .nav-links { display: none; }
  .btn-hamburger { display: flex; }
}

/* — MOBILE DRAWER — */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(61, 44, 41, 0.45);
  opacity: 0;
  pointer-events: none;
  z-index: 199;
  transition: opacity 0.3s var(--ease);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(360px, 88%);
  background: var(--cream);
  box-shadow: -12px 0 50px rgba(142, 78, 77, 0.2);
  transform: translateX(100%);
  transition: transform 0.4s var(--ease);
  z-index: 200;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.nav-drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--line);
}

.drawer-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--rose-700);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s var(--ease);
}

.drawer-close:hover { background: var(--rose-100); }

.drawer-links {
  display: flex;
  flex-direction: column;
  padding: var(--space-5) var(--space-6);
  gap: var(--space-1);
}

.drawer-links a {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.5rem;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--rose-100);
  transition: color 0.2s var(--ease), padding-left 0.2s var(--ease);
}

.drawer-links a:hover {
  color: var(--rose-700);
  padding-left: var(--space-3);
}

.drawer-footer {
  margin-top: auto;
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.drawer-socials {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.drawer-socials a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--rose-200);
  color: var(--rose-700);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease);
}

.drawer-socials a:hover {
  background: var(--rose-500);
  color: var(--white);
  transform: translateY(-2px);
}

.drawer-socials svg { width: 18px; height: 18px; }

/* — BUTTONS — */
.btn-primary,
.btn-ghost,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all 0.25s var(--ease);
  text-align: center;
  min-height: 48px;
  white-space: nowrap;
}

.btn-primary {
  background: var(--sienna);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(160, 82, 45, 0.2);
}

.btn-primary:hover {
  background: var(--sienna-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(160, 82, 45, 0.3);
}

.btn-ghost {
  background: var(--white);
  color: var(--rose-700);
  border: 2px solid var(--rose-300);
}

.btn-ghost:hover {
  background: var(--rose-50);
  border-color: var(--rose-500);
  color: var(--rose-800);
}

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

.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--white);
  color: var(--white);
}

.btn-sm {
  padding: var(--space-3) var(--space-5);
  font-size: 0.85rem;
  min-height: 40px;
}

/* — CARDS — */
.card {
  background: var(--white);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  display: flex;
  flex-direction: column;
}

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

.card-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--rose-100);
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.card:hover .card-img img {
  transform: scale(1.05);
}

.card-body {
  padding: var(--space-5);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--space-2);
}

.card-desc {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* — FORMS — */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.form-label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-transform: uppercase;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-4) var(--space-5);
  background: var(--white);
  border: 2px solid var(--rose-100);
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--rose-500);
  box-shadow: 0 0 0 4px rgba(244, 194, 194, 0.3);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.6;
}

/* — FOOTER — */
.site-footer {
  background: var(--rose-800);
  color: var(--rose-100);
  padding: var(--space-8) 0 var(--space-5);
  margin-top: var(--space-9);
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 40px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0,40 C300,0 900,0 1200,40 L1200,40 L0,40 Z' fill='%23FBF8F3'/%3E%3C/svg%3E") no-repeat center top/100% 100%;
  pointer-events: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-7);
  margin-bottom: var(--space-6);
  padding-top: var(--space-5);
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-6); }
}

@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand .nav-logo-name {
  color: var(--rose-200);
  font-size: 2.4rem;
}

.footer-brand p {
  color: var(--rose-200);
  opacity: 0.85;
  max-width: 32ch;
  margin-top: var(--space-3);
  font-size: 0.95rem;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rose-300);
  margin-bottom: var(--space-4);
  font-weight: 700;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-col a {
  color: var(--rose-100);
  font-size: 0.95rem;
  opacity: 0.85;
  transition: opacity 0.2s var(--ease), padding-left 0.2s var(--ease);
}

.footer-col a:hover {
  opacity: 1;
  color: var(--butter-soft);
  padding-left: 4px;
}

.footer-address {
  color: var(--rose-100);
  opacity: 0.85;
  font-style: normal;
  line-height: 1.8;
  font-size: 0.95rem;
}

.footer-socials {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.footer-socials a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(253, 245, 243, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rose-100);
  transition: all 0.2s var(--ease);
}

.footer-socials a:hover {
  background: var(--butter);
  color: var(--rose-800);
  transform: translateY(-2px);
}

.footer-socials svg { width: 18px; height: 18px; }

.footer-bottom {
  border-top: 1px solid rgba(253, 245, 243, 0.12);
  padding-top: var(--space-5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  font-size: 0.82rem;
  color: var(--rose-200);
  opacity: 0.7;
  flex-wrap: wrap;
}

.footer-bottom a { color: inherit; }
.footer-bottom a:hover { color: var(--butter-soft); opacity: 1; }
