/* Creative Madness demo sites. One stylesheet, no build step. */
:root {
  --cocoa: #3B2418;
  --cocoa-2: #5a3a29;
  --cream: #F7F0E6;
  --cream-2: #efe4d3;
  --paper: #fffaf3;
  --accent: #C8682C;
  --accent-ink: #8f4210;
  --muted: #6e5646;
  --rule: #e2d4c0;
  --radius: 18px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--cocoa);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent-ink); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px;
}
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 7vw, 3.4rem); }
h2 { font-size: clamp(1.45rem, 4.5vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }

/* Demo banner */
.demo-banner {
  background: var(--cocoa); color: var(--cream);
  font-size: 13px; line-height: 1.4; text-align: center; padding: 8px 16px;
}
.demo-banner a { color: #ffd9bd; }

/* Header */
.site-header { background: var(--cream); border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--cocoa); font-family: var(--serif); font-weight: 700; font-size: 1.1rem; }
.brand svg { width: 34px; height: 34px; }
.nav { display: flex; gap: 4px 16px; flex-wrap: wrap; font-size: 15px; }
.nav a { color: var(--cocoa); text-decoration: none; padding: 6px 0; }
.nav a:hover { text-decoration: underline; }

/* Hero */
.hero { padding: 40px 0 32px; }
.hero .wrap { display: grid; gap: 24px; align-items: center; }
.hero .kicker { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 700; color: var(--accent-ink); margin-bottom: .6em; }
.hero p.lead { font-size: 1.15rem; color: var(--cocoa-2); max-width: 36em; }
.hero-art { max-width: 420px; justify-self: center; width: 100%; }
@media (min-width: 820px) {
  .hero { padding: 64px 0 48px; }
  .hero .wrap { grid-template-columns: 1.1fr .9fr; }
}

/* Sections */
section.block { padding: 32px 0; }
section.block.alt { background: var(--paper); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.card {
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 18px; text-decoration: none; color: var(--cocoa); display: flex; flex-direction: column; gap: 10px;
}
a.card:hover { border-color: var(--accent); }
.card .art { border-radius: 12px; overflow: hidden; }
.card h3 { margin: 0; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: var(--cream-2); color: var(--cocoa-2); border-radius: 999px; padding: 3px 10px; }
.tag.warm { background: #f6dcc8; color: var(--accent-ink); }

.btn {
  display: inline-block; background: var(--cocoa); color: var(--cream); text-decoration: none;
  font-weight: 700; padding: 12px 20px; border-radius: 999px; border: 0; font-size: 16px; font-family: inherit; cursor: pointer;
}
.btn.ghost { background: transparent; color: var(--cocoa); border: 2px solid var(--cocoa); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* Product */
.facts { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--paper); border-radius: 12px; overflow: hidden; }
.facts th, .facts td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.facts th { width: 38%; color: var(--muted); font-weight: 600; }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .02em; }
.note {
  background: #fbe9da; border-left: 4px solid var(--accent); padding: 12px 14px; border-radius: 10px; font-size: 15px; margin: 18px 0;
}
.lot-badge { display: inline-flex; gap: 14px; flex-wrap: wrap; background: var(--cocoa); color: var(--cream); border-radius: 14px; padding: 12px 16px; margin: 6px 0 18px; font-size: 15px; }
.lot-badge b { color: #ffd9bd; font-weight: 700; }
.two-col { display: grid; gap: 28px; }
@media (min-width: 820px) { .two-col { grid-template-columns: 1fr 1fr; align-items: start; } }
ul.clean { padding-left: 1.1em; margin: 0 0 1em; }
ul.clean li { margin-bottom: .35em; }

/* Recipe page: hot chocolate, deliberately its own look */
.cocoa-page { background: var(--cocoa); color: var(--cream); }
.cocoa-page .site-header { background: var(--cocoa); border-bottom-color: #5b3d2c; }
.cocoa-page .brand, .cocoa-page .nav a { color: var(--cream); }
.cocoa-page a { color: #ffd0ad; }
.cocoa-page .hero .kicker { color: #ffb98a; }
.cocoa-page .hero p.lead { color: #f1e2d0; }
.cocoa-page section.block.alt { background: #4a2e20; border-color: #5b3d2c; }
.cocoa-page .card { background: #4a2e20; border-color: #6a4733; color: var(--cream); }
.cocoa-page .card p { color: #e7d4bf; }
.cocoa-page .site-footer { background: #2c1a11; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { counter-increment: step; background: #4a2e20; border: 1px solid #6a4733; border-radius: 14px; padding: 14px 14px 14px 58px; position: relative; }
.steps li::before {
  content: counter(step); position: absolute; left: 14px; top: 12px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 800; display: grid; place-items: center;
}
.ingredients { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); list-style: none; padding: 0; margin: 0 0 1em; }
.ingredients li { background: #4a2e20; border: 1px solid #6a4733; border-radius: 12px; padding: 10px 12px; }
.ingredients b { display: block; font-size: 1.15rem; color: #ffd0ad; }

/* Forms (demo only) */
form.demo { display: grid; gap: 12px; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px; }
form.demo label { display: grid; gap: 4px; font-weight: 600; font-size: 15px; }
form.demo input, form.demo select, form.demo textarea { font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid #cdb9a1; background: #fff; color: var(--cocoa); }
form.demo { min-width: 0; }
form.demo select { width: 100%; max-width: 100%; }
form.demo .demo-note { font-size: 14px; color: var(--accent-ink); font-weight: 600; margin: 0; }

/* Tables */
.price { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: 12px; overflow: hidden; font-size: 15px; }
.price th, .price td { padding: 10px 12px; border-bottom: 1px solid var(--rule); text-align: left; }
.price thead th { background: var(--cream-2); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.price td.num, .price th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; border-radius: 12px; border: 1px solid var(--rule); }

/* Footer */
.site-footer { background: var(--cocoa); color: var(--cream); padding: 28px 0 36px; margin-top: 40px; font-size: 14px; }
.site-footer a { color: #ffd9bd; }
.site-footer .wrap { display: grid; gap: 10px; }
.site-footer p { margin: 0; }

/* Hub */
.hub-hero { padding: 56px 0 24px; }
.hub-card { display: grid; gap: 18px; align-items: center; }
@media (min-width: 720px) { .hub-card { grid-template-columns: 220px 1fr; } }

/* Layout refinements */
.hero-art { border-radius: var(--radius); overflow: hidden; }
.hero-art svg { width: 100%; height: auto; }
.cocoa-page .hero-art { border-radius: 0; overflow: visible; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
@media (max-width: 819px) { .hero-art { max-width: 340px; } }
.btn { border: 2px solid var(--cocoa); }
.cocoa-page .btn { border-color: transparent; }
.cocoa-page .brand svg circle { fill: #5a3a29; }

/* Realty demo: same components, its own palette */
.realty {
  --cocoa: #1d2b3a;
  --cocoa-2: #34495e;
  --cream: #f4f1ea;
  --cream-2: #e3e8ec;
  --paper: #fbfaf7;
  --accent: #c9822f;
  --accent-ink: #8a4f12;
  --muted: #56636f;
  --rule: #d9dde0;
}
.realty .demo-banner a, .realty .site-footer a { color: #f3c98f; }
.realty .note { background: #f6ead9; }
.realty .lot-badge b { color: #f3c98f; }
.realty form.demo input, .realty form.demo select { border-color: #b9c2ca; color: var(--cocoa); }
.oh-box { margin-top: 18px; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px 18px; }
.oh-box h2 { font-size: 1.3rem; }
.oh-box p:last-child, .oh-box ul:last-child { margin-bottom: 0; }

/* Long-form explainer pages */
.prose { max-width: 720px; }
.prose h2 { margin-top: 1.4em; }
.prose h3 { margin-top: 1.1em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.code-list { display: grid; gap: 14px; margin: 1em 0 1.4em; }
.code-list .card h3 { font-size: 1.1rem; }
.breadcrumb { font-size: 14px; color: var(--muted); margin: 0 0 .8em; }
.breadcrumb a { color: var(--muted); }
/* Single-column heroes (explainers, listings index, forms, 404) stay one column on desktop. */
.hero .wrap.narrow { display: block; }
.realty .grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* Realty photo tour */
.tour-photos { display: grid; gap: 22px; }
@media (min-width: 820px) { .tour-photos { grid-template-columns: 1fr 1fr; } .tour-photos .wide { grid-column: 1 / -1; } }
.tour-photos figure { margin: 0; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.tour-photos img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.tour-photos figcaption { padding: 12px 16px 14px; font-size: 15px; color: var(--muted); }
.tour-photos figcaption b { display: block; color: var(--cocoa); font-size: 1.05rem; }
.tour-video { width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--cocoa); border-radius: var(--radius); display: block; }
.tour-video img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
a.tour-video { position: relative; }
a.tour-video::after { content: "\25B6  Watch on YouTube"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: .7em 1.2em; border-radius: 999px; background: rgba(0,0,0,.72); color: #fff; font-weight: 600; }
a.tour-video:hover::after, a.tour-video:focus-visible::after { background: #c00; }
.floorplan { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px; }
.floorplan svg { width: 100%; height: auto; }
.credits { font-size: 13px; color: var(--muted); }
.credits a { color: var(--muted); }

/* Home value greetings: no scripts, so all three areas show; #area highlights one */
.areas { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin: 0 0 1em; }
.areas .card:target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent); }
.areas .tag { align-self: flex-start; }
