/* Brand guidelines page */
.g-nav { position: sticky; top: 76px; z-index: 10; background: color-mix(in srgb, var(--bg) 96%, transparent); border-bottom: 1px solid var(--line); }
.g-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.g-nav a { display: block; padding: 14px 12px; white-space: nowrap; text-decoration: none; font: 500 var(--fs-label)/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.g-nav a:hover { color: var(--text); }
@media (max-width: 880px) { .g-nav { top: 64px; } }

.g-sec { padding-block: clamp(64px, 8vw, 112px); border-top: 1px solid var(--line); scroll-margin-top: 130px; }
.g-head { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--s-6); margin-bottom: var(--s-7); }
.g-head h2 { max-width: 18ch; }
.g-head .copy { margin-top: var(--s-4); }
@media (max-width: 760px) { .g-head { grid-template-columns: 1fr; gap: var(--s-3); } }

.g-cols { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--col-gap); }
.g-span-4 { grid-column: span 4; } .g-span-6 { grid-column: span 6; } .g-span-8 { grid-column: span 8; } .g-span-12 { grid-column: span 12; }
@media (max-width: 900px) { .g-span-4, .g-span-6, .g-span-8 { grid-column: span 12; } }
.tile { border-radius: var(--r-panel); background: var(--surface); padding: clamp(20px, 3vw, 36px); display: grid; gap: var(--s-4); align-content: start; }
.tile.is-dark { background: #0a101c; color: #eef1f6; }
.tile.is-blue { background: #1034a6; color: #fff; }
.tile .cap { color: var(--text-2); font-size: var(--fs-small); }
.tile.is-dark .cap, .tile.is-blue .cap { color: rgba(255, 255, 255, 0.8); }
.tile .stage { min-height: 200px; display: grid; place-items: center; }
.tile .stage img { max-height: 64px; width: auto; }
.tile .stage .mark-lg { height: 140px; width: auto; max-height: none; }

/* Logo construction */
.construct { width: 100%; max-width: 420px; height: auto; margin-inline: auto; }
.construct .gridl { stroke: var(--line-strong); stroke-width: 0.15; }
.construct .guide { stroke: var(--sun-text); stroke-width: 0.25; stroke-dasharray: 1 1; fill: none; }
.construct text { font: 500 2.4px var(--font-mono); fill: var(--text-2); }

.dont { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--col-gap); }
.dont figure { margin: 0; display: grid; gap: 10px; }
.dont .stage { border-radius: var(--r-panel); background: var(--surface); min-height: 150px; display: grid; place-items: center; padding: 20px; position: relative; overflow: hidden; }
.dont .stage::after { content: ""; position: absolute; inset: 12px 12px auto auto; width: 22px; height: 22px; border-radius: 50%; background: var(--danger) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 7l10 10M17 7 7 17' stroke='white' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.dont .stage.is-ok::after { background: var(--success) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5' stroke='white' stroke-width='2.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.dont img { max-height: 40px; width: auto; }
.dont figcaption { font-size: var(--fs-small); color: var(--text-2); }
@media (max-width: 760px) { .dont { grid-template-columns: 1fr 1fr; } }

/* Colour */
.swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--col-gap); }
.sw { border-radius: var(--r-panel); overflow: hidden; border: 1px solid var(--line); display: grid; }
.sw .chip { min-height: 150px; padding: 16px; display: flex; align-items: flex-end; font: 700 1.3rem/1 var(--font-display); }
.sw dl { margin: 0; padding: 16px; display: grid; gap: 6px; font-size: var(--fs-small); }
.sw dt { font: 500 var(--fs-label)/1.3 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.sw dd { margin: 0 0 6px; color: var(--text-2); }
@media (max-width: 960px) { .swatches { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .swatches { grid-template-columns: 1fr; } }
.neutral-row { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; margin-top: var(--col-gap); }
.neutral-row div { display: grid; gap: 6px; font: 500 0.72rem/1.3 var(--font-mono); color: var(--text-2); }
.neutral-row b { display: block; height: 56px; border-radius: 8px; border: 1px solid var(--line); }
@media (max-width: 760px) { .neutral-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Tables */
.g-table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.g-table th, .g-table td { text-align: start; padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.g-table th { font: 500 var(--fs-label)/1.3 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.g-table td { color: var(--text-2); }
.g-table td:first-child { color: var(--text); }
.table-scroll { overflow-x: auto; }
.pass { color: var(--success); font-weight: 600; }
:root[data-theme="dark"] .pass { color: #4fd1a1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pass { color: #4fd1a1; } }

/* Grid demo */
.grid-demo { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--col-gap); height: 160px; }
.grid-demo span { background: color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 4px; display: grid; place-items: end center; padding-bottom: 8px; font: 500 0.7rem/1 var(--font-mono); color: var(--text-3); }
.space-scale { display: grid; gap: 10px; }
.space-scale div { display: grid; grid-template-columns: 80px 60px 1fr; gap: 12px; align-items: center; font: 500 0.8rem/1 var(--font-mono); color: var(--text-2); }
.space-scale b { display: block; height: 10px; border-radius: 3px; background: var(--accent); }

/* Icons */
.icon-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--col-gap); }
.icon-grid figure { margin: 0; display: grid; gap: 10px; justify-items: start; padding: 20px; border-radius: var(--r-panel); background: var(--surface); }
.icon-grid svg { width: 40px; height: 40px; color: var(--text); --icon-shadow: var(--accent); }
.icon-grid figcaption { font-size: 0.85rem; color: var(--text-2); }
@media (max-width: 760px) { .icon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Imagery direction */
.photo-rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--col-gap); }
.photo-rules .light-study { aspect-ratio: 4 / 3; border-radius: var(--r-panel); position: relative; overflow: hidden; background: linear-gradient(180deg, #e9edf3 0 62%, #d5dbe5 62%); }
.photo-rules .light-study .obj { position: absolute; left: 30%; bottom: 38%; width: 18%; height: 34%; background: #0e1726; border-radius: 6px 6px 0 0; }
.photo-rules .light-study .cast { position: absolute; left: 48%; bottom: 30%; width: 44%; height: 8%; background: #1034a6; transform-origin: left center; transform: skewX(-50deg); opacity: 0.9; border-radius: 0 6px 6px 0; }
.photo-rules .light-study .sunp { position: absolute; left: 10%; top: 10%; width: 9%; aspect-ratio: 1; border-radius: 50%; background: #ff5a1f; }
@media (max-width: 860px) { .photo-rules { grid-template-columns: 1fr; } }

/* Motion demos */
.motion-demos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--col-gap); }
.motion-demos .stage { height: 160px; border-radius: 10px; background: var(--bg); position: relative; overflow: hidden; display: grid; place-items: center; }
.m-rise span { display: block; width: 46%; height: 14px; border-radius: 7px; background: var(--text); margin: 6px auto; box-shadow: 5px 6px 0 var(--blue-soft); }
.m-sweep svg, .m-cast svg { width: 120px; height: 120px; }
.m-sweep .hand { transform-origin: 60px 60px; }
@media (prefers-reduced-motion: no-preference) {
  .tile.is-in .m-rise span { animation: g-rise 2.4s var(--ease-out) 2 both; }
  .tile.is-in .m-rise span:nth-child(2) { animation-delay: .05s; }
  .tile.is-in .m-rise span:nth-child(3) { animation-delay: .1s; }
  .tile.is-in .m-sweep .hand { animation: g-sweep 2.4s var(--ease-sweep) 2 alternate both; }
  .tile.is-in .m-cast .cast { animation: g-cast 2.4s var(--ease-sun) 2 alternate both; }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  .motion-demos .tile:hover :is(.m-rise span, .hand, .cast) { animation-iteration-count: infinite; }
}
@keyframes g-rise { 0% { opacity: 0; transform: translateY(16px); } 40%, 100% { opacity: 1; transform: none; } }
@keyframes g-sweep { 0%, 20% { transform: rotate(0deg); } 60%, 100% { transform: rotate(60deg); } }
.cast-demo { position: relative; display: inline-block; }
.cast-demo .cast { position: absolute; inset: 0; border-radius: 999px; background: #0e1726; transform: translate(6px, 2px); }
.btn-demo { position: relative; display: block; padding: 14px 22px; border-radius: 999px; background: #1034a6; color: #fff; font-weight: 600; }
@keyframes g-cast { from { transform: translate(7px, 1px); } to { transform: translate(-7px, 1px); } }
@media (max-width: 860px) { .motion-demos { grid-template-columns: 1fr; } }

.downloads { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--s-6); }
@media (max-width: 600px) { .grid-demo { gap: 3px; height: 120px; } .grid-demo span { font-size: 0.6rem; } }
/* Logo specimens always sit on the light surface they are drawn for. */
.tile.is-light, .dont .stage { background: #f2f4f7; color: #0e1726; }
.tile.is-light .cap { color: #475163; }
.tile.is-light .construct text { fill: #475163; } .tile.is-light .construct .gridl { stroke: #b9c1cd; } .tile.is-light .construct .guide { stroke: #c2410c; }
.dont img, .tile .stage img { max-width: 100%; height: auto; } @media (max-width: 760px) { .dont { grid-template-columns: repeat(2, minmax(0, 1fr)); } } @media (max-width: 420px) { .dont { grid-template-columns: minmax(0, 1fr); } }
.space-scale div { grid-template-columns: 64px 48px minmax(0, 1fr); } .space-scale b { max-width: 100%; }
