/*
 * Ivory — editorial wedding website (templates/ivory/index.php).
 * Warm ivory paper, Cormorant Garamond light + italics for the big type, Lato for the small print, thin rules.
 * Loaded after Bootstrap (which is only there for the shared layer's dialogs): everything here is .iv-* scoped.
 */
:root {
    --iv-bg: #f7f3ec;
    --iv-band: #efe8dd;
    --iv-ink: #2b2622;
    --iv-ink-2: #5e554c;
    --iv-mute: #978c80;
    --iv-rule: #dcd2c4;
    --iv-line: #8f8273;
    --iv-serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
    --iv-sans: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body.iv {
    margin: 0;
    background: var(--iv-bg);
    color: var(--iv-ink-2);
    font-family: var(--iv-sans);
    font-weight: 400;
    font-size: 15px;
    line-height: 1.85;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.iv h1, .iv h2, .iv h3, .iv p, .iv figure { margin: 0; }
.iv h1, .iv h2, .iv h3 { font-weight: 300; color: var(--iv-ink); }
.iv a { color: inherit; text-decoration: none; }
.iv img { display: block; max-width: 100%; }
.iv em { font-style: italic; }

/* ---- type ------------------------------------------------------------------------------------------------- */
.iv-eyebrow {
    font-family: var(--iv-sans);
    font-size: 10.5px;
    font-weight: 400;
    line-height: 1.7;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--iv-mute);
}
.iv-title {
    font-family: var(--iv-serif);
    font-weight: 300;
    font-size: clamp(2.35rem, 5.2vw, 3.7rem);
    line-height: 1.08;
    letter-spacing: -.005em;
    color: var(--iv-ink);
    overflow-wrap: anywhere;
}
.iv-text { font-size: 15px; line-height: 1.9; color: var(--iv-ink-2); overflow-wrap: anywhere; }
.iv-lead { font-family: var(--iv-serif); font-style: italic; font-size: 1.35rem; line-height: 1.5; color: var(--iv-ink-2); margin-top: 26px !important; }

/* ---- layout ----------------------------------------------------------------------------------------------- */
.iv-wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.iv-wrap--wide { max-width: 1340px; }
.iv-section { padding: clamp(84px, 11vw, 150px) 0; }
.iv-head { text-align: center; margin: 0 auto clamp(52px, 7vw, 92px); max-width: 720px; }
.iv-head .iv-eyebrow { margin-bottom: 18px; }
.iv-head::after { content: ""; display: block; width: 1px; height: 46px; margin: 30px auto 0; background: var(--iv-line); opacity: .55; }

/* a photo with a thin line frame offset behind it */
.iv-frame { position: relative; isolation: isolate; }
.iv-frame img { position: relative; width: 100%; }
.iv-frame::before {
    content: "";
    position: absolute;
    inset: 14px -14px -14px 14px;
    border: 1px solid var(--iv-line);
    opacity: .6;
    z-index: -1;
    pointer-events: none;
}
@media (min-width: 992px) { .iv-frame::before { inset: 22px -22px -22px 22px; } }

/* ---- header (over the cover) ------------------------------------------------------------------------------ */
.iv-header {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 44px 64px 0;
    color: #fff;
    text-align: center;
}
.iv-mark {
    font-family: var(--iv-serif);
    font-size: 1.85rem;
    font-weight: 300;
    line-height: 1;
    letter-spacing: .06em;
    color: #fff !important;
    text-shadow: 0 1px 14px rgba(0, 0, 0, .18);
}
.iv-mark em { padding: 0 .12em; font-size: .9em; }
.iv-mark-title { display: block; max-width: calc(100vw - 150px); font-size: 1.35rem; font-style: italic; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iv-nav { display: none; }
@media (max-width: 991px) { .iv-mark-title.is-long { display: none; } }
.iv-nav a {
    font-size: 10px;
    letter-spacing: .32em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .92) !important;
    transition: opacity .2s;
}
.iv-nav a:hover { opacity: .7; }
@media (min-width: 992px) {
    .iv-header { padding-top: 58px; }
    .iv-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 40px; }
    .iv-mark { font-size: 2.1rem; }
}

/* ---- hero ------------------------------------------------------------------------------------------------- */
.iv-hero {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
    color: #fff;
    background-color: #b8ab9a; /* until the cover arrives */
}
.iv-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(24, 19, 15, .42) 0%, rgba(24, 19, 15, 0) 26%),
        linear-gradient(0deg, rgba(24, 19, 15, .6) 0%, rgba(24, 19, 15, .2) 34%, rgba(24, 19, 15, 0) 58%);
}
.iv-hero-frame { position: absolute; inset: 14px; border: 1px solid rgba(255, 255, 255, .78); pointer-events: none; }
@media (min-width: 768px) { .iv-hero-frame { inset: 22px; } }
.iv-hero-inner {
    position: relative;
    width: 100%;
    max-width: 1040px;
    padding: 0 34px clamp(78px, 13vh, 132px);
    animation: iv-rise 1.6s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes iv-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.iv-hero .iv-eyebrow { color: rgba(255, 255, 255, .92); margin-bottom: 20px; }
.iv-names {
    font-family: var(--iv-serif);
    font-weight: 300 !important;
    font-size: clamp(3.5rem, 9.4vw, 7.6rem);
    line-height: .98;
    letter-spacing: -.012em;
    color: #fff !important;
    text-shadow: 0 2px 34px rgba(0, 0, 0, .2);
    overflow-wrap: anywhere;
}
.iv-names .iv-amp { font-weight: 300; padding: 0 .06em; }
.iv-names.is-title { font-size: clamp(2.6rem, 6.6vw, 5.6rem); line-height: 1.05; }
.iv-hero-sub {
    margin-top: 24px !important;
    font-family: var(--iv-serif);
    font-style: italic;
    font-size: clamp(1.2rem, 2.1vw, 1.55rem);
    line-height: 1.45;
    color: rgba(255, 255, 255, .95);
    text-shadow: 0 1px 14px rgba(0, 0, 0, .25);
}
.iv-hero .wedz-actions { margin-top: 30px; gap: 14px 30px !important; }
.iv-hero-btn {
    background: none;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .85);
    border-radius: 0;
    padding: 6px 1px 5px;
    color: #fff;
    font: 400 10.5px/1.5 var(--iv-sans);
    letter-spacing: .3em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity .2s;
}
.iv-hero-btn:hover { opacity: .75; }
@media (max-width: 767px) {
    .iv-names span, .iv-names .iv-amp { display: block; }
    .iv-names .iv-amp { font-size: .62em; line-height: 1.25; }
    .iv-hero-inner { padding: 0 28px 92px; }
}

/* the band under the cover */
.iv-band {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2px 22px;
    padding: 20px 24px;
    background: var(--iv-band);
    font-family: var(--iv-serif);
    font-style: italic;
    font-size: 1.15rem;
    line-height: 1.5;
    color: var(--iv-ink);
    text-align: center;
}
.iv-band-sep { display: none; width: 28px; height: 1px; background: var(--iv-line); opacity: .7; }
@media (min-width: 768px) { .iv-band { padding: 24px; font-size: 1.2rem; } .iv-band-sep { display: block; } }
@media (max-width: 767px) { .iv-band > span:not(.iv-band-sep) { flex-basis: 100%; } }

/* ---- the couple ------------------------------------------------------------------------------------------- */
.iv-pair { display: grid; grid-template-columns: 1fr; row-gap: 40px; }
.iv-person { width: 100%; max-width: 470px; }
.iv-person .iv-frame { width: 80%; margin-bottom: 40px; }
.iv-person .iv-frame img { aspect-ratio: 4 / 5; object-fit: cover; }
.iv-person-name { font-family: var(--iv-serif); font-size: clamp(2.2rem, 4.2vw, 3rem); line-height: 1.08; margin: 10px 0 16px !important; overflow-wrap: anywhere; }
.iv-person--1 { margin-left: auto; }
.iv-person--1 .iv-frame { margin-left: auto; }
.iv-person--1 .iv-frame::before { inset: 14px 14px -14px -14px; }
.iv-pair-amp { font-family: var(--iv-serif); font-style: italic; font-weight: 300; font-size: 4.6rem; line-height: 1; color: var(--iv-line); text-align: center; opacity: .8; }
@media (min-width: 992px) {
    .iv-pair { grid-template-columns: minmax(0, 5fr) minmax(0, 2fr) minmax(0, 5fr); align-items: start; }
    .iv-person { max-width: none; }
    .iv-person .iv-frame { width: 100%; margin-bottom: 52px; }
    .iv-person--1 { margin-left: 0; }
    .iv-pair:not(.both-pics) { align-items: center; }
    .iv-pair.both-pics .iv-person--1 { margin-top: 200px; } /* staggered: only when both have a portrait */
    .iv-person--1 .iv-frame::before { inset: 22px 22px -22px -22px; }
    .iv-pair-amp { align-self: center; font-size: 6.4rem; }
}

/* ---- the date + countdown --------------------------------------------------------------------------------- */
.iv-date { background: var(--iv-band); }
.iv-date-grid { display: grid; grid-template-columns: 1fr; gap: 64px; align-items: center; }
.iv-date-pic { width: 88%; }
.iv-date-pic img { max-height: 760px; object-fit: cover; }
.iv-date-text { text-align: center; }
.iv-date-text .iv-eyebrow { margin-bottom: 20px; }
.iv-date-venue { margin-top: 30px !important; font-family: var(--iv-serif); font-style: italic; font-size: 1.2rem; color: var(--iv-ink-2); }
.iv-count { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 500px; margin: 46px auto 0; }
.iv-count > div { padding: 2px 4px; border-left: 1px solid var(--iv-rule); }
.iv-count > div:first-child { border-left: 0; }
.iv-count .time {
    display: block;
    font-family: var(--iv-serif);
    font-weight: 300;
    font-size: clamp(2.5rem, 7vw, 3.7rem);
    line-height: 1;
    color: var(--iv-ink);
    font-variant-numeric: lining-nums tabular-nums;
}
.iv-count-label { display: block; margin-top: 12px; font-size: 9.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--iv-mute); }
@media (min-width: 992px) {
    .iv-date-grid.has-pic { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 100px; }
    .iv-date-pic { width: 100%; }
}

/* ---- our story: a collage, the card over the photo -------------------------------------------------------- */
.iv-story { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); margin-bottom: 92px; }
.iv-story:last-child { margin-bottom: 0; }
.iv-story-pic img { aspect-ratio: 3 / 2; object-fit: cover; }
.iv-story.is-flip .iv-story-pic { width: 86%; margin-left: auto; }
.iv-story.is-flip .iv-story-pic img { aspect-ratio: 4 / 5; }
.iv-story.is-flip .iv-story-pic::before { inset: 14px 14px -14px -14px; }
.iv-story-card { position: relative; z-index: 1; background: var(--iv-bg); margin: -52px 0 0 22px; padding: 30px 26px 4px; }
.iv-story.is-flip .iv-story-card { margin: -52px 22px 0 0; }
.iv-story.no-img .iv-story-card { margin: 0 auto; max-width: 640px; text-align: center; padding: 0; }
.iv-story-num { font-family: var(--iv-serif); font-style: italic; font-size: 1.25rem; line-height: 1; color: var(--iv-line); margin-bottom: 14px !important; }
.iv-story-title { font-family: var(--iv-serif); font-size: clamp(2rem, 3.6vw, 2.75rem); line-height: 1.1; overflow-wrap: anywhere; }
.iv-story-date { margin-top: 12px !important; }
.iv-story-card .iv-text { margin-top: 18px !important; }
@media (min-width: 992px) {
    .iv-story { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: center; margin-bottom: 170px; }
    .iv-story-pic { grid-column: 1 / span 7; grid-row: 1; }
    .iv-story-card { grid-column: 7 / span 6; grid-row: 1; margin: 150px 0 0 0; padding: 56px 58px 50px; }
    .iv-story.is-flip .iv-story-pic { grid-column: 7 / span 5; width: 100%; margin: 0; }
    .iv-story.is-flip .iv-story-pic::before { inset: 22px 22px -22px -22px; }
    .iv-story.is-flip .iv-story-card { grid-column: 2 / span 6; margin: 0 0 120px; }
    .iv-story.no-img .iv-story-card { grid-column: 3 / span 8; margin: 0; padding: 0; }
}

/* ---- gallery (live/app.js lays it out with Masonry; the widths are live/custom.css's) ----------------------- */
.iv-gallery { padding-top: clamp(40px, 6vw, 90px); }
.iv-stories + .iv-gallery { padding-top: clamp(84px, 11vw, 150px); }
#lgallery.iv-masonry { margin: 0 -5px; }
#lgallery.iv-masonry .grid-item { padding: 5px; }
#lgallery.iv-masonry .grid-item img { width: 100%; height: auto; transition: opacity .3s; }
#lgallery.iv-masonry .grid-item:hover img { opacity: .9; }
@media (min-width: 992px) {
    #lgallery.iv-masonry { margin: 0 -8px; }
    #lgallery.iv-masonry .grid-item { padding: 8px; }
}
/* one or two photos: centred, not a row with gaps */
#lgallery.iv-masonry.few-1 { max-width: 560px; margin: 0 auto; }
#lgallery.iv-masonry.few-2 { max-width: 1000px; margin: 0 auto; }
#lgallery.few-1 .grid-item { width: 100%; }
#lgallery.few-2 .grid-item { width: 50%; }

/* ---- when & where ----------------------------------------------------------------------------------------- */
.iv-venues { border-top: 1px solid var(--iv-rule); }
.iv-venue-row { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--iv-rule); border-bottom: 1px solid var(--iv-rule); }
.iv-venue { padding: 46px 6px; text-align: center; }
.iv-venue + .iv-venue { border-top: 1px solid var(--iv-rule); }
.iv-venue-name { font-family: var(--iv-serif); font-weight: 400 !important; font-size: 1.75rem; line-height: 1.2; margin: 16px 0 12px !important; overflow-wrap: anywhere; }
.iv-link {
    display: inline-block;
    margin-top: 24px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--iv-ink);
    font-size: 10px;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--iv-ink) !important;
    transition: opacity .2s;
}
.iv-link:hover { opacity: .65; }
@media (min-width: 768px) {
    .iv-venue-row.n-1 { max-width: 620px; margin: 0 auto; }
    .iv-venue-row.n-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .iv-venue-row.n-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .iv-venue { padding: 60px 40px; }
    .iv-venue + .iv-venue { border-top: 0; border-left: 1px solid var(--iv-rule); }
}

/* ---- footer ----------------------------------------------------------------------------------------------- */
.iv-footer { padding: clamp(80px, 10vw, 130px) 24px 64px; text-align: center; border-top: 1px solid var(--iv-rule); }
.iv-band + .iv-footer, .iv-date + .iv-footer { border-top: 0; }
.iv-footer-names { font-family: var(--iv-serif); font-weight: 300; font-size: clamp(2.4rem, 5vw, 3.4rem); line-height: 1.1; color: var(--iv-ink); margin-bottom: 14px !important; overflow-wrap: anywhere; }
.iv-footer-rule { display: block; width: 1px; height: 46px; margin: 34px auto; background: var(--iv-line); opacity: .55; }
.iv-credit { font-size: 12px; line-height: 1.8; letter-spacing: .04em; color: var(--iv-mute); }
.iv-credit a { color: var(--iv-ink-2) !important; border-bottom: 1px solid var(--iv-rule); }
