@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  --ink: #171717;
  --paper: #f4efe4;
  --white: #fffdf8;
  --yellow: #ffd84d;
  --blue: #8cbcff;
  --pink: #ff9fca;
  --green: #a9e76c;
  --purple: #b99cff;
  --orange: #ff9d57;
  --border: 3px solid var(--ink);
  --shadow: 7px 7px 0 var(--ink);
  --small-shadow: 4px 4px 0 var(--ink);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: radial-gradient(
      circle at 10% 15%,
      rgba(255, 216, 77, 0.35),
      transparent 25%
    ),
    radial-gradient(
      circle at 90% 12%,
      rgba(140, 188, 255, 0.35),
      transparent 27%
    ),
    var(--paper);
  font-family: "Space Grotesk", sans-serif;
  transition: background 400ms ease, color 400ms ease;
}

button {
  color: inherit;
  font: inherit;
}

button:focus-visible {
  outline: 4px solid var(--purple);
  outline-offset: 4px;
}

.app-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 60px;
}

.bento-card {
  border: var(--border);
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  font-family: "DM Mono", monospace;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.hero {
  position: relative;
  /*display: grid;*/
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.7fr);
  min-height: 510px;
  overflow: hidden;
}

.hero::before {
  position: absolute;
  right: 30%;
  bottom: -130px;
  width: 260px;
  height: 260px;
  border: var(--border);
  border-radius: 50%;
  background: var(--pink);
  content: "";
  display: none;
}

.hero-copy {
 /* position: relative;*/
  z-index: 2;
 /* display: flex;*/
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  padding: clamp(32px, 6vw, 80px);
}

.hero h1 {
  
  margin: 0;
  font-size: clamp(3.4rem, 6.5vw, 8.5rem);
  font-weight: 700;
  letter-spacing: -0.075em;
  line-height: 0.82;
}

.hero h1 span {
  display: block;
  color: #d75d35;
  -webkit-text-stroke: 2px var(--ink);
  text-shadow: 4px 4px 0 var(--yellow);
}

.hero-description {
  max-width: 680px;
  margin: 30px auto 0;
  font-size: clamp(1rem, 1.7vw, 1.24rem);
  line-height: 1.65;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
    justify-content: center;
}

.primary-button,
.secondary-button,
.filter-button,
.text-button {
  cursor: pointer;
  border: var(--border);
  font-weight: 700;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.primary-button,
.secondary-button {
  min-height: 52px;
  padding: 0 20px;
  border-radius: 14px;
}

.primary-button {
  display: inline-flex;
  gap: 22px;
  align-items: center; 
  justify-content: space-between;
  background: var(--yellow);
  text-decoration:none ;
  color: black;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  text-decoration: none;
  color: var(--ink);
}

.primary-button:hover,
.secondary-button:hover,
.filter-button:hover,
.text-button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
}

.primary-button:active,
.secondary-button:active,
.filter-button:active,
.text-button:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.primary-button:disabled {
  cursor: progress;
  opacity: 0.65;
}

.hero-symbol {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 34px;
  border-left: var(--border);
  background: var(--blue);
}

.hero-symbol p {
  position: absolute;
  right: 20px;
  bottom: 16px;
  left: 20px;
  margin: 0;
  font-family: "DM Mono", monospace;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.sun-ring {
  position: relative;
  display: grid;
  width: min(280px, 75%);
  aspect-ratio: 1;
  place-items: center;
  border: var(--border);
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 0deg,
    var(--yellow) 0deg 8deg,
    transparent 8deg 16deg
  );
  animation: rotate-sun 24s linear infinite;
}

.sun-ring::after {
  position: absolute;
  inset: 34px;
  border: var(--border);
  border-radius: 50%;
  background: var(--orange);
  content: "";
}

.ship {
  position: relative;
  z-index: 2;
  width: 130px;
  height: 120px;
  animation: counter-rotate 24s linear infinite;
}

.mast {
  position: absolute;
  top: 10px;
  left: 63px;
  width: 5px;
  height: 77px;
  border: 2px solid var(--ink);
  background: var(--ink);
}

.sail {
  position: absolute;
  top: 15px;
  left: 18px;
  width: 48px;
  height: 62px;
  border: var(--border);
  border-radius: 50% 8px 8px 50%;
  background: var(--white);
  transform: skewY(-8deg);
}

.hull {
  position: absolute;
  bottom: 18px;
  left: 10px;
  width: 112px;
  height: 34px;
  border: var(--border);
  border-radius: 4px 4px 55px 55px;
  background: var(--ink);
}

@keyframes rotate-sun {
  to {
    transform: rotate(360deg);
  }
}

@keyframes counter-rotate {
  to {
    transform: rotate(-360deg);
  }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 26px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 220px;
  padding: 26px;
}

.stat-yellow {
  background: var(--yellow);
}

.stat-blue {
  background: var(--blue);
}

.stat-pink {
  background: var(--pink);
}

.stat-green {
  background: var(--green);
}

.stat-label {
  margin: 0;
  font-family: "DM Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.stat-card strong {
  margin-top: auto;
  font-size: clamp(4rem, 7vw, 6.4rem);
  letter-spacing: -0.08em;
  line-height: 0.9;
}

.stat-card span {
  margin-top: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.audit-card {
  margin-top: 26px;
  padding: clamp(26px, 5vw, 48px);
}

.audit-heading,
.audit-result,
.section-heading,
.inspector-topline,
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.audit-heading h2,
.section-heading h2,
.footer h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.055em;
  line-height: 1;
}

.audit-grade {
  display: grid;
  flex: 0 0 auto;
  width: 90px;
  aspect-ratio: 1;
  place-items: center;
  border: var(--border);
  border-radius: 50%;
  background: var(--pink);
  box-shadow: var(--small-shadow);
  font-size: 2.4rem;
}

.audit-meter {
  height: 34px;
  margin-top: 32px;
  overflow: hidden;
  border: var(--border);
  border-radius: 999px;
  background: repeating-linear-gradient(
    -45deg,
    var(--paper) 0 12px,
    var(--white) 12px 24px
  );
}

.audit-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-right: var(--border);
  background: var(--green);
  transition: width 120ms linear;
}

.audit-result {
  margin-top: 20px;
}

.audit-result p {
  max-width: 820px;
  margin: 0;
  line-height: 1.55;
}

.audit-result span {
  flex: 0 0 auto;
  font-family: "DM Mono", monospace;
  font-size: 1.2rem;
  font-weight: 700;
}

.incident-section {
  margin-top: 68px;
}

.section-heading {
  align-items: flex-end;
  margin-bottom: 24px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.filter-button {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 0.82rem;
}

.filter-button.active {
  background: var(--yellow);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
  gap: 26px;
  align-items: start;
}

.incident-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  min-width: 0;
}

.incident-card {
  position: relative;
  min-width: 0;
  min-height: 250px;
  padding: 24px;
  overflow: hidden;
  cursor: pointer;
  border: var(--border);
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--small-shadow);
  text-align: left;
  transition: transform 170ms ease, box-shadow 170ms ease, background 170ms ease;
}

.incident-card::after {
  position: absolute;
  right: -25px;
  bottom: -25px;
  width: 90px;
  height: 90px;
  border: var(--border);
  border-radius: 50%;
  background: var(--card-color, var(--yellow));
  content: "";
}

.incident-card:hover,
.incident-card.selected {
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0 var(--ink);
}

.incident-card.selected {
  background: var(--card-color, var(--yellow));
}

.incident-card-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.incident-index,
.incident-duration {
  font-family: "DM Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.incident-card h3 {
  max-width: 85%;
  margin: 52px 0 12px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.045em;
  line-height: 1.25;
}

.incident-card p {
  max-width: 86%;
  margin: 0;
  line-height: 1.5;
}

.incident-card-hidden {
  display: none;
}

.inspector {
  position: sticky;
  top: 18px;
  min-width: 0;
  padding: 28px;
  background: var(--ink);
  color: var(--white);
}

.severity-badge {
  padding: 8px 11px;
  border: 2px solid var(--white);
  border-radius: 999px;
  background: var(--pink);
  color: var(--ink);
  font-family: "DM Mono", monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.incident-number,
.detail-category {
  font-family: "DM Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-category {
  margin: 44px 0 10px;
  color: var(--yellow);
}

.inspector h3 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.detail-block {
  margin-top: 32px;
}

.detail-block span,
.recommendation-box span {
  font-family: "DM Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-block p {
  margin: 9px 0 0;
  color: #dedbd3;
  line-height: 1.55;
}

.recommendation-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 32px;
  padding: 18px;
  border: 2px solid var(--white);
  border-radius: 16px;
  background: var(--purple);
  color: var(--ink);
}

.recommendation-box strong {
  display: block;
  margin-top: 6px;
  line-height: 1.3;
}

.system-icon {
  display: grid;
  flex: 0 0 auto;
  width: 50px;
  aspect-ratio: 1;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--white);
  font-size: 1.4rem;
}

.inspector-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.dark-button {
  border-color: var(--white);
  background: var(--yellow);
  color: var(--ink);
}

.text-button {
  padding: 0 4px;
  border-color: transparent;
  background: transparent;
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.text-button:hover {
  box-shadow: none;
}

.remediation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 68px;
}

.remediation-card {
  position: relative;
  min-width: 0;
  min-height: 260px;
  padding: 30px;
  overflow: hidden;
}

.remediation-card:nth-child(1) {
  background: var(--blue);
}

.remediation-card:nth-child(2) {
  background: var(--yellow);
}

.remediation-card:nth-child(3) {
  background: var(--pink);
}

.remediation-number {
  position: absolute;
  top: 15px;
  right: 22px;
  color: rgba(23, 23, 23, 0.17);
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: -0.08em;
}

.remediation-card h3 {
  margin: 40px 0 20px;
  font-size: clamp(1.7rem, 3.3vw, 3rem);
  letter-spacing: -0.05em;
  line-height: 1;
}

.remediation-card > p:last-child {
  margin: 0;
  line-height: 1.6;
}

.footer {
  margin-top: 26px;
  padding: clamp(28px, 5vw, 48px);
  background: var(--green);
}

.footer > p {
  margin: 0;
  font-family: "DM Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.7;
  text-align: right;
  text-transform: uppercase;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  padding: 14px 18px;
  border: var(--border);
  border-radius: 12px;
  background: var(--yellow);
  box-shadow: var(--small-shadow);
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 200ms ease, transform 200ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Dream theory mode */

body.dream-mode {
  background: radial-gradient(
      circle at 20% 15%,
      rgba(185, 156, 255, 0.5),
      transparent 28%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(255, 159, 202, 0.42),
      transparent 30%
    ),
    #221b35;
}

body.dream-mode .app-shell {
  filter: saturate(0.9);
}

body.dream-mode .hero {
  background: linear-gradient(
      rgba(255, 253, 248, 0.82),
      rgba(255, 253, 248, 0.82)
    ),
    repeating-linear-gradient(
      45deg,
      var(--purple) 0 18px,
      var(--pink) 18px 36px
    );
}

body.dream-mode .hero-symbol {
  background: var(--purple);
}

body.dream-mode .sun-ring {
  animation-duration: 8s;
}

body.dream-mode .incident-card {
  background: linear-gradient(
      rgba(255, 253, 248, 0.9),
      rgba(255, 253, 248, 0.9)
    ),
    repeating-linear-gradient(
      -45deg,
      var(--purple) 0 10px,
      var(--pink) 10px 20px
    );
}

body.dream-mode .footer {
  background: var(--purple);
}

@media (max-width: 1050px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-symbol {
    min-height: 330px;
    border-top: var(--border);
    border-left: 0;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .inspector {
    position: relative;
    top: auto;
  }
}

@media (max-width: 760px) {
    
    .remediation-number{font-size: 3rem !important;}
    
  .app-shell {
    width: min(100% - 22px, 1440px);
    padding-top: 14px;
  }

  .bento-card {
    border-radius: 17px;
    box-shadow: 3px 3px 0 var(--ink);
  }

  .hero {
    min-height: auto;
  }

  .hero-copy {
    padding: 32px 24px 40px;
  }

  .hero h1 {
    font-size: clamp(3.2rem, 18vw, 5.6rem);
  }

  .hero h1 span {
    -webkit-text-stroke-width: 1.5px;
  }

  .hero::before {
    display: none;
  }

  .hero-symbol {
    min-height: 280px;
  }

  .hero-actions,
  .hero-actions button {
    width: 100%;
  }

  .primary-button,
  .secondary-button {
    justify-content: center;
  }

  .stats-grid,
  .incident-grid,
  .remediation-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    min-height: 185px;
  }

  .audit-heading,
  .audit-result,
  .section-heading,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .audit-grade {
    width: 72px;
  }

  .section-heading {
    margin-bottom: 20px;
  }

  .filters {
    justify-content: flex-start;
  }

  .filter-button {
    font-size: 0.75rem;
  }

  .incident-card {
    min-height: 225px;
  }

  .incident-card h3 {
    margin-top: 40px;
  }

  .inspector {
    padding: 24px;
  }

  .footer > p {
    text-align: left;
  }

  .toast {
    right: 12px;
    bottom: 12px;
    left: 12px;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}


.navbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:18px 28px;
    margin-bottom:24px;
    position:sticky;
    top:10px;
    z-index:50;
}

.logo{
    font-size:1.8rem;
    font-weight:700;
    text-decoration:none;
    color:var(--ink);

    display:flex;
    align-items:center;
    flex-shrink:0;
}

.logo img{
    display:block;
    width:160px;
    height:auto;
}

/* Large screens */
@media (min-width:1200px){
    .logo img{
        width:200px;
    }
}

/* Tablets */
@media (max-width:992px){
    .logo img{
        width:160px;
    }
}

/* Mobile */
@media (max-width:768px){
    .navbar{
        padding:16px 20px;
    }

    .logo img{
        width:100px;
    }

    .menu-toggle{
        font-size:2rem;
    }
}

/* Small phones */
@media (max-width:480px){
    .logo img{
        width:100px;
    }
}

.nav-menu{
    display:flex;
    align-items:center;
    justify-content:space-between;
    flex:1;
    margin-left:40px;
}

.nav-links{
    display:flex;
    gap:30px;
}

.nav-links a,
.nav-link{
    text-decoration:none;
    color:var(--ink);
    font-weight:600;
}

.nav-actions{
    display:flex;
    align-items:center;
    gap:16px;
}

.menu-toggle{
    display:none;
    border:none;
    background:none;
    font-size:2rem;
    cursor:pointer;
}

/* Mobile */

@media (max-width:768px){

    .menu-toggle{
        display:block;
    }

    .nav-menu{
        display:none;
        position:absolute;
        top:100%;
        left:0;
        right:0;
        margin:12px 0 0;
        padding:20px;
        background:var(--white);
        border:var(--border);
        border-radius:18px;
        box-shadow:var(--shadow);

        flex-direction:column;
        gap:20px;
    }

    .nav-menu.active{
        display:flex;
        z-index: 5;
    }

    .nav-links{
        width:100%;
        flex-direction:column;
        align-items:center;
        gap:18px;
    }

    .nav-actions{
        width:100%;
        flex-direction:column;
    }

    .nav-actions .primary-button{
        width:100%;
        justify-content:center;
        text-decoration: none;
    }
}





.footer{
    margin-top:80px;
    padding:50px;
    display:flex;
    flex-direction:column;
    gap:30px;
    text-align: center;
}

.footer h2{
    margin-bottom:12px;
}

.footer p{
    max-width:600px;
    line-height:1.7;
}

.footer-links{
    display:flex;
    flex-wrap:wrap;
    gap:24px;
}

.footer-links a{
    text-decoration:none;
    color:var(--ink);
    font-weight:600;
}

.footer-copy{
    padding-top:20px;
    border-top:2px solid var(--ink);
    font-size:.9rem;
    opacity:.8;
}

@media(max-width:768px){
    .footer{
        padding:32px 24px;
        text-align: left;
    }

    .footer-links{
        flex-direction:column;
        gap:12px;
    }
}


/* ============================================================================
   MOBILE OPTIMIZATION
   Scoped entirely to ≤768px / ≤480px. The desktop layout (>768px) is untouched.
   `!important` is used only to override the inline styles on the partner-badge
   row and the hero image so they can adapt on phones.
   ============================================================================ */
@media (max-width: 768px) {
  /* Never allow sideways scroll on phones (clip, not hidden, so the sticky nav still works) */
  html,
  body {
    overflow-x: clip;
  }

  /* Headline: keep it bold but stop it from overflowing narrow screens */
  .hero h1 {
    font-size: clamp(2.6rem, 12vw, 4.4rem);
  }

  .hero-copy {
    padding: 26px 20px 30px;
  }

  /* The CTAs are <a> elements (not <button>), so force them full-width +
     stacked on mobile. The stock rule only targeted `button`. */
  .hero-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: 24px;
  }

  .hero-actions .primary-button,
  .hero-actions .secondary-button {
    width: 100%;
    justify-content: center;
  }

  /* Partner badge row (inline-styled → needs !important to adapt) */
  .hero-badges {
    padding: 1em 0 0.25em !important;
  }

  /* Size the logo by WIDTH so any aspect ratio scales cleanly to the phone
     (fixed height made wide logos overflow / look clumsy). */
  .hero-badges img {
    width: auto !important;
    height: auto !important;
    max-width: 60% !important;
    max-height: 80px !important;
  }

  /* Tighten the desktop-tuned vertical spacing between sections */
  .incident-section {
    margin-top: 40px;
  }

  .remediation-grid {
    margin-top: 20px;
  }

  /* Let cards size to their content so they don't look half-empty on phones */
  .remediation-card {
    min-height: auto;
    padding: 24px;
  }

  .incident-card {
    min-height: auto;
  }

  .incident-card h3 {
    max-width: 100%;
    margin-top: 36px;
  }

  .incident-card p {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: clamp(2.2rem, 11.5vw, 3.4rem);
  }

  .hero-badges img {
    max-width: 72% !important;
    max-height: 64px !important;
  }

  .filters {
    gap: 8px;
  }

  .filter-button {
    padding: 8px 12px;
  }
}
