:root {
  --blue: #2f5d9d;
  --blue-dark: #234b83;
  --blue-soft: #74a8d5;
  --ink: #243143;
  --muted: #54606d;
  --paper: #ffffff;
  --mist: #f5f8fb;
  --line: rgba(47, 93, 157, 0.18);
  --shadow: 0 12px 28px rgba(33, 58, 92, 0.16);
  --radius: 6px;
  --header-height: 108px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.58;
  overflow-x: hidden;
  overflow-x: clip;
}

body:has(dialog[open]) {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button {
  font: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
}

:focus-visible {
  outline: 3px solid rgba(47, 93, 157, 0.38);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 100;
  transform: translateY(-150%);
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 0 clamp(26px, 7vw, 72px);
  border-top: 3px solid var(--blue);
  background: white;
  box-shadow: 0 1px 0 rgba(47, 93, 157, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  text-decoration: none;
}

.brand-logo {
  width: clamp(56px, 6vw, 74px);
  height: clamp(56px, 6vw, 74px);
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: var(--blue);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1;
  text-transform: uppercase;
}

.brand-name {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-subtitle {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  color: var(--blue-soft);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.32em;
}

.brand-subtitle span {
  height: 2px;
  background: var(--blue-soft);
}

.brand-subtitle span:last-child {
  margin-right: 0.32em;
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: clamp(24px, 4vw, 50px);
}

.primary-nav a {
  position: relative;
  color: #263342;
  text-decoration: none;
  font-weight: 650;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -12px;
  height: 3px;
  transform: scaleX(0);
  transform-origin: center;
  background: var(--blue);
  transition: transform 160ms ease;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: var(--blue);
}

.primary-nav a:hover::after,
.primary-nav a:focus-visible::after {
  transform: scaleX(1);
}

.primary-nav a:first-child::after {
  transform: scaleX(1);
}

.hero {
  position: relative;
  min-height: 630px;
  display: grid;
  grid-template-columns: minmax(420px, 0.58fr) minmax(360px, 0.42fr);
  overflow: hidden;
  background: linear-gradient(90deg, #ffffff 0%, #ffffff 41%, rgba(255, 255, 255, 0.92) 53%, rgba(255, 255, 255, 0.18) 68%, rgba(255, 255, 255, 0) 100%);
}

.hero-panel {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  justify-items: start;
  min-width: 0;
  padding: clamp(50px, 8vw, 92px) clamp(30px, 7vw, 90px);
}

.hero-mark {
  width: clamp(135px, 15vw, 205px);
  height: auto;
  margin: 0 0 8px 92px;
}

.hero h1,
.section-heading h2,
.contact-copy h2 {
  margin: 0;
  color: var(--blue);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 560px;
  font-size: 6rem;
  line-height: 0.92;
}

.title-rule {
  display: block;
  width: 96px;
  height: 4px;
  margin: 24px 0 26px;
  background: var(--blue);
}

.title-rule.centered {
  margin: 18px auto 0;
}

.hero p {
  max-width: 560px;
  margin: 0;
  color: #2d3745;
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  min-height: 52px;
  padding: 13px 24px;
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 800;
}

.button-primary {
  color: white;
  background: var(--blue);
  box-shadow: 0 9px 18px rgba(47, 93, 157, 0.24);
}

.button-secondary {
  color: var(--blue);
  background: white;
}

.hero-image-wrap {
  position: absolute;
  inset: 0 0 0 42%;
  z-index: 1;
}

.hero-image-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, white 0%, rgba(255, 255, 255, 0.92) 20%, rgba(255, 255, 255, 0.36) 43%, rgba(255, 255, 255, 0) 66%);
}

.hero-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-section {
  padding: 42px clamp(24px, 6vw, 68px) clamp(60px, 7vw, 84px);
  background: var(--mist);
}

.section-heading {
  text-align: center;
  margin: 0 auto 42px;
}

.section-heading p {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-heading h2,
.contact-copy h2 {
  font-size: 3.5rem;
  line-height: 1.03;
}

.class-grid {
  width: min(1160px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 24px;
}

.class-card {
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
  color: var(--blue);
  text-align: left;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.class-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(33, 58, 92, 0.19);
}

.class-card img {
  width: 100%;
  aspect-ratio: 1.55 / 1;
  object-fit: cover;
}

.class-card-title {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 26px;
  color: var(--blue);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 700;
}

.class-card-title::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  transform: rotate(45deg);
  background: linear-gradient(135deg, var(--blue), var(--blue-soft));
}

.contact-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(300px, 0.86fr);
  gap: clamp(38px, 8vw, 96px);
  padding: clamp(58px, 7vw, 84px) clamp(30px, 7vw, 90px) 72px;
  overflow: hidden;
  background: white;
}

.contact-section::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -98px;
  z-index: 0;
  height: 150px;
  border-radius: 50% 50% 0 0;
  background: linear-gradient(90deg, var(--blue-dark), var(--blue));
  pointer-events: none;
}

.contact-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  align-self: start;
}

.contact-copy h2 {
  max-width: 470px;
}

.contact-copy p {
  max-width: 520px;
  margin: 0 0 28px;
  color: #2d3745;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 28px;
}

.social-links a {
  color: var(--blue);
  font-weight: 800;
  overflow-wrap: anywhere;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.contact-side {
  display: grid;
  position: relative;
  z-index: 1;
  min-width: 0;
  gap: 28px;
}

.contact-list {
  position: relative;
  display: grid;
  gap: 28px;
  margin: 0;
  padding: 0 0 0 clamp(28px, 5vw, 70px);
  border-left: 1px solid rgba(47, 93, 157, 0.32);
  font-style: normal;
}

.contact-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.contact-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef2f7;
  color: var(--blue);
}

.contact-icon svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.contact-item strong {
  display: block;
  color: var(--blue);
  font-size: 1.02rem;
}

.contact-item p,
.contact-item a,
.contact-item span[data-contact-email] {
  display: block;
  margin: 2px 0 0;
  color: #2d3745;
  font-size: 1.04rem;
  overflow-wrap: anywhere;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.contact-form {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
  box-shadow: 0 10px 22px rgba(33, 58, 92, 0.08);
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: var(--blue);
  font-weight: 800;
}

.form-honey {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  min-width: 0;
  width: 100%;
  border: 1px solid rgba(47, 93, 157, 0.22);
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
  padding: 11px 12px;
  font: inherit;
}

.contact-form input.is-invalid,
.contact-form select.is-invalid,
.contact-form textarea.is-invalid {
  border-color: #9d2f2f;
  box-shadow: 0 0 0 3px rgba(157, 47, 47, 0.12);
}

.contact-form textarea {
  resize: vertical;
}

.contact-form.is-sending {
  opacity: 0.78;
}

.contact-form.is-sending button {
  box-shadow: none;
}

.form-status {
  min-height: 1.6em;
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

.form-status.is-success {
  color: #286044;
}

.form-status.is-error {
  color: #9d2f2f;
}

.site-footer {
  position: relative;
  min-height: 48px;
  display: grid;
  place-items: center;
  background: var(--blue);
}

.site-footer img {
  position: absolute;
  top: -44px;
  width: 88px;
  height: auto;
}

.lightbox {
  width: min(1040px, calc(100% - 24px));
  max-height: min(880px, calc(100svh - 24px));
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  background: #0b121a;
  color: white;
  box-shadow: var(--shadow);
}

.lightbox::backdrop {
  background: rgba(5, 10, 16, 0.78);
}

.lightbox figure {
  margin: 0;
}

.lightbox img {
  width: 100%;
  max-height: 70svh;
  object-fit: contain;
  background: #05080d;
}

.lightbox figcaption {
  padding: 18px 22px 22px;
}

.lightbox figcaption strong,
.lightbox figcaption span {
  display: block;
}

.lightbox figcaption span,
.lightbox figcaption p {
  color: rgba(255, 255, 255, 0.74);
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(5, 8, 13, 0.72);
  color: white;
}

.lightbox-close {
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  font-size: 2rem;
  line-height: 1;
}

.lightbox-nav {
  top: 44%;
  width: 44px;
  height: 54px;
  font-size: 2rem;
}

.lightbox-prev {
  left: 12px;
}

.lightbox-next {
  right: 12px;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .brand-name {
    font-size: 1.78rem;
  }

  .brand-subtitle {
    font-size: 0.76rem;
  }

  .hero h1 {
    font-size: 5.15rem;
  }

  .section-heading h2,
  .contact-copy h2 {
    font-size: 3.1rem;
  }
}

@media (max-width: 920px) {
  :root {
    --header-height: 92px;
  }

  .site-header {
    gap: 20px;
  }

  .primary-nav {
    gap: 24px;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .hero-image-wrap {
    position: relative;
    inset: auto;
    height: 360px;
    order: -1;
  }

  .hero-image-wrap::before {
    background: linear-gradient(0deg, white 0%, rgba(255, 255, 255, 0.1) 40%, rgba(255, 255, 255, 0) 100%);
  }

  .hero-panel {
    padding-top: 34px;
  }

  .hero h1 {
    font-size: 4.35rem;
  }

  .hero p {
    font-size: 1.04rem;
  }

  .hero-mark {
    margin-left: 0;
  }

  .contact-section {
    grid-template-columns: 1fr;
  }

  .section-heading h2,
  .contact-copy h2 {
    font-size: 2.85rem;
  }

  .contact-list {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 640px) {
  :root {
    --header-height: auto;
  }

  .site-header {
    display: grid;
    justify-items: center;
    gap: 14px;
    padding-inline: 18px;
    padding-block: 16px;
  }

  .brand-logo {
    width: 58px;
    height: 58px;
  }

  .brand-copy {
    text-align: left;
  }

  .brand-name {
    font-size: 1.55rem;
  }

  .brand-subtitle {
    font-size: 0.7rem;
  }

  .primary-nav {
    gap: 22px;
    justify-content: center;
  }

  .hero h1 {
    font-size: 3.35rem;
  }

  .hero-image-wrap {
    height: 300px;
  }

  .hero-mark {
    width: 122px;
  }

  .section-heading h2,
  .contact-copy h2 {
    font-size: 2.3rem;
  }

  .hero-panel,
  .contact-section {
    padding-inline: 22px;
  }

  .portfolio-section {
    padding-inline: 18px;
  }

  .class-grid {
    gap: 18px;
  }

  .contact-item {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 16px;
  }

  .contact-icon {
    width: 52px;
    height: 52px;
  }

  .contact-form {
    padding: 18px;
  }

  .lightbox {
    width: calc(100% - 16px);
  }

  .lightbox img {
    max-height: 58svh;
  }
}

@media (max-width: 380px) {
  .brand-name {
    font-size: 1.34rem;
  }

  .brand-subtitle {
    font-size: 0.62rem;
    gap: 8px;
  }

  .primary-nav {
    gap: 16px;
    font-size: 0.94rem;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
