/* Cozy Web Club Landing Page Stylesheet */

:root {
  --cwc-cream: #fbfaf6;
  --cwc-paper: #ffffff;
  --cwc-pink: #f4d8df;
  --cwc-lavender: #e6e0ee;
  --cwc-blue: #9cc8d6;
  --cwc-blue-soft: #e7f2f5;
  --cwc-mint: #dceee9;
  --cwc-line: #e2e2de;
  --cwc-chrome: #d9ddd8;
  --cwc-ink: #55555a;
  --cwc-muted: #7f8588;
  --cwc-quiet: #a5aaa8;
  
  --rounded-cwc: 6px;
  --font-cwc-sans: "Inter", "Avenir Next", "Segoe UI", sans-serif;
  --font-cwc-heading: "Outfit", "Space Grotesk", "Avenir Next", sans-serif;
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-height: 100%;
  background-color: var(--cwc-cream);
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  color: var(--cwc-ink);
  font-family: var(--font-cwc-sans);
  line-height: 1.5;
}

/* Background Grid Pattern */
.cwc-grid {
  background-color: var(--cwc-cream);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Ccircle cx='2' cy='2' r='1' fill='%23d9ddd8'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* Selection color */
::selection {
  background: #ffd6e9;
  color: var(--cwc-ink);
}

/* Typography Utility Classes */
.font-sans {
  font-family: var(--font-cwc-sans);
}

.font-heading {
  font-family: var(--font-cwc-heading);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-cwc-heading);
  color: var(--cwc-ink);
}

/* Layout Utilities (Plain CSS Tailwind equivalents) */
.max-w-4xl {
  max-width: 56rem; /* 896px */
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mt-16 {
  margin-top: 4rem;
}

.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.gap-8 {
  gap: 2rem;
}

/* Responsive Main Layout */
@media (min-width: 768px) {
  .py-16 {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .md\:col-span-2 {
    grid-column: span 2 / span 2;
  }
  .md\:p-8 {
    padding: 2rem;
  }
}

/* Flexbox utilities used */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1rem;
}

@media (min-width: 640px) {
  .sm\:flex-row {
    flex-direction: row;
  }
}

/* Core Design System Components */

/* Panels */
.flat-panel {
  border: 1px solid var(--cwc-line);
  border-radius: var(--rounded-cwc);
  background-color: var(--cwc-paper);
  box-shadow: 0 1px 0 rgba(85, 85, 90, 0.04);
}

.p-3 { padding: 0.75rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }

/* Buttons */
.bubble-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-cwc-sans);
  font-size: 0.75rem; /* text-xs */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.375rem 0.75rem;
  border-radius: var(--rounded-cwc);
  border: 1px solid var(--cwc-line);
  background-color: var(--cwc-paper);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
  color: var(--cwc-ink);
}

.bubble-button:hover:not(:disabled) {
  background-color: var(--cwc-cream);
  border-color: var(--cwc-ink);
}

.bubble-button:focus {
  outline: none;
  border-color: var(--cwc-blue);
}

/* Primary BubbleButton Variant */
.border-cwc-blue {
  border-color: var(--cwc-blue);
}

.bg-cwc-blue-soft {
  background-color: var(--cwc-blue-soft);
}

.bubble-button.border-cwc-blue.bg-cwc-blue-soft:hover:not(:disabled) {
  background-color: var(--cwc-blue);
  color: var(--cwc-paper);
  border-color: var(--cwc-blue);
}

/* Ghost BubbleButton Variant */
.bubble-button.ghost {
  border-color: transparent;
  background-color: transparent;
  color: var(--cwc-ink);
}

.bubble-button.ghost:hover:not(:disabled) {
  background-color: var(--cwc-blue-soft);
  border-color: transparent;
  color: var(--cwc-ink);
}

/* Status Labels */
.inline-status {
  display: inline-flex;
  align-items: center;
  font-size: 0.65rem; /* small metadata font size */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.5rem;
  border-radius: var(--rounded-cwc);
  border: 1px solid var(--cwc-line);
  line-height: 1;
}

/* Theme Colors for Panels / Backgrounds */
.bg-cwc-paper { background-color: var(--cwc-paper); }
.bg-cwc-cream { background-color: var(--cwc-cream); }
.bg-cwc-mint { background-color: var(--cwc-mint); }
.bg-cwc-pink { background-color: var(--cwc-pink); }
.bg-cwc-lavender { background-color: var(--cwc-lavender); }
.bg-cwc-chrome { background-color: var(--cwc-chrome); }

.border-cwc-line { border-color: var(--cwc-line); }
.border-cwc-mint { border-color: var(--cwc-mint); }

/* Text colors */
.text-cwc-ink { color: var(--cwc-ink); }
.text-cwc-muted { color: var(--cwc-muted); }
.text-cwc-quiet { color: var(--cwc-quiet); }

/* Form inputs & textareas styling */
input[type="text"], textarea {
  font-family: var(--font-cwc-sans);
  font-size: 0.75rem;
  padding: 0.5rem;
  border-radius: var(--rounded-cwc);
  border: 1px solid var(--cwc-line);
  background-color: var(--cwc-cream);
  color: var(--cwc-ink);
  transition: border-color 0.15s ease-in-out;
  width: 100%;
}

input[type="text"]:focus, textarea:focus {
  outline: none;
  border-color: var(--cwc-blue);
  background-color: var(--cwc-paper);
}

/* Tooltips */
.tooltip-container {
  position: relative;
  display: inline-block;
}

.custom-tooltip {
  visibility: hidden;
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--cwc-blue-soft);
  color: var(--cwc-ink);
  border: 1px solid var(--cwc-blue);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.4rem 0.6rem;
  border-radius: var(--rounded-cwc);
  white-space: nowrap;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.15s ease-in-out;
  box-shadow: 0 2px 4px rgba(85, 85, 90, 0.06);
}

/* Tooltip Arrow */
.custom-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--cwc-blue) transparent transparent transparent;
}

.tooltip-container:hover .custom-tooltip,
.tooltip-container:focus-within .custom-tooltip {
  visibility: visible;
  opacity: 1;
}

/* Visitor Counter Widget */
.counter-digit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 30px;
  background-color: var(--cwc-ink);
  color: var(--cwc-cream);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 1.1rem;
  font-weight: 800;
  border-radius: var(--rounded-cwc);
  border: 1px solid var(--cwc-line);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.2), 0 1px 1px rgba(85, 85, 90, 0.1);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
  user-select: none;
}

/* Poll voting bar background progress effect */
.poll-option-btn {
  position: relative;
  overflow: hidden;
  background-color: var(--cwc-cream);
  z-index: 1;
  cursor: pointer;
  border: 1px solid var(--cwc-line);
  transition: all 0.15s ease;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0.5rem;
  border-radius: var(--rounded-cwc);
}

.poll-option-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--progress, 0%);
  background-color: var(--cwc-blue-soft);
  z-index: -1;
  transition: width 0.4s ease-out;
}

.poll-option-btn:hover {
  border-color: var(--cwc-blue);
}

/* Guestbook specific */
.guestbook-entry {
  padding: 0.5rem;
  border-bottom: 1px dashed var(--cwc-line);
}

.guestbook-entry:last-child {
  border-bottom: none;
}

.guestbook-entry-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.15rem;
}

.guestbook-entry-name {
  font-weight: 700;
  font-size: 0.7rem;
  color: var(--cwc-ink);
}

.guestbook-entry-date {
  font-size: 0.6rem;
  color: var(--cwc-quiet);
  text-transform: uppercase;
}

.guestbook-entry-msg {
  font-size: 0.7rem;
  color: var(--cwc-muted);
  word-break: break-word;
}

/* CSS Scrollbar for guestbook entries */
#guestbook-entries::-webkit-scrollbar {
  width: 4px;
}

#guestbook-entries::-webkit-scrollbar-track {
  background: var(--cwc-cream);
  border-radius: var(--rounded-cwc);
}

#guestbook-entries::-webkit-scrollbar-thumb {
  background: var(--cwc-line);
  border-radius: var(--rounded-cwc);
}

#guestbook-entries::-webkit-scrollbar-thumb:hover {
  background: var(--cwc-quiet);
}

/* Helper Utilities */
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.aspect-\[21\/9\] { aspect-ratio: 21 / 9; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.object-cover { object-fit: cover; }
.absolute { position: absolute; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.mix-blend-overlay { mix-blend-mode: overlay; }
.top-2 { top: 0.5rem; }
.left-2 { left: 0.5rem; }
.right-2 { right: 0.5rem; }
.w-3 { width: 0.75rem; }
.h-3 { height: 0.75rem; }
.rounded-full { border-radius: 50%; }
.select-none { user-select: none; }
.tracking-wider { letter-spacing: 0.08em; }
.tracking-tight { letter-spacing: -0.025em; }
.uppercase { text-transform: uppercase; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.pb-1 { padding-bottom: 0.25rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 0.75rem; }
.pt-6 { padding-top: 1.5rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.inline { display: inline; }
.w-8 { width: 2rem; }
.h-8 { height: 2rem; }
.rounded-cwc { border-radius: var(--rounded-cwc); }
.border-t { border-top: 1px solid var(--cwc-line); }
.border-b { border-bottom: 1px solid var(--cwc-line); }
.opacity-60 { opacity: 0.6; }
.cursor-not-allowed { cursor: not-allowed; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flex-1 { flex: 1 1 0%; }
.min-w-0 { min-width: 0; }
.transition-colors { transition-property: color, background-color, border-color; transition-duration: 0.15s; }
.transition-all { transition-property: all; transition-duration: 0.15s; }

.hidden { display: none !important; }

/* Missing Layout Utilities */
.p-2 { padding: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.my-3 { margin-top: 0.75rem; margin-bottom: 0.75rem; }
.max-w-xl { max-width: 36rem; }
.max-h-36 { max-height: 9rem; }
.overflow-y-auto { overflow-y: auto; }
.pr-1 { padding-right: 0.25rem; }


/* Custom layout styles */
.header-decor-dots {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  gap: 0.5rem;
}

.decor-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  border: 1px solid var(--cwc-line);
}
