/* ==========================================================
   FlowerBlue — blue flower picture gallery (flowerblue.online)
   ========================================================== */

/* Self-hosted variable fonts (latin subset). "optional" = no layout shift. */
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: optional;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: optional;
}

:root {
  --azure: #2d6cdf;
  --azure-deep: #1e4fb8;
  --cobalt: #12327e;
  --cornflower: #6c9bf5;
  --sky: #bfd6ff;
  --mist: #e7efff;
  --page: #f5f8ff;
  --paper: #ffffff;
  --ink: #0c1633;
  --ink-soft: #52618a;
  --line: #d9e4fb;
  --leaf: #2e6b52;
  --leaf-soft: #e2f0e9;
  --pollen: #f5c451;
  --radius: 20px;
  --radius-sm: 13px;
  --shadow: 0 22px 46px -22px rgba(12, 34, 92, .45);
  --shadow-soft: 0 10px 26px -14px rgba(12, 34, 92, .32);
  --serif: "Fraunces", "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 86px; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.66;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--azure-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--cobalt); }

h1, h2, h3 { font-family: var(--serif); line-height: 1.12; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.012em; }
h2 { font-size: clamp(2rem, 3.6vw, 2.95rem); }
h3 { font-size: 1.32rem; }
p { margin: 0 0 1em; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--cobalt); color: #fff; padding: 9px 15px; border-radius: 8px; z-index: 100;
}
.skip:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--azure); outline-offset: 3px; border-radius: 6px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .77rem; font-weight: 700; letter-spacing: .17em; text-transform: uppercase;
  color: var(--azure); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--cornflower); border-radius: 2px; }

.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-head { max-width: 720px; margin-bottom: 46px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow::after { content: ""; width: 28px; height: 2px; background: var(--cornflower); border-radius: 2px; }
.section-head p { color: var(--ink-soft); font-size: 1.08rem; }

.hl { position: relative; white-space: nowrap; }
.hl::after {
  content: ""; position: absolute; left: -.04em; right: -.04em; bottom: .07em; height: .34em;
  background: linear-gradient(90deg, var(--sky), var(--cornflower));
  border-radius: .2em; z-index: -1;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 27px; border-radius: 999px;
  font-weight: 650; font-size: .98rem; text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn-blue { background: var(--azure); color: #fff; box-shadow: 0 12px 26px -12px rgba(45, 108, 223, .95); }
.btn-blue:hover { background: var(--azure-deep); color: #fff; transform: translateY(-2px); }
.btn-ghost { border: 2px solid var(--line); color: var(--ink); background: var(--paper); }
.btn-ghost:hover { border-color: var(--azure); color: var(--azure-deep); transform: translateY(-2px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 248, 255, .84);
  backdrop-filter: saturate(170%) blur(14px);
  -webkit-backdrop-filter: saturate(170%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 8px 24px -20px rgba(12, 34, 92, .7); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo svg { width: 38px; height: 38px; transition: transform .7s cubic-bezier(.2, .8, .2, 1); }
.logo:hover svg { transform: rotate(60deg); }
.logo-text { font-family: var(--serif); font-size: 1.48rem; font-weight: 600; letter-spacing: -.025em; }
.logo-text b { color: var(--azure); font-weight: 700; }

.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 14px; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 550; font-size: .95rem;
}
.nav-links a:hover { background: var(--mist); color: var(--azure-deep); }
.nav-cta { padding: 10px 20px; font-size: .92rem; }

.menu-toggle {
  display: none; width: 44px; height: 44px; border: 0; border-radius: 12px;
  background: var(--mist); cursor: pointer; padding: 0;
}
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  display: block; width: 20px; height: 2px; background: var(--ink); margin: 0 auto;
  position: relative; transition: transform .25s, background .25s; content: "";
}
.menu-toggle span::before { position: absolute; top: -6px; }
.menu-toggle span::after { position: absolute; top: 6px; }
.menu-open .menu-toggle span { background: transparent; }
.menu-open .menu-toggle span::before { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 6vw, 84px) 0 clamp(56px, 8vw, 96px); }
.hero::before {
  content: ""; position: absolute; inset: -28% -12% auto auto; width: 72vw; height: 72vw;
  max-width: 940px; max-height: 940px; z-index: -1;
  background: radial-gradient(circle, rgba(108, 155, 245, .38), rgba(108, 155, 245, 0) 66%);
}
.hero::after {
  content: ""; position: absolute; left: -14%; bottom: -30%; width: 54vw; height: 54vw;
  max-width: 660px; max-height: 660px; z-index: -1;
  background: radial-gradient(circle, rgba(191, 214, 255, .5), rgba(191, 214, 255, 0) 68%);
}
.hero-grid { display: grid; grid-template-columns: 1.04fr .96fr; gap: clamp(32px, 5vw, 70px); align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 5.4vw, 4.4rem); margin-bottom: 22px; }
.hero-lead { font-size: 1.17rem; color: var(--ink-soft); max-width: 545px; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }

.stats { display: flex; gap: clamp(20px, 4vw, 46px); list-style: none; padding: 0; margin: 0; }
.stats strong { display: block; font-family: var(--serif); font-size: 2rem; line-height: 1; color: var(--cobalt); }
.stats span { font-size: .85rem; color: var(--ink-soft); }

/* Hero collage */
.hero-art { position: relative; }
.hero-photo {
  margin: 0; border-radius: var(--radius) var(--radius) 170px 170px; overflow: hidden;
  box-shadow: var(--shadow); aspect-ratio: 4 / 5; background: var(--mist);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-badge {
  position: absolute; right: -22px; bottom: 54px;
  display: flex; align-items: center; gap: 12px;
  background: var(--paper); padding: 13px 18px; border-radius: 18px; box-shadow: var(--shadow-soft);
  font-size: .9rem; line-height: 1.32; animation: float 7s ease-in-out infinite;
}
.hero-badge img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; }
.hero-badge b { display: block; font-size: 1rem; }
.hero-badge span { color: var(--ink-soft); }
.hero-chip {
  position: absolute; left: -20px; top: 34px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--cobalt); color: #fff; padding: 9px 16px; border-radius: 999px;
  font-size: .8rem; font-weight: 650; letter-spacing: .02em; box-shadow: var(--shadow-soft);
}
.hero-chip svg { width: 17px; height: 17px; flex: none; }
.hero-petal { position: absolute; right: 16px; top: -14px; width: 84px; height: 84px; animation: spin 26s linear infinite; opacity: .95; }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Keyword ribbon ---------- */
.ribbon { background: var(--cobalt); color: var(--sky); overflow: hidden; padding: 15px 0; }
.ribbon-track { display: flex; width: max-content; animation: marquee 44s linear infinite; }
.ribbon ul { display: flex; list-style: none; margin: 0; padding: 0; }
.ribbon li { display: flex; align-items: center; gap: 22px; padding-right: 22px; font-family: var(--serif); font-size: 1.32rem; white-space: nowrap; }
.ribbon li::after { content: "❋"; color: var(--cornflower); font-size: 1rem; }
.ribbon:hover .ribbon-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Gallery ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 36px; }
.filter {
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink);
  padding: 9px 18px; border-radius: 999px; font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.filter:hover { border-color: var(--cornflower); transform: translateY(-1px); }
.filter[aria-pressed="true"] { background: var(--azure); border-color: var(--azure); color: #fff; }

.gallery { columns: 3 320px; column-gap: 24px; }
.photo {
  break-inside: avoid; margin: 0 0 24px; position: relative;
  border-radius: var(--radius); overflow: hidden; background: var(--mist);
  box-shadow: var(--shadow-soft);
}
.photo[hidden] { display: none; }
.photo a { display: block; position: relative; color: inherit; }
.photo img { width: 100%; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.photo:hover img { transform: scale(1.06); }
.photo figcaption {
  position: absolute; inset: auto 0 0 0; padding: 64px 20px 18px;
  background: linear-gradient(transparent, rgba(7, 18, 48, .86));
  color: #fff;
}
.photo figcaption h3 { font-size: 1.2rem; margin: 0 0 3px; }
.photo figcaption p { margin: 0; font-size: .86rem; opacity: .86; line-height: 1.45; }
.tag {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  background: rgba(255, 255, 255, .93); color: var(--cobalt);
  font-size: .71rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px;
}
.tag.rare { background: var(--cobalt); color: #fff; }
.zoom {
  position: absolute; top: 14px; right: 14px; z-index: 2; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; background: var(--azure); color: #fff; font-size: .95rem;
  opacity: 0; transform: scale(.8); transition: opacity .25s, transform .25s;
}
.photo:hover .zoom, .photo a:focus-visible .zoom { opacity: 1; transform: scale(1); }

/* ---------- Feature band ---------- */
.feature { position: relative; color: #fff; isolation: isolate; overflow: hidden; }
.feature > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.feature::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(6, 16, 44, .88) 0%, rgba(6, 16, 44, .55) 48%, rgba(6, 16, 44, .05) 82%);
}
.feature .wrap { padding: clamp(90px, 13vw, 170px) 0; }
.feature-box { max-width: 570px; }
.feature h2 { color: #fff; }
.feature p { color: rgba(255, 255, 255, .88); font-size: 1.1rem; }
.feature .eyebrow { color: var(--sky); }
.feature .eyebrow::before { background: var(--cornflower); }

/* ---------- Why blue is rare ---------- */
.rare { background: var(--cobalt); color: rgba(231, 239, 255, .84); }
.rare h2, .rare h3 { color: #fff; }
.rare .eyebrow { color: var(--sky); }
.rare .section-head p { color: rgba(231, 239, 255, .78); }
.rare-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 44px; }
.rare-stat {
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(191, 214, 255, .2);
  border-radius: var(--radius); padding: 30px 26px;
}
.rare-stat b {
  display: block; font-family: var(--serif); font-size: clamp(2.4rem, 4.4vw, 3.3rem);
  line-height: 1; color: var(--sky); margin-bottom: 10px; font-weight: 600;
}
.rare-stat h3 { font-family: var(--sans); font-size: 1.02rem; font-weight: 700; margin: 0 0 6px; }
.rare-stat p { margin: 0; font-size: .93rem; }
.rare-notes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px 44px; }
.rare-notes h3 { font-size: 1.22rem; }
.rare-notes p { margin: 0; }

/* ---------- Flower guide cards ---------- */
.guide { background: var(--paper); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 24px; }
.card {
  background: var(--page); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--cornflower); }
.card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin-bottom: 4px; }
.latin { font-style: italic; color: var(--ink-soft); font-size: .9rem; margin-bottom: 12px; }
.card-body p { font-size: .95rem; color: var(--ink-soft); }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding: 0; list-style: none; }
.meta li { font-size: .77rem; font-weight: 650; background: var(--mist); color: var(--cobalt); padding: 4px 10px; border-radius: 999px; }
.meta li.season { background: var(--leaf-soft); color: var(--leaf); }

/* ---------- Meaning ---------- */
.meaning-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 78px); align-items: center; }
.meaning-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.meaning-photos img { border-radius: var(--radius); object-fit: cover; width: 100%; height: 100%; box-shadow: var(--shadow-soft); }
.meaning-photos img:first-child { grid-row: span 2; aspect-ratio: 3 / 4.4; }
.meaning-photos img:not(:first-child) { aspect-ratio: 1; }
.symbols { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; }
.symbols li { display: flex; gap: 16px; align-items: flex-start; }
.symbols .ico {
  flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--mist); font-size: 1.35rem;
}
.symbols h3 { font-size: 1.08rem; margin: 2px 0; font-family: var(--sans); font-weight: 700; }
.symbols p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* ---------- Seasons ---------- */
.seasons { background: linear-gradient(180deg, var(--mist), var(--page)); }
.season-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.season {
  background: var(--paper); border-radius: var(--radius); padding: 28px 24px;
  box-shadow: var(--shadow-soft); position: relative; overflow: hidden;
}
.season::before {
  content: ""; position: absolute; right: -32px; top: -32px; width: 112px; height: 112px; border-radius: 50%;
  background: var(--cornflower); opacity: .16;
}
.season .when { font-size: .77rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--azure); }
.season h3 { margin: 6px 0 12px; }
.season ul { margin: 0; padding: 0; list-style: none; }
.season li { padding: 7px 0; border-top: 1px dashed var(--line); font-size: .94rem; }
.season li:first-child { border-top: 0; }

/* ---------- Palette ---------- */
.palette { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.swatch { border-radius: var(--radius-sm); overflow: hidden; background: var(--paper); box-shadow: var(--shadow-soft); }
.swatch i { display: block; height: 112px; }
.swatch div { padding: 12px 14px; font-size: .85rem; line-height: 1.35; }
.swatch b { display: block; font-size: .94rem; }
.swatch code { color: var(--ink-soft); font-size: .79rem; }

/* ---------- FAQ ---------- */
.faq { background: var(--paper); }
.faq-list { max-width: 820px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 46px 22px 0; position: relative;
  font-family: var(--serif); font-size: 1.24rem; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 50%; background: var(--mist); color: var(--cobalt);
  display: grid; place-items: center; font-family: var(--sans); font-size: 1.3rem;
  transition: transform .25s, background .25s, color .25s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); background: var(--azure); color: #fff; }
.faq details p { color: var(--ink-soft); padding-bottom: 20px; margin: 0; }

/* ---------- CTA ---------- */
.cta {
  background: linear-gradient(120deg, var(--azure), var(--cobalt));
  color: #fff; border-radius: 30px; padding: clamp(40px, 6vw, 72px);
  display: grid; grid-template-columns: 1.3fr .7fr; gap: 40px; align-items: center;
  position: relative; overflow: hidden;
}
.cta::after {
  content: ""; position: absolute; right: -70px; bottom: -80px; width: 310px; height: 310px;
  background: url("../images/flower-mark.svg") center / contain no-repeat; opacity: .22;
}
.cta h2 { margin-bottom: 14px; color: #fff; }
.cta p { font-size: 1.07rem; margin: 0; color: rgba(255, 255, 255, .9); }
.cta .btn { background: #fff; color: var(--cobalt); justify-self: end; position: relative; z-index: 1; }
.cta .btn:hover { background: var(--sky); color: var(--cobalt); transform: translateY(-2px); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(207, 222, 255, .76); padding: 70px 0 30px; margin-top: clamp(64px, 9vw, 110px); font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 44px; }
.site-footer .logo { color: #fff; margin-bottom: 14px; }
.site-footer h3 { font-family: var(--sans); font-size: .79rem; letter-spacing: .14em; text-transform: uppercase; color: var(--cornflower); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 4px 0; }
.site-footer a { color: rgba(207, 222, 255, .9); text-decoration: none; }
.site-footer a:hover { color: var(--cornflower); }
.credits { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 26px; font-size: .79rem; line-height: 1.75; color: rgba(207, 222, 255, .55); }
.credits a { color: rgba(207, 222, 255, .78); text-decoration: underline; }
.copy { margin-top: 18px; font-size: .81rem; color: rgba(207, 222, 255, .55); }

/* ---------- Lightbox ---------- */
.lightbox {
  border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); max-height: 92vh; overflow: visible;
}
.lightbox::backdrop { background: rgba(5, 12, 34, .9); backdrop-filter: blur(4px); }
.lightbox img { max-height: 80vh; width: auto; margin: 0 auto; border-radius: 16px; }
.lightbox p { color: #fff; text-align: center; margin: 14px 0 0; font-family: var(--serif); font-size: 1.18rem; }
.lb-btn {
  position: absolute; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--azure); color: #fff; font-size: 1.4rem; display: grid; place-items: center;
}
.lb-btn:hover { background: var(--cornflower); }
.lb-close { top: -18px; right: -18px; }
.lb-prev { left: -64px; top: 50%; transform: translateY(-50%); }
.lb-next { right: -64px; top: 50%; transform: translateY(-50%); }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .season-grid { grid-template-columns: repeat(2, 1fr); }
  .palette { grid-template-columns: repeat(3, 1fr); }
  .rare-grid { grid-template-columns: 1fr; }
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
}

@media (max-width: 880px) {
  .menu-toggle { display: block; }
  .nav-cta { display: none; }
  .nav-links {
    position: absolute; top: 74px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--page); border-bottom: 1px solid var(--line); padding: 10px 20px 20px;
    display: none;
  }
  .menu-open .nav-links { display: flex; }
  .nav-links a { padding: 12px 10px; border-radius: 10px; }

  .hero-grid, .meaning-grid, .cta, .footer-grid, .rare-notes { grid-template-columns: 1fr; }
  .hero-art { max-width: 450px; margin-inline: auto; width: 100%; }
  .hero-badge { right: 4px; }
  .hero-chip { left: 4px; }
  .hero-petal { right: 8px; }
  .cta .btn { justify-self: start; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .season-grid { grid-template-columns: 1fr; }
  .palette { grid-template-columns: repeat(2, 1fr); }
  .stats { gap: 18px; }
  .stats strong { font-size: 1.6rem; }
  .meaning-photos img:first-child { aspect-ratio: 3 / 4.6; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
