/* ==========================================================================
   medelyan.com — Alyona Medelyan
   ========================================================================== */

:root {
  --navy: rgb(27, 42, 65);
  --navy-soft: rgba(27, 42, 65, 0.72);
  --navy-faint: rgba(27, 42, 65, 0.12);
  --offwhite: rgb(250, 247, 242);
  --offwhite-warm: rgb(244, 240, 233);
  --plum: rgb(77, 21, 139);
  --plum-dark: rgb(58, 15, 105);
  --plum-faint: rgba(77, 21, 139, 0.08);
  --white: #fff;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";

  --wrap: 1080px;
  --wrap-narrow: 760px;
  --radius: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.65;
  color: var(--navy);
  background: var(--offwhite);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--plum);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

a:hover,
a:focus-visible {
  color: var(--plum-dark);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--plum);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
}

h2 {
  font-size: clamp(1.55rem, 3.4vw, 2.1rem);
}

h3 {
  font-size: 1.2rem;
  letter-spacing: 0;
}

p {
  margin: 0 0 1.1em;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 10px 16px;
  z-index: 100;
}

.skip-link:focus {
  left: 8px;
  top: 8px;
}

/* --------------------------------------------------------- Header / nav */

.site-header {
  background: var(--navy);
  color: var(--white);
  padding: 14px 0;
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
}

.wordmark {
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
  margin-right: auto;
}

.wordmark:hover,
.wordmark:focus-visible {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 4px 0;
  display: inline-block;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--white);
  border-bottom-color: rgba(255, 255, 255, 0.5);
}

.site-nav a[aria-current="page"] {
  color: var(--white);
  border-bottom-color: var(--white);
}

.nav-cta {
  background: var(--white);
  color: var(--navy) !important;
  border-radius: 999px;
  padding: 8px 18px !important;
  font-weight: 600;
  border-bottom: 0 !important;
  white-space: nowrap;
}

.nav-cta:hover,
.nav-cta:focus-visible {
  background: var(--offwhite-warm);
}

/* --------------------------------------------------------------- Buttons */

.btn {
  display: inline-block;
  background: var(--plum);
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 999px;
  border: 2px solid var(--plum);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--plum-dark);
  border-color: var(--plum-dark);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--plum);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: var(--plum);
  color: var(--white);
}

/* ------------------------------------------------------------------ Hero */

.hero {
  padding: 72px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero-grid.reverse .hero-copy {
  order: 2;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--plum);
  margin: 0 0 12px;
}

.lead {
  font-size: 1.1rem;
  color: var(--navy-soft);
  max-width: 56ch;
}

.hero-media img {
  border-radius: var(--radius);
  width: 100%;
}

.hero-actions {
  margin-top: 28px;
}

.hero-full {
  margin-top: 40px;
}

.hero-full img {
  border-radius: var(--radius);
  width: 100%;
}

/* -------------------------------------------------------------- Sections */

.section {
  padding: 60px 0;
  border-top: 1px solid var(--navy-faint);
}

.section-alt {
  background: var(--offwhite-warm);
}

.section .narrow {
  max-width: var(--wrap-narrow);
}

.section h3 {
  margin-top: 2em;
}

.section h3:first-of-type {
  margin-top: 1em;
}

.note {
  font-size: 0.92rem;
  color: var(--navy-soft);
  font-style: italic;
  margin-bottom: 1.6em;
}

/* ------------------------------------------------------------------ Lists */

.link-list {
  list-style: none;
  margin: 0 0 1.5em;
  padding: 0;
}

.link-list li {
  padding: 12px 0 12px 20px;
  border-bottom: 1px solid var(--navy-faint);
  position: relative;
}

.link-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 23px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--plum);
}

.link-list li:last-child {
  border-bottom: 0;
}

/* ----------------------------------------------------------------- Cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 28px;
}

.card {
  background: var(--white);
  border: 1px solid var(--navy-faint);
  border-radius: var(--radius);
  padding: 26px;
}

.card h3 {
  margin-top: 0;
}

.card p:last-child {
  margin-bottom: 0;
}

.card .btn {
  margin-top: 8px;
}

.card-feature {
  margin-top: 28px;
  border-left: 4px solid var(--plum);
}

/* ------------------------------------------------------------ Testimonials */

.quotes {
  display: grid;
  gap: 22px;
  margin-top: 28px;
}

.quote {
  margin: 0;
  background: var(--white);
  border: 1px solid var(--navy-faint);
  border-radius: var(--radius);
  padding: 26px 28px;
}

.quote blockquote {
  margin: 0;
  position: relative;
}

.quote blockquote p {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.6;
}

.quote blockquote p::before {
  content: "\201C";
  color: var(--plum);
  font-size: 2.2rem;
  line-height: 0;
  vertical-align: -0.35em;
  margin-right: 4px;
}

.quote blockquote p::after {
  content: "\201D";
  color: var(--plum);
  font-size: 2.2rem;
  line-height: 0;
  vertical-align: -0.35em;
  margin-left: 2px;
}

.quote figcaption {
  margin-top: 14px;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy-soft);
}

/* --------------------------------------------------------------- Figures */

.figure {
  margin: 36px 0;
}

.figure img {
  border-radius: var(--radius);
  width: 100%;
}

.figure figcaption {
  font-size: 0.88rem;
  color: var(--navy-soft);
  margin-top: 10px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.gallery img {
  border-radius: var(--radius);
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* -------------------------------------------------------------- CTA band */

.cta-band {
  background: var(--navy);
  color: var(--white);
  padding: 56px 0;
  text-align: center;
}

.cta-band h2 {
  color: var(--white);
}

.cta-band p {
  color: rgba(255, 255, 255, 0.82);
  max-width: 54ch;
  margin-left: auto;
  margin-right: auto;
}

.cta-band .btn {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
  margin-top: 10px;
}

.cta-band .btn:hover,
.cta-band .btn:focus-visible {
  background: var(--offwhite-warm);
  border-color: var(--offwhite-warm);
  color: var(--navy);
}

/* ---------------------------------------------------------------- Footer */

.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.78);
  padding: 36px 0;
  font-size: 0.92rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
}

.site-footer a {
  color: var(--white);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--white);
  border-bottom-color: var(--white);
}

.site-footer p {
  margin: 0;
}

/* ------------------------------------------------------------------- 404 */

.error-page {
  padding: 110px 0 120px;
  text-align: center;
}

.error-page .wrap {
  max-width: 620px;
}

.error-code {
  font-size: clamp(3.4rem, 11vw, 5.5rem);
  font-weight: 700;
  color: var(--plum);
  line-height: 1;
  margin: 0 0 12px;
}

/* ------------------------------------------------------------ Responsive */

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

  .hero-grid.reverse .hero-copy {
    order: 0;
  }

  .hero {
    padding: 48px 0;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 17px;
  }

  .wrap {
    padding: 0 18px;
  }

  .site-header .wrap {
    gap: 12px 18px;
  }

  .wordmark {
    margin-right: 0;
    width: 100%;
  }

  .site-nav {
    width: 100%;
  }

  .site-nav ul {
    gap: 2px 16px;
  }

  .site-nav a {
    font-size: 0.9rem;
  }

  .nav-cta {
    padding: 7px 15px !important;
  }

  .section {
    padding: 44px 0;
  }

  .btn {
    padding: 13px 24px;
  }
}

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

  * {
    transition: none !important;
  }
}
