/* ------------------------------------------------------------------
   Central Indiana Orchid Society: shared styles for every page.
   Extracted from the approved design prototypes (Homepage v6, About,
   Membership, Member Center v1, Orchid Growing). Change colours here only.
   ------------------------------------------------------------------ */

:root {
  --forest: #23472d;
  --purple: #813b79;
  --cream: #fffaf0;
  --ink: #26372a;
  --sage: #eef1e5;
  --sage-deep: #e7eddb;
  --line: #d5ddcb;
  --nav-bg: #f8f3e5;
  --nav-rule: #9eaf65;
  --blush: #fff5f8;
  --lilac: #eee5ef;
  --muted: #635665;
  --focus: #b56ab1;
  --link-strong: #65335e;
}

/* ---- Base ---- */
* { box-sizing: border-box; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 17px/1.55 system-ui, sans-serif; }
h1, h2, h3 { font-family: Georgia, serif; line-height: 1.12; color: var(--forest); }
h2 { font-size: clamp(30px, 4vw, 42px); margin: 10px 0 18px; }
h3 { font-size: 25px; margin: 0 0 8px; }
a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
img { max-width: 100%; }
.wrap { width: min(1160px, calc(100% - 40px)); margin: auto; }
.section { padding: 42px 0; }
section { scroll-margin-top: 20px; }
.note { font-size: 14px; color: var(--muted); }
.tag, .eyebrow { color: var(--purple); font-weight: 800; text-transform: uppercase; letter-spacing: 1.4px; font-size: 13px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: white; padding: 12px; z-index: 10; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Header and navigation ---- */
header.site { background: var(--forest); color: white; }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 18px; padding: 24px 0; text-decoration: none; font: clamp(23px, 4vw, 38px)/1.1 Georgia, serif; }
.brand svg { width: 66px; flex-shrink: 0; }
.brand small { display: block; font: italic 17px Georgia, serif; margin-top: 8px; color: #e5eacb; }
.memberlink { border: 1px solid #c8d4b6; border-radius: 24px; padding: 10px 18px; text-decoration: none; font-weight: 650; white-space: nowrap; }

nav.main { background: var(--nav-bg); color: var(--forest); border-bottom: 2px solid var(--nav-rule); }
nav.main .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
nav.main a { font-weight: 650; text-decoration: none; padding: 13px 8px; }
nav.main a:hover { text-decoration: underline; }
nav.main a[aria-current] { text-decoration: underline; text-underline-offset: 5px; }
.menu { display: none; }

/* ---- Buttons ---- */
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 23px; border-radius: 28px; background: var(--purple); color: white; text-decoration: none; font-weight: 700; border: 0; font-size: inherit; cursor: pointer; }
.btn.alt { background: var(--cream); border: 1px solid var(--forest); color: var(--forest); }
.pill { font: inherit; font-weight: 650; color: var(--forest); background: var(--sage); border: 1px solid #a8b99c; border-radius: 22px; padding: 9px 16px; cursor: pointer; min-height: 44px; }

/* ---- Homepage ---- */
.hero { background: linear-gradient(90deg, #fffaf0fa 0%, #fffaf0e8 32%, #fffaf020 68%), var(--hero-image, none) center right/cover; min-height: 430px; display: flex; align-items: center; }
.hero .wrap { padding: 48px 0; }
.hero h1 { font-size: clamp(48px, 6vw, 78px); font-style: italic; margin: 0 0 20px; max-width: 580px; }
.hero p { max-width: 470px; font-size: 20px; }

.meeting { display: grid; grid-template-columns: 30% 1fr; overflow: hidden; border: 1px solid #a36c99; border-radius: 22px; background: var(--blush); margin: 28px auto 0; }
.meeting img { width: 100%; height: 100%; min-height: 230px; object-fit: cover; }
.meeting .copy { padding: 28px; }
.meeting dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 18px; }
.meeting dt { font-weight: 700; color: var(--forest); }
.meeting dd { margin: 0; }

.benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.benefits article { border-left: 2px solid #b9c497; padding: 0 0 0 18px; }
.invite { background: var(--lilac); text-align: center; padding: 38px 20px; }
.invite p { max-width: 650px; margin: 0 auto 20px; }

/* ---- Photo carousel ---- */
.photo-carousel { max-width: 900px; margin: 22px auto; background: var(--sage); border-radius: 20px; overflow: hidden; border: 1px solid #c9d2b8; }
.photo-stage { position: relative; }
.photo-stage figure { margin: 0; }
.photo-stage img { display: block; width: 100%; height: clamp(240px, 46vw, 480px); object-fit: contain; background: #233c2a; }
.photo-stage figcaption { padding: 14px 60px; text-align: center; background: var(--cream); min-height: 55px; }
.photo-arrow { position: absolute; top: 40%; width: 48px; height: 48px; border: 1px solid white; border-radius: 50%; background: #23472de8; color: white; font-size: 22px; cursor: pointer; }
.photo-arrow.prev { left: 12px; }
.photo-arrow.next { right: 12px; }
.photo-controls { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px; padding: 10px; }
.photo-controls button { font: inherit; color: var(--forest); background: white; border: 1px solid #8b9e81; border-radius: 24px; min-height: 44px; padding: 8px 16px; cursor: pointer; }
.photo-dots { display: flex; flex-wrap: wrap; justify-content: center; }
.photo-dots button { min-width: 44px; padding: 0; border: 0; background: transparent; font-size: 24px; }
.photo-dots button[aria-current="true"] { color: var(--purple); font-weight: bold; }

/* ---- Panels, lists, cards ---- */
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; }
.panel { background: var(--sage); padding: 26px; border-radius: 16px; }
.panel dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; }
.panel dd { margin: 0; }
.reasons { columns: 2; column-gap: 45px; }
.reasons li { break-inside: avoid; margin-bottom: 10px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tiles.two { grid-template-columns: 1fr 1fr; gap: 16px; }
.card, .tile, .post, .side { background: white; border: 1px solid var(--line); border-radius: 15px; padding: 20px; }
.card a { color: var(--link-strong); font-weight: 650; }
.resource { background: var(--sage); padding: 24px; border-radius: 15px; }

/* ---- Member Center ---- */
.preview-banner { background: #f1e8d5; padding: 10px 0; font-size: 14px; }
.dashhero { background: #e8eddf; padding: 32px 0; }
.dashhero h1 { font-size: clamp(35px, 5vw, 54px); margin: 8px 0; }
.dashboard { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.post { display: flex; gap: 16px; margin-bottom: 12px; }
.post img { width: 112px; height: 112px; object-fit: cover; border-radius: 10px; }
.side { margin-bottom: 16px; }

/* ---- Orchid Growing ---- */
.growhero { background: var(--sage-deep); padding: 55px 0; }
.growhero h1 { font-size: clamp(40px, 6vw, 70px); font-style: italic; margin: 12px 0; }
.growhero p { max-width: 720px; font-size: 21px; }
.tree { background: white; border-radius: 18px; padding: clamp(12px, 3vw, 28px); border: 1px solid var(--line); }
.tree img { display: block; width: 100%; height: auto; }
.compare-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: white; }
.compare { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 1050px; font-size: 15px; line-height: 1.45; }
.compare.compact { min-width: 570px; }
.compare caption { text-align: left; padding: 14px; font-weight: 600; color: var(--forest); }
.compare th, .compare td { text-align: left; padding: 13px 12px; vertical-align: top; border-bottom: 1px solid #e1e7da; }
.compare thead th { background: var(--forest); color: white; }
.compare thead th:first-child { position: sticky; left: 0; z-index: 1; }
.compare tbody tr:nth-child(even) { background: #f1f5eb; }
.compare tbody th { color: var(--forest); background: var(--sage-deep); position: sticky; left: 0; min-width: 145px; }
.guide { background: white; border: 1px solid var(--line); border-radius: 14px; margin: 12px 0; overflow: hidden; }
.guide summary { cursor: pointer; padding: 18px 22px; color: var(--forest); font-weight: 700; font-size: 19px; }
.guide summary span { display: block; font-size: 14px; font-weight: 400; color: #4b5c4d; margin: 4px 0 0 20px; }
.guidebody { padding: 0 18px 18px; }

/* ---- Dialogs ---- */
dialog { max-width: min(480px, 90vw); border: 1px solid #a8b99c; border-radius: 18px; padding: 25px; color: var(--ink); background: var(--cream); }
dialog::backdrop { background: #172a20aa; }
dialog.viewer { width: 96vw; max-width: none; height: 94vh; max-height: none; border: 0; border-radius: 12px; padding: 12px; }

/* ---- Footer ---- */
footer.site { background: var(--forest); color: white; padding: 30px 0; }
footer.site a { margin-right: 18px; }

/* ---- Draft banner (preview builds only) ---- */
.draft-banner { background: #f1e8d5; color: var(--ink); font-size: 14px; padding: 8px 0; text-align: center; }

/* ---- Small screens ---- */
@media (min-width: 761px) {
  nav.main .links { display: flex; justify-content: space-between; width: 100%; gap: 8px; }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 32px); }
  header.site .wrap { flex-wrap: wrap; gap: 0; padding-bottom: 12px; }
  .brand { padding: 15px 0; }
  .brand svg { width: 48px; }
  .memberlink { font-size: 14px; }
  .menu { display: block; margin: 8px 0; background: transparent; border: 1px solid var(--forest); border-radius: 8px; padding: 10px 15px; font: inherit; color: var(--forest); }
  nav.main .wrap { display: block; }
  nav.main .links { display: none; }
  nav.main .links.open { display: flex; flex-direction: column; }
  nav.main a { display: block; min-height: 44px; }
  .hero { display: block; background: none; min-height: 0; }
  .hero::before { content: ''; display: block; height: 190px; background: var(--hero-image, none) center/cover; }
  .hero .wrap { padding: 24px 0; }
  .hero h1 { font-size: 48px; }
  .hero p { font-size: 17px; }
  .actions .btn { flex: 1 1 100%; }
  .meeting, .split, .benefits, .dashboard, .tiles, .tiles.two { grid-template-columns: 1fr; }
  .meeting img { height: 150px; min-height: 0; grid-row: 2; }
  .meeting .copy { padding: 22px; }
  .section { padding: 30px 0; }
  .reasons { columns: 1; }
  .panel dl, .meeting dl { grid-template-columns: 1fr; gap: 3px; }
  .panel dd { margin-bottom: 9px; }
  .photo-stage img { height: 300px; }
  .photo-stage figcaption { padding: 12px 18px; }
  .photo-controls { gap: 8px; }
  .post img { width: 86px; height: 86px; }
  .growhero { padding: 32px 0; }
}
@media (max-width: 600px) {
  .guidebody { padding: 0 10px 12px; }
  .compare tbody th { min-width: 105px; max-width: 125px; overflow-wrap: anywhere; }
  .compare th, .compare td { padding: 10px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
