/* ==========================================================================
   lovely.day  --  cottagecore pastoral journal
   Palette:
     #faf5eb  morning cream (background)
     #f5ece0  golden cream  (evening)
     #3a3028  warm ink      (text)
     #c47a5a  terracotta    (accent / floral center)
     #8aaa78  sage green    (botanical)
     #d4cfc4  warm gray     (rules)
     #a89880  sandstone     (timestamps, secondary)
     #fce8b8  sunshine      (selection / highlight)
   Fonts: Caveat (display), Lora (body), Karla (timestamps)
   ========================================================================== */

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

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Golden-hour gradient: morning cream at top, golden cream at bottom */
body {
    font-family: 'Lora', Georgia, 'Times New Roman', serif;
    font-weight: 400;
    color: #3a3028;
    background: linear-gradient(180deg,
        #faf5eb 0%,
        #faf5eb 55%,
        #f5ece0 100%);
    background-attachment: fixed;
    min-height: 100vh;
    line-height: 2.0;
    position: relative;
    overflow-x: hidden;
}

/* Linen paper texture: barely-visible horizontal fiber lines */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(58, 48, 40, 0.025) 2px,
        rgba(58, 48, 40, 0.025) 3px
    );
    pointer-events: none;
    z-index: 1;
}

/* A soft warm vignette suggesting afternoon light through a cottage window */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 80% 10%, rgba(252, 232, 184, 0.25), transparent 60%),
        radial-gradient(ellipse 90% 70% at 20% 90%, rgba(196, 122, 90, 0.06), transparent 65%);
    pointer-events: none;
    z-index: 1;
}

::selection {
    background: #fce8b8;
    color: #3a3028;
}

/* ----- Page container ----- */
.page {
    position: relative;
    z-index: 2;
    max-width: 580px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

/* ==========================================================================
   The Morning Page (Hero)
   ========================================================================== */

.morning-page {
    text-align: center;
    padding: 1rem 0 2.5rem;
}

.leaf-ornament {
    width: 60px;
    margin: 0 auto 2rem;
    opacity: 0;
    transform: translateY(8px);
    animation: leafFade 1.6s ease-out 0.15s forwards;
}

.leaf-ornament svg {
    display: block;
    width: 100%;
    height: auto;
}

.leaf-ornament--bottom {
    margin: 2rem auto 1.5rem;
}

@keyframes leafFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-date {
    font-family: 'Caveat', 'Brush Script MT', cursive;
    font-weight: 700;
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    color: #3a3028;
    line-height: 1.2;
    letter-spacing: 0.005em;
    margin-bottom: 0.25rem;
    opacity: 0;
    transform: translateY(6px);
    animation: heroFade 1.4s ease-out 0.3s forwards;
}

.hero-domain {
    font-family: 'Lora', serif;
    font-style: italic;
    font-weight: 400;
    font-size: 0.9rem;
    color: #a89880;
    letter-spacing: 0.04em;
    margin-bottom: 1.75rem;
    opacity: 0;
    animation: heroFade 1.4s ease-out 0.5s forwards;
}

.hero-domain em {
    font-style: italic;
}

.hero-intro {
    font-family: 'Lora', serif;
    font-size: 1rem;
    font-style: italic;
    color: #3a3028;
    line-height: 1.9;
    max-width: 460px;
    margin: 1.5rem auto 0;
    opacity: 0;
    animation: heroFade 1.4s ease-out 0.7s forwards;
}

@keyframes heroFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Floral Divider (CSS-only 4-petal flower between rules)
   ========================================================================== */

.floral-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.75rem auto;
    max-width: 360px;
    opacity: 0;
    animation: dividerFade 1.2s ease-out forwards;
    animation-delay: 0.4s;
}

.floral-divider .rule {
    flex: 1;
    height: 1px;
    background: #d4cfc4;
}

/* CSS-only 4-petal flower: rotated rounded rect + ::before perpendicular petal
   + ::after small terracotta core */
.floral-divider .flower {
    position: relative;
    width: 12px;
    height: 12px;
    background: #c47a5a;
    transform: rotate(45deg);
    border-radius: 50% 2px 50% 2px;
    flex-shrink: 0;
}

.floral-divider .flower::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #c47a5a;
    border-radius: 2px 50% 2px 50%;
    transform: rotate(90deg);
}

.floral-divider .flower::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fce8b8;
    transform: translate(-50%, -50%) rotate(-45deg);
    box-shadow: 0 0 0 1px rgba(58, 48, 40, 0.08);
}

.floral-divider--evening {
    margin-top: 2.5rem;
    margin-bottom: 1.75rem;
}

@keyframes dividerFade {
    to { opacity: 1; }
}

/* ==========================================================================
   Journal Entries
   ========================================================================== */

.entries {
    padding: 0.5rem 0;
}

.entry {
    margin: 0 auto 2rem;
    padding-left: 0;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1.1s ease-out, transform 1.1s ease-out;
}

.entry.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.entry-time {
    font-family: 'Karla', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #a89880;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.25rem;
}

.entry-time::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 0.75rem;
    height: 1px;
    background: #d4cfc4;
    transform: translateY(-50%);
}

.entry-body {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 2.0;
    color: #3a3028;
    text-align: left;
    hyphens: auto;
}

.entry-body em {
    font-style: italic;
    color: #c47a5a;
}

.entry-body .hl {
    background: linear-gradient(180deg, transparent 65%, #fce8b8 65%, #fce8b8 95%, transparent 95%);
    padding: 0 0.1rem;
    border-radius: 1px;
}

/* Drop-cap on the very first entry, like a journal page opener */
.entries .entry:first-of-type .entry-body::first-letter {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    color: #c47a5a;
    font-size: 2.4rem;
    line-height: 1;
    float: left;
    padding: 0.35rem 0.5rem 0 0;
}

/* ==========================================================================
   The Evening (Footer)
   ========================================================================== */

.evening {
    margin-top: 1rem;
    padding: 1rem 0 0;
    text-align: center;
    position: relative;
}

.entry--closing {
    text-align: left;
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1.1s ease-out, transform 1.1s ease-out;
}

.entry--closing.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.tomorrow {
    margin: 0 auto 2rem;
    padding: 1.75rem 1.5rem;
    max-width: 460px;
    background: rgba(252, 232, 184, 0.35);
    border: 1px solid rgba(212, 207, 196, 0.7);
    border-radius: 2px;
    position: relative;
}

.tomorrow::before,
.tomorrow::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 1px solid #d4cfc4;
}
.tomorrow::before {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
}
.tomorrow::after {
    bottom: -1px;
    right: -1px;
    border-left: none;
    border-top: none;
}

.tomorrow-label {
    font-family: 'Karla', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #a89880;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.tomorrow-question {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: clamp(1.3rem, 3vw, 1.7rem);
    color: #3a3028;
    line-height: 1.35;
    cursor: pointer;
    transition: color 0.4s ease, transform 0.4s ease;
}

.tomorrow-question:hover {
    color: #c47a5a;
    transform: translateY(-1px);
}

.signoff {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: 1.4rem;
    color: #a89880;
    margin: 1.5rem 0 0.5rem;
    line-height: 1.4;
}

.signoff-name {
    color: #c47a5a;
    font-weight: 700;
}

.colophon {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 0.78rem;
    color: #a89880;
    letter-spacing: 0.08em;
    margin-top: 0.75rem;
}

.colophon em {
    color: #3a3028;
    font-style: italic;
}

/* ==========================================================================
   Responsive tuning
   ========================================================================== */

@media (max-width: 480px) {
    .page {
        padding: 2rem 1.25rem 3rem;
    }
    .hero-intro {
        font-size: 0.95rem;
    }
    .entry-body {
        font-size: 0.97rem;
        line-height: 1.95;
    }
    .floral-divider {
        gap: 0.75rem;
    }
    .tomorrow {
        padding: 1.4rem 1.1rem;
    }
}

@media (min-width: 1100px) {
    .page {
        padding-top: 4rem;
        padding-bottom: 5rem;
    }
}
