@layer layout, components, responsive;

@layer layout {
  .container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }
  .section { padding-block: var(--space-8); }
  .section-heading { margin-bottom: var(--space-6); }
  .section-heading h2 { max-width: 17ch; }
  .split-heading { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(18rem, .9fr); gap: var(--space-5); align-items: end; }
  .split-heading > p { color: var(--color-text-muted); justify-self: end; }
  .centered-heading { text-align: center; display: grid; justify-items: center; }
  .centered-heading p:last-child { margin-top: var(--space-3); color: var(--color-text-muted); }
}

@layer components {
  .skip-link {
    position: fixed; top: .75rem; left: .75rem; z-index: 9999;
    transform: translateY(-180%); padding: .7rem 1rem; border-radius: .6rem;
    background: var(--color-white); color: var(--color-brand-dark); font-weight: 700;
  }
  .skip-link:focus { transform: translateY(0); }

  .site-header {
    position: sticky; top: 0; z-index: 100;
    min-height: var(--header-height);
    background: rgb(255 255 255 / 0.94);
    border-bottom: 1px solid rgb(9 38 81 / 0.08);
    backdrop-filter: blur(14px);
  }
  .header-inner { min-height: var(--header-height); display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
  .brand { display: inline-flex; align-items: center; text-decoration: none; flex: 0 0 auto; }
  .brand img { width: 7.6rem; height: auto; }
  .site-nav { display: flex; align-items: center; gap: .35rem; }
  .site-nav a { min-height: 2.75rem; display: inline-flex; align-items: center; padding: .55rem .8rem; border-radius: .65rem; color: var(--color-text-muted); text-decoration: none; font-size: var(--step--1); font-weight: 670; }
  .site-nav a:hover { color: var(--color-brand-dark); background: var(--color-surface-muted); }
  .site-nav .nav-system { margin-left: .35rem; color: var(--color-white); background: var(--color-brand-dark); padding-inline: 1rem; }
  .site-nav .nav-system:hover { color: var(--color-white); background: var(--color-brand); }
  .menu-toggle { display: none; min-width: 2.75rem; min-height: 2.75rem; border: 0; border-radius: .7rem; background: transparent; color: var(--color-brand-dark); cursor: pointer; }
  .menu-toggle-lines { width: 1.35rem; display: grid; gap: .27rem; margin: auto; }
  .menu-toggle-lines span { height: 2px; border-radius: 2px; background: currentColor; transition: transform var(--transition), opacity var(--transition); }
  .menu-toggle[aria-expanded="true"] .menu-toggle-lines span:nth-child(1) { transform: translateY(.29rem) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-toggle-lines span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] .menu-toggle-lines span:nth-child(3) { transform: translateY(-.29rem) rotate(-45deg); }

  .hero { position: relative; overflow: hidden; background: var(--color-surface-dark); color: var(--color-white); padding-block: clamp(5rem, 9vw, 8.5rem); }
  .hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgb(255 255 255 / .045) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .045) 1px, transparent 1px); background-size: 64px 64px; mask-image: linear-gradient(to bottom, #000, transparent 92%); }
  .hero::after { content: ""; position: absolute; width: 32rem; aspect-ratio: 1; right: -12rem; top: -12rem; border-radius: 50%; background: radial-gradient(circle, rgb(1 112 185 / .46), rgb(1 112 185 / 0) 70%); }
  .hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(20rem, .92fr); gap: clamp(3rem, 7vw, 7rem); align-items: center; }
  .hero h1 { color: var(--color-white); max-width: 12ch; }
  .eyebrow { margin-bottom: 1rem; color: #8fd5ff; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
  .eyebrow-dark { color: var(--color-brand); }
  .hero-brand-line { margin-top: 1.1rem; color: #8fd5ff; font-size: var(--step-1); font-weight: 720; letter-spacing: -.02em; }
  .hero-lead { margin-top: 1.1rem; max-width: 57ch; color: rgb(255 255 255 / .76); font-size: var(--step-1); }
  .hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
  .button { min-height: 3.15rem; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .78rem 1.25rem; border: 1px solid transparent; border-radius: .8rem; text-decoration: none; font-weight: 760; line-height: 1.2; transition: transform var(--transition), background var(--transition), border-color var(--transition), color var(--transition); }
  .button:hover { transform: translateY(-1px); text-decoration: none; }
  .button-primary { background: var(--color-brand); color: var(--color-white); }
  .button-primary:hover { background: var(--color-brand-hover); color: var(--color-white); }
  .button-secondary-on-dark { border-color: rgb(255 255 255 / .34); color: var(--color-white); background: rgb(255 255 255 / .04); }
  .button-secondary-on-dark:hover { border-color: rgb(255 255 255 / .68); background: rgb(255 255 255 / .1); }
  .button-accent { background: var(--color-white); color: var(--color-brand-dark); }
  .button-accent:hover { background: #eaf6ff; }
  .button-light { background: var(--color-white); color: var(--color-brand-dark); }
  .button-light:hover { background: #f4f9ff; }
  .button-block { width: 100%; margin-top: auto; }
  .hero-trust-list { list-style: none; display: flex; flex-wrap: wrap; gap: .7rem 1.4rem; margin-top: 2rem; color: rgb(255 255 255 / .67); font-size: var(--step--1); }
  .hero-trust-list li { position: relative; padding-left: 1rem; }
  .hero-trust-list li::before { content: ""; position: absolute; left: 0; top: .65em; width: .35rem; height: .35rem; border-radius: 50%; background: #55b9f5; }

  .hero-panel { border: 1px solid rgb(255 255 255 / .14); border-radius: var(--radius-xl); background: rgb(255 255 255 / .07); box-shadow: 0 28px 90px rgb(0 0 0 / .24); overflow: hidden; backdrop-filter: blur(8px); }
  .hero-panel-top { display: flex; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid rgb(255 255 255 / .1); color: rgb(255 255 255 / .62); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
  .status-dot::before { content: ""; display: inline-block; width: .45rem; height: .45rem; margin-right: .45rem; border-radius: 50%; background: #52d29b; box-shadow: 0 0 0 .25rem rgb(82 210 155 / .12); }
  .hero-panel-main { padding: 2rem 1.5rem 2.25rem; }
  .panel-kicker { color: #7cc7ff; font-size: .8rem; font-weight: 760; text-transform: uppercase; letter-spacing: .09em; }
  .panel-title { margin-top: .7rem; max-width: 24ch; color: var(--color-white); font-size: var(--step-2); font-weight: 760; line-height: 1.18; }
  .hero-panel-grid { display: grid; grid-template-columns: repeat(2,1fr); border-top: 1px solid rgb(255 255 255 / .1); }
  .hero-panel-grid > div { min-height: 8.6rem; display: grid; align-content: start; gap: .2rem; padding: 1.2rem; border-right: 1px solid rgb(255 255 255 / .1); border-bottom: 1px solid rgb(255 255 255 / .1); }
  .hero-panel-grid > div:nth-child(2n) { border-right: 0; }
  .hero-panel-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
  .hero-panel-grid strong { color: var(--color-white); }
  .hero-panel-grid small { color: rgb(255 255 255 / .56); line-height: 1.4; }
  .panel-number { color: #62bdf1; font-size: .72rem; font-weight: 800; letter-spacing: .08em; }

  .section-services { background: var(--color-surface); }
  .service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
  .service-card { min-height: 18rem; padding: 1.5rem; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); }
  .service-card:hover { transform: translateY(-3px); border-color: #c9dceb; box-shadow: var(--shadow-sm); }
  .service-index { display: inline-flex; margin-bottom: 3.5rem; color: var(--color-brand); font-size: .75rem; font-weight: 800; letter-spacing: .08em; }
  .service-card h3 { font-size: 1.35rem; letter-spacing: -.02em; }
  .service-card p { margin-top: .8rem; color: var(--color-text-muted); font-size: var(--step--1); }

  .section-plans { background: var(--color-surface-muted); }
  .plans-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; align-items: stretch; }
  .plan-card { position: relative; display: flex; flex-direction: column; padding: 1.5rem; border: 1px solid #dfe4e8; border-radius: var(--radius-lg); background: var(--color-white); box-shadow: var(--shadow-sm); }
  .plan-card-featured { color: var(--color-white); border-color: var(--color-brand-dark); background: var(--color-brand-dark); box-shadow: var(--shadow-md); }
  .plan-card-featured h3, .plan-card-featured .plan-label { color: var(--color-white); }
  .plan-card-featured .plan-card-head > p:last-child, .plan-card-featured .check-list, .plan-card-featured .plan-details { color: rgb(255 255 255 / .76); }
  .plan-card-featured .check-list li { border-color: rgb(255 255 255 / .12); }
  .plan-card-featured .check-list li::before { color: #68c4f8; }
  .plan-card-featured .plan-details { border-color: rgb(255 255 255 / .14); }
  .plan-card-featured .plan-details summary { color: var(--color-white); }
  .plan-card-featured .plan-details li::marker { color: #68c4f8; }
  .plan-badge { position: absolute; top: -1rem; right: 1rem; padding: .42rem .72rem; border-radius: 999px; background: var(--color-brand); color: var(--color-white); font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 8px 22px rgb(1 112 185 / .28); }
  .plan-label { margin-bottom: .65rem; color: var(--color-brand); font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
  .plan-card-head > p:last-child { margin-top: .8rem; color: var(--color-text-muted); font-size: var(--step--1); }
  .check-list { list-style: none; margin-block: 1.5rem; }
  .check-list li { position: relative; padding: .72rem 0 .72rem 1.55rem; border-bottom: 1px solid var(--color-border); font-size: var(--step--1); }
  .check-list li:last-child { border-bottom: 0; }
  .check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--color-brand); font-weight: 900; }
  .plan-details { margin-bottom: 1.3rem; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
  .plan-details summary { cursor: pointer; min-height: 3rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: var(--color-brand-dark); font-weight: 740; font-size: .9rem; list-style: none; }
  .plan-details summary::-webkit-details-marker { display: none; }
  .plan-details summary::after { content: "+"; font-size: 1.25rem; font-weight: 500; }
  .plan-details[open] summary::after { content: "–"; }
  .plan-details ul { padding: 0 0 1.25rem 1.2rem; }
  .plan-details li { margin-top: .55rem; font-size: .84rem; line-height: 1.5; }
  .plan-details li::marker { color: var(--color-brand); }

  .section-guide { background: var(--color-white); }
  .guide-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(3rem, 7vw, 7rem); align-items: start; }
  .guide-copy { position: sticky; top: calc(var(--header-height) + 2rem); }
  .guide-copy p:not(.eyebrow) { margin-top: 1rem; color: var(--color-text-muted); }
  .text-link { display: inline-flex; gap: .6rem; margin-top: 1.35rem; color: var(--color-brand); font-weight: 780; text-decoration: none; }
  .text-link:hover { color: var(--color-brand-dark); }
  .guide-list { list-style: none; counter-reset: guide; }
  .guide-list li { display: grid; grid-template-columns: 5.5rem 1fr; gap: .3rem 1.2rem; padding: 1.6rem 0; border-top: 1px solid var(--color-border); }
  .guide-list li:last-child { border-bottom: 1px solid var(--color-border); }
  .guide-list span { grid-row: 1 / 3; color: var(--color-brand); font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
  .guide-list strong { color: var(--color-heading); font-size: 1.15rem; }
  .guide-list p { color: var(--color-text-muted); font-size: var(--step--1); }

  .cta-band { padding-block: var(--space-7); background: var(--color-brand); color: var(--color-white); }
  .cta-inner { display: flex; justify-content: space-between; gap: 2rem; align-items: center; }
  .cta-inner h2 { max-width: 18ch; color: var(--color-white); }

  .section-contact { background: #eef5f9; }
  .contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(3rem, 7vw, 7rem); }
  .contact-heading p:not(.eyebrow) { margin-top: 1rem; color: var(--color-text-muted); }
  .contact-heading .button { margin-top: 1.5rem; }
  .contact-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); border-top: 1px solid #cad8e3; border-left: 1px solid #cad8e3; }
  .contact-item { min-height: 10rem; display: flex; flex-direction: column; justify-content: space-between; gap: .7rem; padding: 1.25rem; border-right: 1px solid #cad8e3; border-bottom: 1px solid #cad8e3; text-decoration: none; background: rgb(255 255 255 / .5); }
  .contact-item:hover { background: var(--color-white); }
  .contact-label { color: var(--color-brand); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
  .contact-item strong { color: var(--color-heading); line-height: 1.25; }
  .contact-item > span:last-child { color: var(--color-text-muted); font-size: .84rem; }

  .site-footer { background: #071b38; color: rgb(255 255 255 / .7); padding-top: 3.5rem; }
  .footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: start; }
  .footer-brand img { width: 8rem; height: auto; filter: brightness(0) invert(1); opacity: .92; }
  .footer-brand p { margin-top: 1rem; font-size: var(--step--1); }
  .footer-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .35rem 1rem; }
  .footer-nav a { color: var(--color-white); text-decoration: none; font-size: .86rem; font-weight: 650; }
  .footer-nav a:hover { color: #8fd5ff; }
  .footer-bottom { margin-top: 3rem; padding-block: 1.25rem; border-top: 1px solid rgb(255 255 255 / .1); font-size: .78rem; }
}

@layer responsive {
  @media (max-width: 62rem) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-copy { max-width: 48rem; }
    .hero-panel { max-width: 42rem; }
    .service-grid { grid-template-columns: repeat(2, 1fr); }
    .plans-grid { grid-template-columns: 1fr; max-width: 46rem; margin-inline: auto; }
    .plan-card { padding: 1.75rem; }
    .guide-grid, .contact-grid { grid-template-columns: 1fr; }
    .guide-copy { position: static; }
  }

  @media (max-width: 46rem) {
    :root { --header-height: 4.5rem; }
    .container { width: min(100% - 1.25rem, var(--container)); }
    .section { padding-block: var(--space-7); }
    .brand img { width: 6.6rem; }
    .js .menu-toggle { display: inline-grid; place-items: center; }
    .site-nav { flex-wrap: wrap; gap: .25rem; }
    .js .site-nav { position: absolute; inset: var(--header-height) .625rem auto; display: none; padding: .6rem; border: 1px solid var(--color-border); border-radius: 1rem; background: var(--color-white); box-shadow: var(--shadow-md); }
    .js .site-nav[data-open="true"] { display: grid; }
    .js .site-nav a { width: 100%; }
    .js .site-nav .nav-system { margin: .3rem 0 0; justify-content: center; }
    .no-js .header-inner { flex-wrap: wrap; padding-block: .7rem; }
    .no-js .site-nav { width: 100%; }
    .split-heading { grid-template-columns: 1fr; align-items: start; }
    .split-heading > p { justify-self: start; }
    .service-grid { grid-template-columns: 1fr; }
    .service-card { min-height: 15rem; }
    .service-index { margin-bottom: 2.25rem; }
    .hero { padding-block: 4.5rem; }
    .hero-panel-grid { grid-template-columns: 1fr; }
    .hero-panel-grid > div { min-height: 7rem; border-right: 0; border-bottom: 1px solid rgb(255 255 255 / .1) !important; }
    .hero-panel-grid > div:last-child { border-bottom: 0 !important; }
    .hero-actions { display: grid; }
    .hero-actions .button { width: 100%; }
    .guide-list li { grid-template-columns: 1fr; }
    .guide-list span { grid-row: auto; }
    .cta-inner { align-items: flex-start; flex-direction: column; }
    .contact-list { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-nav { justify-content: flex-start; }
  }
}

@layer components { .error-page { min-height: 100vh; display: grid; place-items: center; } .error-title { color: var(--color-white); max-width: 12ch; } }
