:root {
    --rose: #b5838d;
    --rose-dark: #8f636d;
    --cream: #fffaf7;
    --sand: #f3e9e4;
    --charcoal: #3d3436;
    --muted: #857b7d;
}

body {
    font-family: 'Lato', -apple-system, 'Segoe UI', sans-serif;
    font-weight: 300;
    color: var(--charcoal);
    background: var(--cream);
}

h1, h2, h3, h4, h5, .navbar-brand {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    letter-spacing: 0.01em;
}

a { color: var(--rose-dark); }
a:hover { color: var(--charcoal); }

/* --- navigation --------------------------------------------------------- */

.site-nav {
    background: rgba(255, 250, 247, 0.96);
    border-bottom: 1px solid var(--sand);
    backdrop-filter: blur(6px);
}

.navbar-brand {
    font-size: 1.6rem;
    color: var(--charcoal) !important;
}

.site-nav .nav-link {
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-size: 0.78rem;
    color: var(--charcoal) !important;
    padding: 0.5rem 0.9rem !important;
}

.site-nav .nav-link:hover { color: var(--rose-dark) !important; }

/* --- buttons ------------------------------------------------------------ */

.btn-primary {
    background: var(--rose);
    border-color: var(--rose);
}

/* The brand shape, kept in its own rule and off .btn-sm.
   This file loads after Bootstrap and these selectors carry the same
   specificity as .btn-sm, so putting the padding and font-size on .btn-primary
   itself silently won: a `btn btn-primary btn-sm` came out full height while
   its btn-sm neighbours in the same .btn-group did not, and the staff button
   groups did not line up. Colour above applies everywhere; only the shape is
   scoped. */
.btn-primary:not(.btn-sm) {
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.78rem;
    padding: 0.6rem 1.4rem;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:not(:disabled):not(.disabled):active {
    background: var(--rose-dark);
    border-color: var(--rose-dark);
}

.btn-outline-primary {
    color: var(--rose-dark);
    border-color: var(--rose);
}

.btn-outline-primary:hover {
    background: var(--rose);
    border-color: var(--rose);
}

/* --- hero --------------------------------------------------------------- */

.hero {
    position: relative;
    min-height: 68vh;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-color: var(--sand);
    color: #fff;
    text-align: center;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(61, 52, 54, 0.25), rgba(61, 52, 54, 0.5));
}

.hero-inner { position: relative; z-index: 1; width: 100%; }

.hero h1 {
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
    margin-bottom: 0.5rem;
}

.hero p.lead {
    font-weight: 300;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}

.page-header {
    background: var(--sand);
    padding: 3.5rem 0;
    text-align: center;
}

.page-header h1 { margin-bottom: 0.25rem; }

/* An intro sitting under the title in the header - the Enquiries page puts
   its CMS intro there. .rich-text is a 46rem block, so it needs centring in
   its own right: the header centres the text inside it, not the box. The
   trailing paragraph margin goes too, or the band gains half a blank line. */
.page-header .rich-text { margin-left: auto; margin-right: auto; }
.page-header .rich-text p:last-child { margin-bottom: 0; }

/* --- gallery ------------------------------------------------------------ */

.cake-card {
    display: block;
    background: #fff;
    border: 1px solid var(--sand);
    overflow: hidden;
    height: 100%;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    color: inherit;
}

.cake-card:hover {
    box-shadow: 0 12px 30px rgba(61, 52, 54, 0.14);
    transform: translateY(-3px);
    text-decoration: none;
    color: inherit;
}

.cake-card-image {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    display: block;
    background: var(--sand);
}

.cake-card-body { padding: 1rem 1.1rem 1.25rem; }
.cake-card-body h3 { font-size: 1.3rem; margin-bottom: 0.2rem; }
.cake-card-body .summary { font-size: 0.88rem; color: var(--muted); }

.category-filter .btn {
    border-radius: 2rem;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0.25rem 0.5rem 0;
}

/* --- content blocks ----------------------------------------------------- */

.block-heading { margin-top: 2.5rem; }
.rich-text { max-width: 46rem; }
.rich-text p { line-height: 1.8; }

figure.photo-block { margin: 2.5rem 0; }
figure.photo-block img { width: 100%; height: auto; }
figure.photo-block figcaption {
    font-size: 0.85rem;
    color: var(--muted);
    padding-top: 0.5rem;
    font-style: italic;
}

.photo-row img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.testimonial {
    border-left: 3px solid var(--rose);
    padding: 0.5rem 0 0.5rem 1.5rem;
    margin: 2.5rem 0;
    max-width: 44rem;
}

.testimonial blockquote {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.4rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.testimonial .attribution { font-size: 0.85rem; color: var(--muted); }

.price-guide table { max-width: 34rem; }
.price-guide td { border-top: 1px solid var(--sand); padding: 0.6rem 0; }
.price-guide td:last-child { text-align: right; white-space: nowrap; }

.price-calc { max-width: 44rem; }

.price-calc-panel {
    background: #fff;
    border: 1px solid var(--sand);
    padding: 1.5rem 1.5rem 1rem;
}

/* Bootstrap's .form-row is display:flex, which outranks the browser's own
   [hidden] rule - without this the flavour row never hides for a fruit cake. */
.price-calc [hidden] { display: none !important; }

.price-calc-panel label,
.price-calc-panel legend {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.price-calc-panel .custom-control-label {
    letter-spacing: 0;
    text-transform: none;
    font-size: 0.95rem;
    color: var(--charcoal);
}

.price-calc-panel select { border-color: var(--sand); }
.price-calc-panel select:focus {
    border-color: var(--rose);
    box-shadow: 0 0 0 0.2rem rgba(181, 131, 141, 0.2);
}

.price-calc-result {
    background: var(--sand);
    padding: 1.25rem 1.5rem;
    text-align: center;
}

.price-calc-result .calc-total {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2.2rem;
    line-height: 1.1;
    color: var(--rose-dark);
}

.price-calc-result .calc-portions { font-size: 0.95rem; }

.cta-band {
    background: var(--sand);
    padding: 3rem 1rem;
    text-align: center;
    margin: 3rem 0;
}

/* --- order pages -------------------------------------------------------- */

.order-panel {
    background: #fff;
    border: 1px solid var(--sand);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.order-panel h2, .order-panel h3 { font-size: 1.35rem; }

/* The guide price beside the enquiry form, on a wide screen. Sticky, so it
   stays level with the cake questions; the offset clears the sticky navbar. */
@media (min-width: 992px) {
    .enquiry-estimate {
        position: sticky;
        top: 6rem;
    }
}

/* The panel itself, matching .order-panel rather than a bootstrap alert -
   which also means the phone copy below can take the box off it. A bootstrap
   .border could not be overridden here at all: that utility is !important. */
.guide-price {
    background: #fff;
    border: 1px solid var(--sand);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

/* The phone copy, immediately above the send button. Same markup as the box
   beside the form - one ajax reply fills both - with the box taken off it, so
   it reads as a line of text at the point the price actually matters. */
.enquiry-estimate-inline .guide-price {
    background: none;
    border: 0;
    padding: 0;
}

.timeline { list-style: none; padding-left: 0; margin: 0; }

.timeline li {
    border-left: 2px solid var(--sand);
    padding: 0 0 1rem 1.25rem;
    position: relative;
}

.timeline li::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--rose);
}

.timeline li.done::before { background: #7fa87f; }

.message {
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    border-radius: 4px;
    max-width: 85%;
}

.message.from-becca { background: var(--sand); }
.message.from-customer { background: #eef3ef; margin-left: auto; }
.message .meta { font-size: 0.75rem; color: var(--muted); }

.amount-due {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2.4rem;
    color: var(--rose-dark);
}

/* --- staff area --------------------------------------------------------- */

.staff-body { background: #f6f6f7; }
.staff-nav { background: var(--charcoal); }
.staff-nav .navbar-brand, .staff-nav .nav-link { color: #fff !important; }
.staff-panel { background: #fff; border: 1px solid #e2e2e4; padding: 1.25rem; margin-bottom: 1.25rem; }
.staff-panel h2 { font-size: 1.2rem; margin-bottom: 1rem; }
.staff-table td { vertical-align: middle !important; }

/* --- staff calendar ----------------------------------------------------- */

/* Fixed layout so one busy day cannot stretch its column and skew the week.
   The cells carry their own height instead. */
.staff-calendar { table-layout: fixed; }

.staff-calendar th { width: 14.28%; text-align: center; letter-spacing: 0.06em; }

.calendar-day {
    height: 7.5rem;
    vertical-align: top !important;
    padding: 0.35rem !important;
    overflow: hidden;
}

.calendar-date { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.2rem; }
.calendar-outside { background: #fafafb; }
.calendar-outside .calendar-date { opacity: 0.5; }

.calendar-today { box-shadow: inset 0 0 0 2px var(--rose); }
.calendar-today .calendar-date { color: var(--rose-dark); font-weight: 700; }

/* Diagonal hatching rather than a flat fill: a blocked day that also has a
   cake on it still has to show the cake's own badge colour clearly. */
.calendar-blocked {
    background: repeating-linear-gradient(
        45deg, #fbeff1, #fbeff1 6px, #f6e2e5 6px, #f6e2e5 12px);
}

.calendar-block { margin-bottom: 0.25rem; }
.calendar-block .btn { font-size: 0.68rem; padding: 0.1rem 0.35rem; }

.calendar-cake { margin-bottom: 0.25rem; }

.calendar-cake-link {
    display: block;
    text-align: left;
    white-space: normal;
    color: #fff !important;
    font-size: 0.72rem;
    line-height: 1.25;
}

.calendar-cake-meta { font-size: 0.66rem; color: var(--muted); }

@media (max-width: 767px) {
    .calendar-day { height: auto; min-height: 4.5rem; }
    .staff-calendar { min-width: 42rem; }
}

/* --- footer ------------------------------------------------------------- */

.site-footer {
    background: var(--sand);
    margin-top: 4rem;
}

.footer-heading {
    font-size: 1.1rem;
    letter-spacing: 0.04em;
    margin-bottom: 0.9rem;
}

.social-link {
    font-size: 1.4rem;
    margin-right: 0.9rem;
    color: var(--charcoal);
}

.social-link:hover { color: var(--rose-dark); }
