/* ============================================
   The Rose Golf Clubhouse — Design Walkthrough
   Aura-inspired editorial design
   ============================================ */

:root {
  --bg-primary: #FBFBF9;
  --bg-secondary: #F5F2EB;
  --surface: #ffffff;

  --neutral-100: #f5f5f4;
  --neutral-200: #e7e5e4;
  --neutral-400: #a8a29e;
  --neutral-500: #78716c;
  --neutral-600: #57534e;
  --neutral-800: #292524;
  --neutral-900: #1c1917;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Playfair Display', 'Georgia', 'Times New Roman', serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;

  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--neutral-800);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100dvh;
}

::selection {
  background: var(--neutral-200);
  color: var(--neutral-900);
}

::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}

/* ---- Top Navigation ---- */

.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 251, 249, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--neutral-200);
}

.top-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-4);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-nav-brand {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--neutral-900);
  text-transform: uppercase;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.top-nav-logo {
  height: 32px;
  width: auto;
}

.top-nav-spacer {
  width: 40px;
}

@media (min-width: 640px) {
  .top-nav-brand { font-size: 24px; }
  .top-nav-inner { padding: 0 var(--space-6); }
}

/* ---- Page Hero (Editorial Text) ---- */

.page-hero {
  max-width: 896px;
  margin: 0 auto;
  padding: var(--space-16) var(--space-4) var(--space-12);
  text-align: center;
}

.page-hero-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--neutral-500);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-4);
}

.page-hero-title {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--neutral-900);
  line-height: 1.1;
  margin-bottom: var(--space-6);
}

.page-hero-desc {
  font-size: 14px;
  color: var(--neutral-500);
  max-width: 672px;
  margin: 0 auto;
  line-height: 1.7;
}

@media (min-width: 640px) {
  .page-hero {
    padding: var(--space-24) var(--space-6) var(--space-16);
  }
  .page-hero-title { font-size: 72px; }
  .page-hero-desc { font-size: 16px; }
}

/* ---- Hero Image Section ---- */

.hero-image-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-4);
  margin-bottom: var(--space-20);
}

.hero-image-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--neutral-100);
  border-radius: var(--radius-sm);
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.hero-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-image-overlay {
  position: absolute;
  inset: 0;
  background: rgba(28, 25, 23, 0.05);
  pointer-events: none;
}

.hero-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  opacity: 0.2;
  color: var(--neutral-400);
}

@media (min-width: 640px) {
  .hero-image-wrapper { aspect-ratio: 21 / 9; }
  .hero-image-section {
    padding: 0 var(--space-6);
    margin-bottom: var(--space-24);
  }
}

/* ---- Spaces Section ---- */

.spaces-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-4) var(--space-24);
}

.spaces-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-8);
  border-bottom: 1px solid var(--neutral-200);
  padding-bottom: var(--space-4);
}

.spaces-header-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--neutral-900);
}

.spaces-header-subtitle {
  font-size: 14px;
  color: var(--neutral-500);
  margin-top: var(--space-2);
}

@media (min-width: 640px) {
  .spaces-section { padding: 0 var(--space-6) var(--space-24); }
  .spaces-header { margin-bottom: var(--space-12); }
  .spaces-header-title { font-size: 30px; }
}

/* ---- Spaces Grid (Aura-style portrait cards) ---- */

.spaces-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

@media (min-width: 640px) {
  .spaces-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-10);
  }
}

@media (min-width: 1024px) {
  .spaces-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-12);
  }
}

.space-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.space-card-image {
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--neutral-100);
  border-radius: var(--radius-sm);
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-5);
  position: relative;
}

.space-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.space-card-info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.space-card-text {
  flex: 1;
  padding-right: var(--space-4);
}

.space-card-name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--neutral-900);
}

.space-card-desc {
  font-size: 12px;
  color: var(--neutral-500);
  margin-top: 6px;
  line-height: 1.7;
}

.space-card-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--neutral-200);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neutral-400);
  flex-shrink: 0;
}

.space-card-empty { opacity: 0.45; }

.space-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--neutral-400);
  background: var(--neutral-100);
}

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

.site-footer {
  border-top: 1px solid var(--neutral-200);
  background: rgba(245, 245, 244, 0.5);
  padding: var(--space-16) var(--space-4) var(--space-8);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-brand-name {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--neutral-900);
  text-transform: uppercase;
  text-decoration: none;
  margin-bottom: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.footer-logo {
  height: 40px;
  width: auto;
}

.footer-credits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-10);
  margin-bottom: var(--space-12);
  max-width: 720px;
}

.footer-credit-group {
  text-align: center;
  min-width: 200px;
}

.footer-credit-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--neutral-400);
  margin-bottom: var(--space-3);
}

.footer-credit-name {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 400;
  color: var(--neutral-800);
  line-height: 1.6;
}

.footer-credit-company {
  font-size: 12px;
  font-weight: 400;
  color: var(--neutral-500);
  line-height: 1.5;
  margin-bottom: var(--space-2);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-6);
  font-size: 12px;
  font-weight: 500;
  color: var(--neutral-500);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-12);
}

.footer-links a {
  color: var(--neutral-500);
  text-decoration: none;
}

.footer-divider {
  width: 1px;
  height: 12px;
  background: var(--neutral-200);
}

.footer-powered a {
  color: var(--neutral-400);
}

.footer-copy {
  font-size: 12px;
  color: var(--neutral-400);
}

/* ============================================
   Room / Feed Page
   ============================================ */

.feed-page {
  background: var(--bg-primary);
  min-height: 100dvh;
}

/* ---- Feed Header (Sticky Nav) ---- */

.feed-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 251, 249, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--neutral-200);
}

.feed-header-inner {
  max-width: 768px;
  margin: 0 auto;
  padding: 0 var(--space-4);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.feed-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  text-decoration: none;
  color: var(--neutral-500);
}

.feed-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--neutral-900);
  text-align: center;
  flex: 1;
  padding: 0 var(--space-4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-counter {
  width: 40px;
  font-size: 12px;
  font-weight: 500;
  color: var(--neutral-500);
  text-align: right;
  white-space: nowrap;
}

/* ---- Editorial Room Header ---- */

.room-header {
  max-width: 768px;
  margin: 0 auto;
  padding: var(--space-12) var(--space-4) var(--space-8);
  text-align: center;
}

.room-header-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--neutral-500);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-3);
}

.room-header-title {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--neutral-900);
  margin-bottom: var(--space-4);
}

.room-header-desc {
  font-size: 14px;
  color: var(--neutral-500);
  max-width: 576px;
  margin: 0 auto;
  line-height: 1.7;
}

@media (min-width: 640px) {
  .room-header {
    padding: var(--space-16) var(--space-6) var(--space-12);
  }
  .room-header-title { font-size: 48px; }
}

/* ---- Vertical Feed (Aura post style) ---- */

.feed {
  max-width: 768px;
  margin: 0 auto;
  padding: 0 0 72px;
}

.feed-post {
  margin-bottom: var(--space-16);
  padding: 0 var(--space-4);
}

@media (min-width: 640px) {
  .feed-post {
    margin-bottom: var(--space-24);
    padding: 0 var(--space-6);
  }
}

/* Post header */
.feed-post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) 0;
}

.feed-post-author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.feed-post-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-primary);
  border: none;
  flex-shrink: 0;
}

.feed-post-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feed-post-meta {
  display: flex;
  flex-direction: column;
}

.feed-post-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--neutral-900);
  line-height: 1;
}

.feed-post-type {
  font-size: 12px;
  color: var(--neutral-500);
  margin-top: 4px;
}

/* Post image */
.feed-post-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--neutral-100);
  border-radius: var(--radius-sm);
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-sm);
}

.feed-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}

/* Post caption */
.feed-post-caption {
  padding: var(--space-4) 0 0;
  font-size: 14px;
  color: var(--neutral-800);
  line-height: 1.7;
}

.feed-post-view-label {
  font-weight: 500;
  margin-right: var(--space-2);
}

/* Feed empty state */
.feed-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  min-height: 50vh;
  color: var(--neutral-400);
  font-size: 15px;
}

.feed-empty span:first-child {
  font-size: 48px;
}

/* ---- Zoom Overlay ---- */

.zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.zoom-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.zoom-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  touch-action: pinch-zoom;
}

.zoom-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 32px;
  cursor: pointer;
  padding: var(--space-2);
  line-height: 1;
  z-index: 1001;
}

.zoom-close:active {
  color: #ffffff;
}

/* ---- Room-to-Room Navigation ---- */

.room-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(251, 251, 249, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--neutral-200);
}

.room-nav-inner {
  max-width: 768px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
}

.room-nav-button {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--neutral-900);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  max-width: 35%;
}

.room-nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room-nav-arrow {
  font-size: 18px;
  color: var(--neutral-400);
  flex-shrink: 0;
}

.room-nav-counter {
  font-size: 12px;
  font-weight: 500;
  color: var(--neutral-400);
  text-align: center;
  flex-shrink: 0;
}

/* ---- Transitions ---- */

@media (prefers-reduced-motion: no-preference) {
  .hero-image-wrapper img {
    transition: transform 1s ease-out;
  }
  .hero-image-wrapper:hover img {
    transform: scale(1.02);
  }
  .hero-image-overlay {
    transition: background 0.7s ease;
  }
  .hero-image-wrapper:hover .hero-image-overlay {
    background: transparent;
  }
  .space-card-image img {
    transition: transform 0.7s ease-out;
  }
  .space-card:hover .space-card-image img {
    transform: scale(1.03);
  }
  .space-card-arrow {
    transition: all 0.3s ease;
  }
  .space-card:hover .space-card-arrow {
    background: var(--neutral-900);
    color: #ffffff;
    border-color: var(--neutral-900);
  }
  .feed-post-image img {
    transition: transform 0.7s ease-out;
  }
  .feed-post-image:hover img {
    transform: scale(1.02);
  }
  .feed-back {
    transition: color 0.15s ease;
  }
  .feed-back:hover {
    color: var(--neutral-900);
  }
  .footer-links a:hover {
    color: var(--neutral-900);
  }
}

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

@media (min-width: 768px) {
  .feed {
    max-width: 768px;
    margin: 0 auto;
  }
}
