:root {
  color-scheme: light;
  --ink: #10232f;
  --muted: #5d6c75;
  --navy: #0b2637;
  --blue: #0c5f87;
  --cyan: #12a4bd;
  --orange: #ef7a28;
  --paper: #f5f8fa;
  --line: #d9e2e7;
  --white: #fff;
  --shadow: 0 22px 55px rgba(11, 38, 55, .12);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 5%, rgba(18, 164, 189, .13), transparent 25rem),
    linear-gradient(180deg, #eef5f8 0, var(--paper) 28rem);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

.portal-header {
  width: min(1180px, calc(100% - 40px));
  min-height: 84px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.portal-brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.portal-brand span {
  display: grid;
}

.portal-brand strong {
  font-size: 1.08rem;
  letter-spacing: .01em;
}

.portal-brand small {
  color: var(--muted);
  font-size: .77rem;
}

.portal-header nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.portal-header nav a {
  padding: 10px 14px;
  border-radius: 10px;
  color: #25404f;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
}

.portal-header nav a:hover,
.portal-header nav a:focus-visible {
  background: rgba(255, 255, 255, .78);
}

.portal-header .support-link {
  border: 1px solid rgba(12, 95, 135, .22);
  background: var(--white);
}

main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.portal-hero {
  min-height: 340px;
  margin-top: 24px;
  padding: clamp(38px, 7vw, 78px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  overflow: hidden;
  border-radius: 30px;
  color: var(--white);
  background:
    linear-gradient(120deg, rgba(11, 38, 55, .98), rgba(12, 95, 135, .9)),
    repeating-linear-gradient(135deg, transparent 0 26px, rgba(255,255,255,.04) 26px 27px);
  box-shadow: var(--shadow);
  position: relative;
}

.portal-hero::after {
  content: "";
  width: 330px;
  height: 330px;
  position: absolute;
  top: -140px;
  right: -80px;
  border: 55px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
}

.hero-copy {
  max-width: 760px;
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.portal-hero .eyebrow {
  color: #6ee7f3;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 16px;
  font-size: clamp(2.35rem, 6vw, 5.4rem);
  line-height: .96;
  letter-spacing: -.055em;
}

.hero-intro {
  max-width: 690px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, .82);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.hero-stat {
  min-width: 155px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 20px;
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 1;
}

.hero-stat strong {
  display: block;
  font-size: 3rem;
  line-height: 1;
}

.hero-stat span {
  color: rgba(255, 255, 255, .76);
  font-size: .86rem;
}

.tools-section {
  padding: 84px 0 38px;
}

.section-heading {
  max-width: 680px;
  margin-bottom: 30px;
}

.section-heading h2,
.portal-resource h2,
.portal-support h2 {
  margin-bottom: 8px;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  letter-spacing: -.035em;
}

.section-heading > p:last-child,
.portal-resource p,
.portal-support p {
  color: var(--muted);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.tool-card {
  min-height: 460px;
  padding: clamp(24px, 4vw, 38px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 12px 35px rgba(11, 38, 55, .07);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: #b8ccd7;
  box-shadow: 0 22px 46px rgba(11, 38, 55, .12);
}

.tool-card-upcoming {
  min-height: 250px;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 26px;
  background: linear-gradient(135deg, #fff, #edf4f7);
}

.tool-icon {
  width: 78px;
  height: 78px;
  margin-bottom: 28px;
  border-radius: 22px;
  background: #eaf5f8;
  position: relative;
  flex: 0 0 auto;
}

.tool-card-hvac .tool-icon {
  background: #e7f4f7;
}

.fan-centre {
  width: 15px;
  height: 15px;
  position: absolute;
  top: 32px;
  left: 32px;
  border-radius: 50%;
  background: var(--blue);
}

.fan-blade {
  width: 27px;
  height: 18px;
  position: absolute;
  top: 16px;
  left: 27px;
  border-radius: 100% 12% 100% 20%;
  background: var(--cyan);
  transform-origin: 12px 23px;
}

.fan-two {
  transform: rotate(120deg);
}

.fan-three {
  transform: rotate(240deg);
}

.chip-icon {
  display: grid;
  place-items: center;
  background: #fff0e5;
}

.chip-body {
  width: 48px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--white);
  background: var(--orange);
  font-size: .67rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.chip-pins {
  width: 13px;
  height: 48px;
  position: absolute;
  top: 15px;
  background: repeating-linear-gradient(to bottom, transparent 0 5px, #bc6a2e 5px 8px);
}

.chip-pins-left {
  left: 4px;
}

.chip-pins-right {
  right: 4px;
}

.plus-icon {
  margin: 0;
  display: grid;
  place-items: center;
  color: var(--blue);
  font-size: 3rem;
  font-weight: 300;
}

.tool-copy {
  flex: 1;
}

.tool-badge {
  display: inline-flex;
  margin-bottom: 11px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--blue);
  background: #e9f4f8;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.tool-card-smd .tool-badge {
  color: #a64d12;
  background: #fff0e5;
}

.tool-card-calculators .tool-badge {
  color: #5944a7;
  background: #f0ecff;
}

.tool-card-components .tool-badge {
  color: #08705d;
  background: #e6f8f2;
}

.tool-card-comparator .tool-badge { color: #8a4e0a; background: #fff1dc; }
.tool-card-faults .tool-badge { color: #0c6680; background: #e5f4f8; }
.tool-card-ideas .tool-badge { color: #6b4aa0; background: #f0eafb; }
.text-icon { display: grid; place-items: center; color: #fff; background: #0c6d8b; font-size: 1.35rem; font-weight: 950; letter-spacing: .04em; }
.tool-card-comparator .text-icon { background: #c87517; font-size: 2.1rem; }
.tool-card-faults .text-icon { background: #0c7b91; font-size: .92rem; }
.tool-card-ideas .text-icon { background: #7150a7; font-size: .75rem; }

.tool-card h3 {
  margin-bottom: 12px;
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  letter-spacing: -.035em;
}

.tool-card p {
  color: var(--muted);
}

.tool-card ul {
  margin: 20px 0 30px;
  padding: 0;
  display: grid;
  gap: 9px;
  list-style: none;
  color: #314b59;
  font-size: .92rem;
}

.tool-card li {
  padding-left: 22px;
  position: relative;
}

.tool-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-weight: 900;
}

.tool-button {
  min-height: 50px;
  padding: 13px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 13px;
  color: var(--white);
  background: var(--blue);
  font-weight: 850;
  text-decoration: none;
}

.tool-card-smd .tool-button {
  background: #c85b16;
}

.tool-card-calculators .tool-button {
  background: #5e4ab7;
}

.tool-card-components .tool-button {
  background: #087763;
}

.tool-card-comparator .tool-button { background: #b7650d; }
.tool-card-faults .tool-button { background: #0b7188; }
.tool-card-ideas .tool-button { background: #674698; }

.calculator-icon {
  padding: 11px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  color: #fff;
  background: #eeeaff;
}

.calculator-icon span {
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #6651bd;
  font-size: .72rem;
  font-weight: 900;
}

.components-icon {
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: #e6f8f2;
}

.components-icon span {
  width: 50px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #087763;
  font-size: .64rem;
  font-weight: 900;
  letter-spacing: .09em;
}

.components-icon i {
  width: 6px;
  height: 10px;
  position: absolute;
  top: 34px;
  background: #087763;
}

.components-icon i:nth-of-type(1) {
  left: 6px;
}

.components-icon i:nth-of-type(2) {
  left: 36px;
}

.components-icon i:nth-of-type(3) {
  right: 6px;
}

.tool-button:hover,
.tool-button:focus-visible {
  filter: brightness(1.08);
}

.tool-button-disabled {
  min-width: 150px;
  justify-content: center;
  color: #71818a;
  background: #dfe7eb;
}

.portal-resource,
.portal-support {
  margin: 34px 0;
  padding: clamp(24px, 4vw, 38px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--white);
}

.portal-resource img {
  width: 105px;
  height: 138px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 10px 22px rgba(11, 38, 55, .18);
}

.portal-resource p,
.portal-support p {
  margin-bottom: 0;
}

.portal-resource > a,
.portal-support > a {
  padding: 13px 18px;
  border: 1px solid var(--blue);
  border-radius: 12px;
  color: var(--blue);
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.portal-support {
  margin-bottom: 78px;
  color: var(--white);
  background: var(--navy);
  border-color: var(--navy);
  grid-template-columns: 1fr auto;
}

.portal-support .eyebrow {
  color: #70ddea;
}

.portal-support p {
  color: rgba(255, 255, 255, .72);
}

.portal-support > a {
  color: var(--white);
  border-color: rgba(255,255,255,.42);
}

footer {
  padding: 28px 20px 42px;
  color: #697983;
  text-align: center;
  font-size: .8rem;
}

footer p {
  margin-bottom: 5px;
}

@media (max-width: 760px) {
  .portal-header,
  main {
    width: min(100% - 24px, 1180px);
  }

  .portal-header {
    min-height: 72px;
  }

  .portal-brand img {
    width: 44px;
    height: 44px;
  }

  .portal-header nav a:first-child {
    display: none;
  }

  .portal-header .support-link {
    padding: 8px 10px;
    font-size: .78rem;
  }

  .portal-hero {
    min-height: 400px;
    margin-top: 10px;
    padding: 30px 24px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 24px;
    border-radius: 22px;
  }

  .hero-stat {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .hero-stat strong {
    font-size: 2.2rem;
  }

  .tools-section {
    padding-top: 58px;
  }

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

  .tool-card {
    min-height: 0;
    padding: 24px;
  }

  .tool-card-upcoming {
    grid-column: auto;
    grid-template-columns: auto 1fr;
  }

  .tool-card-upcoming .tool-button {
    grid-column: 1 / -1;
  }

  .portal-resource,
  .portal-support {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .portal-resource {
    grid-template-columns: 88px 1fr;
  }

  .portal-resource img {
    width: 88px;
    height: 116px;
  }

  .portal-resource > a {
    grid-column: 1 / -1;
    text-align: center;
  }

  .portal-support > a {
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
