:root {
  --kraft: #a4c97e;
  --kraft-dark: #81a85a;
  --page: #f8faf2;
  --page-shadow: #d1e3c1;
  --ink: #2b3b1e;
  --ink-soft: #556b40;
  
  --tape-rose: #b8e889;     
  --tape-sage: #96d99f;     
  --tape-mustard: #fcf4a4;  
  --tape-sky: #a8e6cf;      
  --tape-plum: #5eb562;     
  --tape-clay: #3e8c41;     
  --thread: #d94a4a;        
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: url('images/4689177a856e309cdd40080c2091df64.jpg') repeat;
  background-size: 350px;
  font-family: 'Lora', serif;
  color: var(--ink);
  
  /* Forces the page to stack top-to-bottom so you can scroll to the apples! */
  display: flex;
  flex-direction: column; 
  align-items: center; 
  justify-content: flex-start;
  padding: 48px 20px 80px;
}

.board {
  display: flex;
  align-items: flex-start;
  gap: 0;
  max-width: 920px;
  width: 100%;
}

.notebook {
  position: relative;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0px, transparent 33px,
      rgba(160,180,140,0.35) 34px, transparent 35px
    ),
    var(--page);
  flex: 1;
  min-width: 0;
  padding: 170px 46px 80px 78px; 
  border-radius: 2px;
  box-shadow:
    0 1px 0 #fff inset,
    6px 10px 0 -2px var(--page-shadow),
    6px 10px 18px rgba(43,59,30,0.35);
  transform: rotate(-0.4deg);
}

.notebook::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 52px;
  width: 1.5px;
  background: rgba(217,74,74,0.35);
}

.spiral {
  position: absolute;
  left: -16px; 
  top: 140px; 
  bottom: 26px; 
  width: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.spiral span {
  display: block;
  width: 32px; height: 16px;
  border: 3px solid var(--ink-soft);
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 2px 2px rgba(0,0,0,0.15);
}

/* ---------- Storefront Awning & Tree ---------- */
.store-awning {
  position: absolute;
  top: -158px; /* Your custom number! */
  left: -15.5%; /* Your custom number! */
  width: 130%; /* Your custom number! */
  z-index: 10;
  pointer-events: none; 
}

.corner-tree {
  position: absolute;
  bottom: 30px; 
  left: -35px; 
  width: 180px;
  z-index: 6; 
  pointer-events: none;
}

/* ---------- Top Row Layout ---------- */
.top-row {
  display: flex;
  flex-direction: row !important;
  align-items: stretch;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  width: 100%;
}

.text-side {
  flex: 1;
  width: 50%;
  padding-right: 15px; 
}

.red-line-divider {
  flex-shrink: 0;
  width: 2px;
  background-color: var(--thread);
  opacity: 0.6;
  border-radius: 2px;
}

.image-side {
  flex: 1;
  width: 50%;
  display: flex;
  flex-direction: column; 
  justify-content: center;
  align-items: center;
  gap: 15px; 
}

.mithrun-img {
  max-width: 100%;
  height: auto;
  transform: rotate(2deg); 
}

header.masthead {
  margin: 0 0 22px;
}
.header-img {
  width: 100%;
  max-width: 450px;
  display: block;
  margin-bottom: 15px;
  border-radius: 4px;
}
header.masthead h1 {
  font-family: 'Caveat', cursive;
  font-size: 3.2rem;
  line-height: 1;
  margin: 0 0 4px;
  color: var(--thread);
  transform: rotate(-1deg);
}
header.masthead p.tagline {
  font-family: 'Special Elite', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin: 0;
  text-transform: uppercase;
}

.intro-box {
  background: url('images/this is a text box.jpg') center/100% 100% no-repeat;
  padding: 50px 60px 60px 40px;
  margin: 20px 0 10px;
  font-size: 1.02rem;
  line-height: 1.6;
  text-align: center;
  transform: rotate(1deg);
}
.intro-box p { margin: 0 0 14px; }
.intro-box .signature {
  font-family: 'Caveat', cursive;
  font-size: 1.6rem;
  color: var(--thread);
  margin-top: 10px;
  display: block;
}

/* ---------- Wrappers & Dividers ---------- */
.divider-wrapper {
  position: relative;
  margin: 35px 0 15px 0;
}
.little-green-apple {
  position: absolute;
  right: 15px;
  bottom: 5px; 
  width: 45px;
  z-index: 5;
}
.divider-crayon {
  height: 25px;
  background: url('images/aanother cute divider.png') repeat-x center/contain;
}

/* ---------- Gallery Title ---------- */
.gallery-title {
  text-align: center;
  margin-bottom: 15px;
}
.gallery-title h2 {
  font-family: 'Caveat', cursive;
  font-size: 2.5rem;
  color: var(--thread);
  margin: 0;
  line-height: 1;
  transform: rotate(-1deg);
}
.gallery-title p {
  font-family: 'Special Elite', monospace;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 5px 0 0 0;
  text-transform: uppercase;
}

/* ---------- Gallery ---------- */
.gallery {
  display: flex;
  gap: 22px;
  margin: 10px 0 8px; 
  flex-wrap: wrap;
  justify-content: center; 
}
.polaroid {
  background: #fff;
  padding: 10px 10px 28px;
  box-shadow: 0 4px 10px rgba(43,59,30,0.28);
  width: 130px;
}
.polaroid:nth-child(1) { transform: rotate(-4deg); }
.polaroid:nth-child(2) { transform: rotate(3deg); }
.polaroid:nth-child(3) { transform: rotate(-2deg); }
.polaroid:nth-child(4) { transform: rotate(1.5deg); }

.polaroid .frame {
  width: 100%;
  aspect-ratio: 1/1;
  background: #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.polaroid .frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.polaroid .caption {
  font-family: 'Caveat', cursive;
  font-size: 1.1rem;
  text-align: center;
  margin-top: 8px;
  color: var(--ink-soft);
}
.polaroid::before {
  content: "";
  position: absolute;
  width: 46px; height: 18px;
  margin-top: -24px; margin-left: 40px;
  background: rgba(184, 232, 137, 0.75); 
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.polaroid { position: relative; }

/* ---------- Bottom Bush Footer ---------- */
.bush-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 45px;
  background: url('images/tumblr_5925c2f051adbd33d1c688f7760ca432_30152f99_2048.png') repeat-x bottom left;
  border-bottom-left-radius: 2px;
  border-bottom-right-radius: 2px;
  z-index: 5; 
}

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 220px 0 0 0; 
  margin-left: -6px;
  z-index: 2;
}

.tab {
  position: relative;
  display: flex;
  align-items: center;
  height: 52px;
  width: 64px;
  background: var(--tab-color, var(--tape-rose));
  color: #2b3b1e;
  text-decoration: none;
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 1.15rem;
  padding: 0 14px;
  box-shadow: 2px 3px 6px rgba(43,59,30,0.3);
  clip-path: polygon(0 6%, 100% 0, 100% 94%, 0 100%);
  transition: width 0.28s ease, transform 0.28s ease;
  overflow: hidden;
  white-space: nowrap;
}
.tab:nth-child(1) { --tab-color: var(--tape-rose);   transform: rotate(-1.5deg); }
.tab:nth-child(2) { --tab-color: var(--tape-sage);   transform: rotate(1deg); }
.tab:nth-child(3) { --tab-color: var(--tape-mustard);transform: rotate(-1deg); }
.tab:nth-child(4) { --tab-color: var(--tape-sky);    transform: rotate(1.5deg); }
.tab:nth-child(5) { --tab-color: var(--tape-plum);   transform: rotate(-0.8deg); }
.tab:nth-child(6) { --tab-color: var(--tape-clay);   transform: rotate(0.8deg); }

.tab .icon {
  flex: none;
  font-size: 1.3rem;
  line-height: 1;
}
.tab .label {
  flex: none;
  margin-left: 10px;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s ease 0.05s, transform 0.2s ease 0.05s;
}

.tab:hover,
.tab.expanded {
  width: 172px;
  transform: translateX(-8px) rotate(0deg) !important;
}
.tab:hover .label,
.tab.expanded .label {
  opacity: 1;
  transform: translateX(0);
}

.tab:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .tab { transition: none; }
  .tab .label { transition: none; }
}

@media (max-width: 760px) {
  .board { flex-direction: column; align-items: stretch; }
  .notebook { padding: 130px 24px 70px 54px; transform: none; }
  .spiral { left: -10px; }
  .tabs {
    flex-direction: row;
    flex-wrap: wrap;
    margin: 22px 0 0 0;
    padding: 0; 
    justify-content: center;
  }
  .tab { transform: none !important; width: 56px; }
  .tab:hover, .tab.expanded { width: 150px; }
}

/* ---------- Audio Player ---------- */
.cute-player {
  width: 220px;
  height: 45px;
  border: 2px dashed var(--thread); 
  border-radius: 25px; 
  box-shadow: 2px 3px 0px rgba(217, 74, 74, 0.4); 
  outline: none;
}

.cute-player::-webkit-media-controls-enclosure {
  background-color: var(--tape-rose); 
  border-radius: 25px;
}

/* ---------- Bottom Apple Links ---------- */
.apple-links-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 60px;
  width: 100%;
  max-width: 920px;
  margin-top: 50px; 
  z-index: 10;
}

.apple-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none; 
  transition: transform 0.2s ease;
}

.apple-link:hover {
  transform: translateY(-6px);
}

.hover-apple {
  width: 70px; 
  height: auto;
  margin-bottom: 12px;
  filter: drop-shadow(0px 4px 6px rgba(0,0,0,0.15));
}

.apple-link-text {
  font-family: 'Caveat', cursive;
  font-size: 1.5rem;
  color: var(--ink);
  background: rgba(248, 250, 242, 0.9); 
  padding: 4px 18px;
  border-radius: 20px;
  border: 2px dashed var(--tape-sage);
  margin: 0;
  white-space: nowrap;
}