/* demo.css — styles for /demo brand portal page only. Does NOT affect landing page. */

:root {
  --forest: #0e2b1d;
  --forest-mid: #1a3d28;
  --amber: #c9a84c;
  --amber-light: #e8c870;
  --parchment: #f6f4f0;
  --parchment-dark: #eee9df;
  --ink: #1a1a1a;
  --ink-light: #555;
  --rule: #ddd8ce;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--parchment);
  color: var(--ink);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* --- Portal Badge --- */
.portal-badge {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--forest);
  color: var(--parchment);
  text-decoration: none;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(14, 43, 29, 0.25);
  transition: transform 0.15s, box-shadow 0.15s;
}
.portal-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(14, 43, 29, 0.3);
}
.portal-badge-mark {
  width: 22px;
  height: 22px;
  background: var(--amber);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--forest);
}
.portal-badge-text { white-space: nowrap; }

/* --- Portal Header --- */
.portal-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 244, 240, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.portal-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.portal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.portal-brandmark {
  width: 36px;
  height: 36px;
  background: var(--forest);
  color: var(--amber);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.portal-brand-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--forest);
}
.portal-brand-tagline {
  font-size: 11px;
  color: var(--ink-light);
  letter-spacing: 0.3px;
}
.portal-nav {
  display: flex;
  gap: 32px;
}
.portal-nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-light);
  text-decoration: none;
  transition: color 0.15s;
}
.portal-nav-link:hover { color: var(--forest); }
.portal-nav-link--cta {
  background: var(--forest);
  color: var(--amber-light) !important;
  padding: 6px 14px;
  border-radius: 4px;
  font-weight: 600;
  margin-left: 8px;
}
.portal-nav-link--cta:hover { background: var(--forest-mid); color: var(--amber-light) !important; }

/* --- Container --- */
.portal-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* --- Portal Hero --- */
.portal-hero {
  background: var(--forest);
  padding: 80px 0;
}
.portal-hero-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 80px;
  align-items: center;
}
.portal-hero-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(246, 244, 240, 0.06);
  border: 1px solid rgba(246, 244, 240, 0.1);
  border-radius: 8px;
  padding: 40px 48px;
}
.portal-hero-lockup {
  width: 220px;
  height: auto;
}
.portal-hero-headline {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 600;
  color: var(--parchment);
  line-height: 1.0;
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.portal-hero-sub {
  font-size: 16px;
  color: rgba(246, 244, 240, 0.65);
  line-height: 1.7;
  max-width: 420px;
  margin-bottom: 40px;
}
.portal-hero-meta {
  display: flex;
  gap: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(246, 244, 240, 0.1);
}
.portal-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.portal-meta-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(246, 244, 240, 0.4);
}
.portal-meta-value {
  font-size: 14px;
  color: rgba(246, 244, 240, 0.8);
  font-weight: 500;
}

/* --- Sections --- */
.portal-section {
  padding: 96px 0;
  background: var(--parchment);
}
.portal-section--alt {
  background: var(--parchment-dark);
}
.section-header {
  margin-bottom: 60px;
}
.section-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 16px;
}
.section-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(32px, 3.5vw, 44px);
  font-weight: 600;
  color: var(--forest);
  line-height: 1.1;
  margin-bottom: 16px;
}
.section-desc {
  font-size: 15px;
  color: var(--ink-light);
  line-height: 1.75;
  max-width: 600px;
}

/* --- Logos --- */
.logo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}
.logo-item {
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.logo-preview {
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}
.logo-preview--parchment { background: var(--parchment); }
.logo-preview--forest { background: var(--forest); }
.logo-preview--white { background: #fff; border-bottom: 1px solid var(--rule); }
.logo-preview-img { max-width: 220px; height: auto; }
.logo-preview-img--icon { width: 72px; }
.logo-meta {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--rule);
}
.logo-meta-name {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}
.logo-meta-use {
  display: block;
  font-size: 12px;
  color: var(--ink-light);
  margin-top: 2px;
}
.logo-download-group {
  display: flex;
  gap: 8px;
}

/* Logo rules */
.logo-rules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.logo-rule-card {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 28px;
}
.logo-rule-visual { flex: 0 0 80px; }
.logo-rule-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--forest);
  margin-bottom: 8px;
}
.logo-rule-desc { font-size: 13px; color: var(--ink-light); line-height: 1.7; }

.clear-space-demo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}
.clear-space-border {
  width: 48px;
  height: 48px;
  border: 2px dashed var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.clear-space-mark {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--forest);
}
.clear-space-label { font-size: 10px; color: var(--amber); font-weight: 600; }
.min-size-demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.min-size-arrow { font-size: 10px; color: var(--ink-light); }

/* --- Buttons --- */
.btn-download {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn-download:hover {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--parchment);
}
.btn-download--sm { padding: 4px 10px; font-size: 11px; }
.btn-download--primary {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--parchment);
  padding: 12px 24px;
  font-size: 14px;
}
.btn-download--primary:hover {
  background: var(--forest-mid);
  border-color: var(--forest-mid);
}

/* --- Colors --- */
.color-palette {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}
.color-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
}
.color-swatch {
  height: 120px;
}
.color-swatch--outlined {
  border-bottom: 1px solid var(--rule);
}
.color-info { padding: 20px; }
.color-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--forest);
  margin-bottom: 4px;
}
.color-role { font-size: 12px; color: var(--ink-light); margin-bottom: 16px; }
.color-values { display: flex; flex-direction: column; gap: 8px; }
.color-value-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.color-value-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-light);
  width: 44px;
  flex-shrink: 0;
}
.color-value-token {
  font-family: 'DM Mono', 'Courier New', monospace;
  font-size: 12px;
  color: var(--ink);
  flex: 1;
}
.copy-btn {
  width: 26px;
  height: 26px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--ink-light);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.copy-btn:hover { background: var(--parchment-dark); color: var(--forest); }

.color-supporting { margin-top: 0; }
.color-supporting-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--forest);
  margin-bottom: 20px;
}
.color-tones {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.color-tone {
  width: 100px;
  padding: 12px;
  border-radius: 6px;
  color: #fff;
}
.color-tone-hex {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  margin-bottom: 4px;
  opacity: 0.8;
}
.color-tone-name { display: block; font-size: 11px; font-weight: 500; }

/* --- Typography --- */
.type-system {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-bottom: 60px;
}
.type-specimen {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 36px;
}
.type-specimen-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
}
.type-specimen-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--forest);
  margin-bottom: 4px;
}
.type-specimen-role { font-size: 13px; color: var(--ink-light); }
.type-specimen-sample {
  padding: 28px;
  background: var(--parchment);
  border-radius: 6px;
  margin-bottom: 24px;
  color: var(--forest);
  line-height: 1.3;
}
.type-specimen-sample--display {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 600;
  font-style: italic;
}
.type-specimen-sample--body {
  font-family: 'DM Sans', sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
}

.type-weight-ladder { display: flex; flex-direction: column; gap: 2px; }
.type-weight-ladder--display {}
.type-weight-row {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 10px 0;
  border-bottom: 1px solid var(--parchment-dark);
}
.type-weight-row:last-child { border-bottom: none; }
.type-weight-label {
  font-size: 11px;
  color: var(--ink-light);
  width: 100px;
  flex-shrink: 0;
}
.type-weight-sample { color: var(--ink); }

.type-scale {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 36px;
}
.type-scale-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--forest);
  margin-bottom: 28px;
}
.type-scale-rows { display: flex; flex-direction: column; gap: 0; }
.type-scale-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--parchment-dark);
}
.type-scale-row:last-child { border-bottom: none; }
.type-scale-spec {
  font-size: 11px;
  color: var(--ink-light);
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.3px;
}
.type-scale-sample { color: var(--ink); }

/* --- Guidelines --- */
.guidelines-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.guideline-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
}
.guideline-examples {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.guideline-example {
  padding: 20px;
  position: relative;
}
.guideline-example--do { border-right: 1px solid var(--rule); }
.guideline-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.guideline-badge--do { background: rgba(14, 43, 29, 0.08); color: var(--forest); }
.guideline-badge--dont { background: rgba(180, 0, 0, 0.06); color: #b40000; }
.guideline-visual { border-radius: 6px; overflow: hidden; margin-bottom: 12px; min-height: 80px; }
.guideline-example-text { font-size: 12px; color: var(--ink-light); line-height: 1.6; }
.guideline-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--forest);
  padding: 16px 20px;
  border-top: 1px solid var(--rule);
  background: var(--parchment);
}

/* --- Files --- */
.files-bundle { margin-bottom: 32px; }
.files-bundle-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--forest);
  border-radius: 8px;
  padding: 24px 32px;
}
.files-bundle-icon {
  width: 56px;
  height: 56px;
  background: rgba(246, 244, 240, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.files-bundle-icon svg { stroke: var(--parchment); }
.files-bundle-info { flex: 1; }
.files-bundle-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--parchment);
  margin-bottom: 4px;
}
.files-bundle-meta { font-size: 13px; color: rgba(246, 244, 240, 0.5); }

.files-list {
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
}
.files-list-header {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr 80px;
  gap: 16px;
  padding: 12px 20px;
  background: var(--parchment-dark);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-light);
  border-bottom: 1px solid var(--rule);
}
.files-list-row {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr 80px;
  gap: 16px;
  padding: 14px 20px;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--rule);
  transition: background 0.15s;
}
.files-list-row:last-child { border-bottom: none; }
.files-list-row:hover { background: var(--parchment); }
.file-info { display: flex; align-items: center; gap: 12px; }
.file-icon {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 3px;
  font-family: monospace;
}
.file-icon--svg { background: rgba(14, 43, 29, 0.08); color: var(--forest); }
.file-icon--txt { background: rgba(201, 168, 76, 0.12); color: #8b7030; }
.file-display-name { font-size: 14px; font-weight: 500; color: var(--ink); }
.file-format { font-size: 13px; color: var(--ink-light); }
.file-use { font-size: 13px; color: var(--ink-light); }

/* --- Portal CTA --- */
.portal-cta {
  background: var(--forest);
  padding: 96px 0;
}
.portal-cta-inner {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}
.portal-cta-mark {
  width: 56px;
  height: 56px;
  background: var(--amber);
  color: var(--forest);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  margin: 0 auto 28px;
}
.portal-cta-headline {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 600;
  color: var(--parchment);
  line-height: 1.2;
  margin-bottom: 16px;
}
.portal-cta-body {
  font-size: 16px;
  color: rgba(246, 244, 240, 0.6);
  line-height: 1.7;
  margin-bottom: 36px;
}
.portal-cta-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.portal-cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.portal-cta-btn--primary {
  background: var(--amber);
  color: var(--forest);
}
.portal-cta-btn--primary:hover { background: var(--amber-light); }
.portal-cta-btn--ghost {
  background: transparent;
  color: rgba(246, 244, 240, 0.7);
  border: 1px solid rgba(246, 244, 240, 0.2);
}
.portal-cta-btn--ghost:hover {
  background: rgba(246, 244, 240, 0.08);
  color: var(--parchment);
}
.portal-cta-note {
  font-size: 12px;
  color: rgba(246, 244, 240, 0.35);
  font-style: italic;
}

/* --- Portal Footer --- */
.portal-footer {
  background: var(--parchment);
  border-top: 1px solid var(--rule);
  padding: 40px 0;
}
.portal-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.portal-footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.portal-footer-mark {
  width: 28px;
  height: 28px;
  background: var(--forest);
  color: var(--amber);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
}
.portal-footer-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--forest);
}
.portal-footer-copy {
  font-size: 13px;
  color: var(--ink-light);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .portal-header-inner { padding: 0 24px; }
  .portal-container { padding: 0 24px; }
  .portal-nav { display: none; }
  .portal-hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .portal-hero-logo { padding: 28px; }
  .portal-hero-lockup { width: 180px; }
  .portal-hero-meta { gap: 20px; flex-wrap: wrap; }
  .logo-grid { grid-template-columns: 1fr; }
  .logo-rules { grid-template-columns: 1fr; }
  .color-palette { grid-template-columns: 1fr; }
  .color-tones { gap: 8px; }
  .color-tone { width: 88px; }
  .guidelines-grid { grid-template-columns: 1fr; }
  .type-scale-row { grid-template-columns: 1fr; gap: 4px; }
  .type-scale-spec { font-size: 10px; }
  .files-list-header { grid-template-columns: 2fr 1fr 80px; }
  .files-list-row { grid-template-columns: 2fr 1fr 80px; }
  .files-list-header span:nth-child(3),
  .files-list-row span:nth-child(3) { display: none; }
  .portal-footer-inner { flex-direction: column; gap: 12px; text-align: center; }
  .portal-section { padding: 64px 0; }
  .portal-cta { padding: 64px 0; }
  .portal-badge { bottom: 16px; right: 16px; }
}

@media (max-width: 600px) {
  .files-bundle-card { flex-direction: column; align-items: flex-start; gap: 16px; }
  .guideline-examples { grid-template-columns: 1fr; }
  .guideline-example--do { border-right: none; border-bottom: 1px solid var(--rule); }
  .portal-hero { padding: 48px 0; }
}

/* scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--parchment); }
::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-light); }

/* --- Share buttons --- */
.share-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--rule);
  border-radius: 6px;
  background: none;
  cursor: pointer;
  color: var(--ink-light);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  padding: 0;
  text-decoration: none;
  flex-shrink: 0;
}
.share-btn:hover { color: var(--forest); border-color: var(--forest); background: var(--parchment); }
.share-btn svg { display: block; }
.share-btn--copy.copied { color: var(--forest); border-color: var(--forest); }

/* Share toast */
.share-toast {
  position: fixed;
  bottom: 64px;
  right: 24px;
  background: var(--forest);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(14,43,29,0.25);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  z-index: 200;
}
.share-toast.visible { opacity: 1; transform: translateY(0); }
