/* ============================================
   Iroh's Tea Shop — a cozy indie-web stylesheet
   ============================================ */

/* --- Self-hosted fonts --- */
@font-face {
  font-family: 'Dancing Script';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/dancing-script-700.ttf') format('truetype');
}

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/cormorant-garamond-regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/cormorant-garamond-italic.ttf') format('truetype');
}

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/cormorant-garamond-600.ttf') format('truetype');
}

@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/lora-regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Lora';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/lora-italic.ttf') format('truetype');
}

@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/lora-700.ttf') format('truetype');
}

:root {
  --bg-deep: #1a110a;
  --bg-warm: #2a1810;
  --parchment: #f5e6c8;
  --parchment-dark: #e8d4a8;
  --tea-amber: #c8956c;
  --tea-dark: #8b5e3c;
  --tea-light: #e8c9a0;
  --leaf-green: #5a7247;
  --leaf-dark: #3d5030;
  --ember: #b85c38;
  --ember-glow: #d4845a;
  --ink: #3d2b1f;
  --ink-light: #6b5344;
  --gold: #d4a853;
  --cream: #faf3e6;
}

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

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 12px;
}
::-webkit-scrollbar-track {
  background: var(--bg-warm);
}
::-webkit-scrollbar-thumb {
  background: var(--tea-dark);
  border-radius: 6px;
  border: 2px solid var(--bg-warm);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--tea-amber);
}

/* --- Body & Background --- */
body {
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(139, 94, 60, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(90, 114, 71, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(184, 92, 56, 0.08) 0%, transparent 50%);
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 40px 20px;
}

/* Subtle twinkling stars in background */
.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1px 1px at 10% 15%, rgba(212, 168, 83, 0.4), transparent),
    radial-gradient(1px 1px at 25% 35%, rgba(212, 168, 83, 0.3), transparent),
    radial-gradient(1px 1px at 40% 10%, rgba(212, 168, 83, 0.5), transparent),
    radial-gradient(1px 1px at 55% 45%, rgba(212, 168, 83, 0.2), transparent),
    radial-gradient(1px 1px at 70% 20%, rgba(212, 168, 83, 0.4), transparent),
    radial-gradient(1px 1px at 85% 55%, rgba(212, 168, 83, 0.3), transparent),
    radial-gradient(1px 1px at 15% 70%, rgba(212, 168, 83, 0.2), transparent),
    radial-gradient(1px 1px at 45% 80%, rgba(212, 168, 83, 0.4), transparent),
    radial-gradient(1px 1px at 75% 75%, rgba(212, 168, 83, 0.3), transparent),
    radial-gradient(1px 1px at 90% 40%, rgba(212, 168, 83, 0.5), transparent),
    radial-gradient(1.5px 1.5px at 30% 90%, rgba(212, 168, 83, 0.3), transparent),
    radial-gradient(1.5px 1.5px at 60% 60%, rgba(212, 168, 83, 0.2), transparent),
    radial-gradient(1px 1px at 5% 50%, rgba(232, 201, 160, 0.3), transparent),
    radial-gradient(1px 1px at 95% 85%, rgba(232, 201, 160, 0.4), transparent);
  animation: twinkle 8s ease-in-out infinite alternate;
}

@keyframes twinkle {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.7; }
}

/* --- Page Frame (the parchment scroll) --- */
.page-frame {
  position: relative;
  z-index: 1;
  width: 900px;
  max-width: 900px;
  background: var(--parchment);
  border: 3px solid var(--tea-dark);
  border-radius: 4px;
  box-shadow:
    0 0 30px rgba(0, 0, 0, 0.5),
    0 0 60px rgba(139, 94, 60, 0.2),
    inset 0 0 80px rgba(139, 94, 60, 0.05);
  padding: 0;
  overflow: hidden;
}

/* Parchment texture overlay */
.page-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 28px,
      rgba(139, 94, 60, 0.03) 28px,
      rgba(139, 94, 60, 0.03) 29px
    );
  pointer-events: none;
  z-index: 0;
}

/* --- Header --- */
.site-header {
  position: relative;
  text-align: center;
  padding: 40px 40px 20px;
  background: linear-gradient(180deg, rgba(139, 94, 60, 0.12) 0%, transparent 100%);
  border-bottom: 2px solid var(--tea-light);
}

.teacup-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
}

.cup {
  position: relative;
  width: 60px;
  height: 40px;
  background: var(--tea-dark);
  border-radius: 0 0 25px 25px;
  border: 3px solid var(--ink-light);
}

.cup::after {
  content: '';
  position: absolute;
  right: -18px;
  top: 5px;
  width: 16px;
  height: 20px;
  border: 3px solid var(--ink-light);
  border-left: none;
  border-radius: 0 10px 10px 0;
}

.steam {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.steam span {
  display: block;
  width: 3px;
  height: 20px;
  background: rgba(139, 94, 60, 0.3);
  border-radius: 50%;
  animation: steam-rise 2s ease-in-out infinite;
}

.steam span:nth-child(2) {
  animation-delay: 0.4s;
  height: 24px;
}

.steam span:nth-child(3) {
  animation-delay: 0.8s;
  height: 18px;
}

@keyframes steam-rise {
  0% {
    transform: translateY(0) scaleX(1);
    opacity: 0.4;
  }
  50% {
    transform: translateY(-8px) scaleX(1.5);
    opacity: 0.2;
  }
  100% {
    transform: translateY(-16px) scaleX(0.5);
    opacity: 0;
  }
}

.site-title {
  font-family: 'Dancing Script', cursive;
  font-size: 3rem;
  color: var(--tea-dark);
  text-shadow: 1px 1px 0 rgba(139, 94, 60, 0.2);
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.site-title a:hover {
  color: var(--ember);
}

.site-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: var(--ink-light);
  font-style: italic;
  margin-top: 4px;
}

/* --- Navigation --- */
.main-nav {
  position: relative;
  background: var(--tea-dark);
  border-top: 2px solid var(--tea-amber);
  border-bottom: 2px solid var(--tea-amber);
}

.main-nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 0;
}

.main-nav .nav-link {
  display: block;
  padding: 12px 28px;
  color: var(--cream);
  text-decoration: none;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: background 0.2s, color 0.2s;
  border-left: 1px solid rgba(232, 201, 160, 0.15);
}

.main-nav li:first-child .nav-link {
  border-left: none;
}

.main-nav .nav-link:hover {
  background: rgba(232, 201, 160, 0.15);
  color: var(--gold);
}

.main-nav .nav-link.active {
  background: rgba(232, 201, 160, 0.2);
  color: var(--gold);
  box-shadow: inset 0 -3px 0 var(--gold);
}

/* --- Main Content --- */
.content {
  position: relative;
  z-index: 1;
  padding: 40px 50px;
  min-height: 400px;
}

.content h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  color: var(--tea-dark);
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--tea-light);
}

.content h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  color: var(--tea-dark);
  margin: 25px 0 10px;
}

.content p {
  line-height: 1.8;
  margin-bottom: 16px;
  color: var(--ink);
}

.content a {
  color: var(--ember);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.content a:hover {
  color: var(--ember-glow);
  text-decoration-style: solid;
}

/* --- Homepage Sections --- */
.welcome-section {
  text-align: center;
  margin-bottom: 30px;
}

.welcome-section h2 {
  border: none;
  font-size: 2.2rem;
}

.welcome-section p {
  font-size: 1.1rem;
  max-width: 650px;
  margin: 0 auto 16px;
}

/* Quote Card */
.quote-card {
  background: linear-gradient(135deg, var(--parchment-dark) 0%, var(--tea-light) 100%);
  border: 2px solid var(--tea-amber);
  border-radius: 8px;
  padding: 30px 35px;
  margin: 30px auto;
  max-width: 650px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(139, 94, 60, 0.15);
  position: relative;
}

.quote-card::before,
.quote-card::after {
  font-family: 'Cormorant Garamond', serif;
  font-size: 4rem;
  color: var(--tea-amber);
  opacity: 0.4;
  position: absolute;
  line-height: 1;
}

.quote-card::before {
  content: '\201C';
  top: 10px;
  left: 15px;
}

.quote-card::after {
  content: '\201D';
  bottom: -10px;
  right: 15px;
}

.quote-card .quote-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-style: italic;
  color: var(--ink);
  line-height: 1.6;
  margin-bottom: 12px;
}

.quote-card .quote-context {
  font-size: 0.9rem;
  color: var(--ink-light);
}

/* Section Boxes */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 30px;
}

.home-box {
  background: rgba(139, 94, 60, 0.06);
  border: 1px solid var(--tea-light);
  border-radius: 6px;
  padding: 20px 24px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.home-box:hover {
  border-color: var(--tea-amber);
  box-shadow: 0 2px 12px rgba(139, 94, 60, 0.1);
}

.home-box h3 {
  margin-top: 0;
  font-size: 1.2rem;
}

.home-box p {
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.home-box .box-link {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
}

/* Leaf divider */
.leaf-divider {
  text-align: center;
  margin: 30px 0;
  color: var(--leaf-green);
  font-size: 1.5rem;
  opacity: 0.5;
}

/* --- Blog --- */
.post-list {
  list-style: none;
}

.post-list li {
  margin-bottom: 25px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--tea-light);
}

.post-list li:last-child {
  border-bottom: none;
}

.post-meta {
  font-size: 0.85rem;
  color: var(--ink-light);
  margin-bottom: 6px;
}

.post-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.post-title a {
  color: var(--tea-dark);
  text-decoration: none;
}

.post-title a:hover {
  color: var(--ember);
  text-decoration: underline;
  text-decoration-style: dotted;
}

.post-excerpt {
  color: var(--ink-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Single post */
.post-content {
  line-height: 1.9;
}

.post-content blockquote {
  border-left: 4px solid var(--tea-amber);
  padding: 10px 20px;
  margin: 20px 0;
  background: rgba(139, 94, 60, 0.05);
  font-style: italic;
}

.post-header {
  margin-bottom: 30px;
}

.post-header h2 {
  margin-bottom: 5px;
}

.back-link {
  display: inline-block;
  margin-top: 30px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
}

/* --- Gallery --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  border: 2px solid var(--tea-light);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
  aspect-ratio: 1;
}

.gallery-item:hover {
  border-color: var(--tea-amber);
  transform: scale(1.02);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item .gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(26, 17, 10, 0.8));
  color: var(--cream);
  padding: 20px 10px 10px;
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.gallery-item:hover .gallery-caption {
  opacity: 1;
}

/* Gallery placeholder */
.gallery-placeholder {
  background: var(--parchment-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: var(--ink-light);
  text-align: center;
  padding: 20px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 17, 10, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  cursor: pointer;
}

.lightbox img {
  max-width: 85%;
  max-height: 80vh;
  border: 3px solid var(--tea-dark);
  border-radius: 4px;
}

.lightbox p {
  color: var(--cream);
  margin-top: 15px;
  font-style: italic;
}

/* --- Guestbook --- */
.guestbook-form {
  background: rgba(139, 94, 60, 0.06);
  border: 1px solid var(--tea-light);
  border-radius: 6px;
  padding: 25px;
  margin-bottom: 30px;
}

.guestbook-form h3 {
  margin-top: 0;
  margin-bottom: 15px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  color: var(--tea-dark);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  font-family: 'Lora', serif;
  font-size: 0.95rem;
  border: 2px solid var(--tea-light);
  border-radius: 4px;
  background: var(--cream);
  color: var(--ink);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--tea-amber);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.submit-btn {
  background: var(--tea-dark);
  color: var(--cream);
  border: 2px solid var(--tea-amber);
  padding: 10px 30px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.submit-btn:hover {
  background: var(--ember);
}

.submit-btn:active {
  transform: scale(0.98);
}

.guestbook-entry {
  padding: 15px 0;
  border-bottom: 1px solid var(--tea-light);
}

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

.gb-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.gb-name {
  color: var(--tea-dark);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
}

.gb-date {
  font-size: 0.8rem;
  color: var(--ink-light);
}

.gb-message {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* --- Neighbours --- */
.neighbours-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.neighbour-btn {
  display: block;
  width: 88px;
  height: 31px;
  border: 1px solid var(--tea-light);
  border-radius: 2px;
  transition: transform 0.2s, box-shadow 0.2s;
  image-rendering: pixelated;
}

.neighbour-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(139, 94, 60, 0.3);
}

.neighbour-card {
  background: rgba(139, 94, 60, 0.06);
  border: 1px solid var(--tea-light);
  border-radius: 6px;
  padding: 15px 20px;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}

.neighbour-card:hover {
  border-color: var(--tea-amber);
}

.neighbour-card h3 {
  margin: 0 0 5px;
  font-size: 1.1rem;
}

.neighbour-card p {
  font-size: 0.9rem;
  margin: 0;
  color: var(--ink-light);
}

/* --- Footer --- */
.site-footer {
  text-align: center;
  padding: 30px 40px;
  background: linear-gradient(0deg, rgba(139, 94, 60, 0.1) 0%, transparent 100%);
  border-top: 2px solid var(--tea-light);
}

.footer-badges {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--tea-dark);
  color: var(--cream);
  font-size: 0.75rem;
  font-family: 'Courier New', monospace;
  border-radius: 2px;
  letter-spacing: 0.5px;
  text-transform: lowercase;
}

.footer-quote {
  color: var(--ink-light);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--ink-light);
  margin: 0;
}

/* --- Utilities --- */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

/* Marquee-style scrolling text */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  background: var(--tea-dark);
  color: var(--tea-light);
  padding: 6px 0;
  font-size: 0.85rem;
  font-family: 'Courier New', monospace;
}

.marquee span {
  display: inline-block;
  animation: marquee-scroll 25s linear infinite;
}

@keyframes marquee-scroll {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* Now Playing widget */
.now-playing {
  background: rgba(139, 94, 60, 0.08);
  border: 1px solid var(--tea-light);
  border-radius: 6px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  margin-top: 20px;
}

.now-playing-icon {
  font-size: 1.2rem;
}

.now-playing-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
}

.now-playing-bars span {
  display: block;
  width: 3px;
  background: var(--leaf-green);
  border-radius: 1px;
  animation: eq-bar 1s ease-in-out infinite alternate;
}

.now-playing-bars span:nth-child(1) { height: 6px; animation-delay: 0s; }
.now-playing-bars span:nth-child(2) { height: 12px; animation-delay: 0.2s; }
.now-playing-bars span:nth-child(3) { height: 8px; animation-delay: 0.4s; }
.now-playing-bars span:nth-child(4) { height: 14px; animation-delay: 0.1s; }

@keyframes eq-bar {
  0% { height: 4px; }
  100% { height: 16px; }
}

/* Button showcase */
.button-showcase {
  background: rgba(139, 94, 60, 0.06);
  border: 1px solid var(--tea-light);
  border-radius: 6px;
  padding: 20px 24px;
  text-align: center;
}

.button-showcase h3 {
  margin-top: 0;
}

.button-showcase p {
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.button-preview {
  margin-bottom: 15px;
}

.button-preview img {
  image-rendering: auto;
  border: 1px solid var(--tea-light);
}

.embed-code {
  background: var(--bg-warm);
  color: var(--tea-light);
  border: 1px solid var(--tea-dark);
  border-radius: 4px;
  padding: 12px 16px;
  text-align: left;
  overflow-x: auto;
  font-size: 0.8rem;
  line-height: 1.5;
  margin: 0;
}

.embed-code code {
  font-family: 'Courier New', monospace;
}

/* Update timestamp */
.last-updated {
  font-size: 0.8rem;
  color: var(--ink-light);
  text-align: center;
  margin-top: 15px;
  font-style: italic;
}
