/* ============================================================
   WERHINO 2.0 - Style Board Generator
   styleboard.css · layers on platform.css. Preview is free;
   Export PDF and Save board require a free account.
   ============================================================ */

.sb { padding: calc(var(--nav-h) + clamp(2.5rem,7vh,5rem)) 0 clamp(2rem,5vh,3rem); }
.sb__title { font-size: clamp(2.8rem, 6vw, 5rem); margin: 1.3rem 0 1.1rem; max-width: 16ch; }
.sb__title em { font-style: italic; color: var(--accent); }
.sb__sub { color: var(--muted); font-weight: 300; max-width: 54ch; line-height: 1.7; font-size: 1.05rem; }

/* style chooser */
.styles { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 2rem; }
.style {
  font-size: .76rem; font-weight: 600; letter-spacing: .04em;
  padding: .7em 1.3em; border-radius: 999px; border: 1px solid var(--line); color: var(--muted);
  transition: border-color .3s, color .3s, background .3s, transform .3s var(--ease);
}
.style:hover { color: var(--text); border-color: var(--line-2); transform: translateY(-1px); }
.style.is-active { background: var(--accent); color: #1a1409; border-color: var(--accent); }

/* board */
.boardwrap { padding-bottom: clamp(4rem,9vh,7rem); }
.board {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(.8rem,1.4vw,1.2rem);
  border: 1px solid var(--line); border-radius: var(--r-card); background: var(--bg-card);
  padding: clamp(1rem,1.8vw,1.4rem);
}
.board__hero { position: relative; border-radius: 12px; overflow: hidden; min-height: 320px; }
.board__hero img { width: 100%; height: 100%; object-fit: cover; }
.board__hero .tag { position: absolute; top: 1rem; left: 1rem; font-size: .58rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); background: rgba(10,9,8,.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); padding: .4em .9em; border-radius: 999px; border: 1px solid var(--line); }
.board__spec { display: flex; flex-direction: column; gap: .7rem; }
.swatch { display: flex; align-items: center; gap: .9rem; border: 1px solid var(--line); border-radius: 12px; padding: .7rem; background: var(--bg-2); }
.swatch img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.swatch__t span { display: block; font-size: .56rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.swatch__t b { font-family: var(--font-d); font-weight: 500; font-size: 1.25rem; color: var(--text); }
.note { border: 1px solid var(--line); border-radius: 12px; padding: .8rem .9rem; }
.note span { display: block; font-size: .56rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin-bottom: .25rem; }
.note p { font-size: .88rem; color: var(--text); line-height: 1.45; }
.palette { display: flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.palette__sw { flex: 1; aspect-ratio: 1 / 1.4; position: relative; }
.palette__sw small { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: .5rem; letter-spacing: .04em; color: rgba(255,255,255,.85); background: rgba(0,0,0,.32); padding: .25em 0; }

.board__refs { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(.6rem,1vw,1rem); }
.board__refs img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.board__foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.4rem; padding-top: .4rem; }
.board__desc { color: var(--muted); font-weight: 300; line-height: 1.6; max-width: 52ch; }
.board__desc b { font-family: var(--font-d); font-weight: 500; font-size: 1.4rem; color: var(--text); display: block; margin-bottom: .3rem; }
.board__actions { display: flex; gap: .7rem; }

/* reveal animation hooks */
.board [data-b] { opacity: 0; transform: translateY(16px); }
.board.is-in [data-b] { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease); }

@media (max-width: 860px) {
  .board { grid-template-columns: 1fr; }
  .board__refs { grid-template-columns: repeat(3,1fr); }
  .board__foot { flex-direction: column; align-items: stretch; }
  .board__actions .btn { flex: 1; }
}

/* builder controls */
.sb-builder { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: .8rem; margin-top: 1.6rem; }
.sb-field { display: flex; flex-direction: column; gap: .35rem; }
.sb-field span { font-size: .56rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sb-field input, .sb-field select {
  width: 100%; background: #14120d; border: 1px solid var(--line); border-radius: 10px; padding: .72em .85em;
  color: var(--text); font: inherit; font-size: .88rem; transition: border-color .3s; appearance: none; -webkit-appearance: none;
}
.sb-field input::placeholder { color: rgba(244,239,231,.4); }
.sb-field input:focus, .sb-field select:focus { outline: none; border-color: var(--accent); }
.sb-field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23A39B8B' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8em center; padding-right: 2.2em; }
@media (max-width: 900px) { .sb-builder { grid-template-columns: 1fr 1fr; } .sb-field--wide { grid-column: 1 / -1; } }
@media (max-width: 540px) { .sb-builder { grid-template-columns: 1fr; } }

/* saved boards */
.sb-saved { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1.2rem; }
.sb-saved__label { font-size: .56rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-right: .3rem; }
.sb-saved__empty { font-size: .82rem; color: var(--faint); }
.sb-chip { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: .42em .5em .42em .9em; transition: border-color .3s, color .3s; cursor: pointer; }
.sb-chip:hover { border-color: var(--accent); color: var(--accent); }
.sb-chip__x { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: 1rem; line-height: 1; color: var(--faint); }
.sb-chip__x:hover { color: #cf6f57; }

.board__sharelink { margin-top: .8rem; font-size: .82rem; color: var(--muted); word-break: break-all; }
.board__sharelink a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.sb-printbrand { display: none; }

/* print: a clean client board on light paper */
@media print {
  body { background: #fff !important; }
  #bgCanvas, .nav, .menu, .sb__sub, .sb__title, .sb .eyebrow, .styles, .sb-builder, .sb-saved, .access, .foot, .toast, .guide-fab, .guide, .board__actions, .skip-link { display: none !important; }
  .sb-printbrand { display: block !important; margin: 0 0 1rem; font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: #1a1510; }
  .board { border-color: #ddd; background: #fff; box-shadow: none; }
  .board__desc, .swatch__t b, .note p, .tag { color: #1a1510 !important; }
  .swatch, .note, .palette, .board__hero { break-inside: avoid; }
}
