/* =========================================================
   APPU.UK
   GLOBAL STYLESHEET
   ========================================================= */


/* =========================================================
   RESET
   ========================================================= */

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


html {
  scroll-behavior: smooth;
}


body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  background: #f3f6f8;
  color: #17222c;

  line-height: 1.6;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}


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


a {
  color: inherit;
}


button,
a {
  -webkit-tap-highlight-color: transparent;
}


/* =========================================================
   VARIABLES
   ========================================================= */

:root {

  --primary: #17324d;
  --primary-hover: #214866;

  --accent: #d79b22;
  --accent-hover: #b98116;

  --background: #f3f6f8;
  --surface: #ffffff;
  --surface-alt: #eaf0f4;

  --text: #17222c;
  --text-secondary: #43515d;
  --text-muted: #5b6975;

  --border: #d4dde4;

  --max-width: 1180px;

  --radius-small: 8px;
  --radius-medium: 12px;
  --radius-large: 18px;
}


/* =========================================================
   GLOBAL LAYOUT
   ========================================================= */

.container {
  width: min(
    calc(100% - 32px),
    var(--max-width)
  );

  margin-inline: auto;
}


main {
  min-height: 60vh;
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
  background: var(--primary);
  color: #ffffff;

  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}


.header-inner {
  width: min(
    calc(100% - 32px),
    var(--max-width)
  );

  min-height: 72px;

  margin-inline: auto;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 24px;
}


.site-logo {
  color: #ffffff;

  text-decoration: none;

  font-size: 1.7rem;
  font-weight: 800;

  letter-spacing: -0.04em;
}


.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}


.main-nav a {
  color: #ffffff;

  text-decoration: none;

  font-size: 0.95rem;
  font-weight: 600;

  opacity: 0.92;

  transition:
    opacity 0.2s ease,
    color 0.2s ease;
}


.main-nav a:hover,
.main-nav a:focus-visible {
  opacity: 1;
  color: #ffd77b;
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
  padding: 96px 0 100px;

  background:
    linear-gradient(
      135deg,
      #17324d 0%,
      #214866 100%
    );

  color: #ffffff;
}


.hero .container {
  max-width: 900px;
}


.hero-label,
.section-label {
  margin: 0 0 12px;

  font-size: 0.78rem;
  font-weight: 800;

  letter-spacing: 0.14em;

  text-transform: uppercase;
}


.hero-label {
  color: #ffd77b;
}


.hero h1 {
  max-width: 850px;

  margin: 0;

  font-size: clamp(
    2.3rem,
    6vw,
    4.5rem
  );

  line-height: 1.05;

  letter-spacing: -0.045em;
}


.hero-text {
  max-width: 700px;

  margin: 24px 0 0;

  color: #edf3f7;

  font-size: 1.15rem;
}


.hero-actions {
  display: flex;
  flex-wrap: wrap;

  gap: 12px;

  margin-top: 32px;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.button {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  min-height: 48px;

  padding: 0 22px;

  border-radius: var(--radius-small);

  text-decoration: none;

  font-weight: 750;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}


.button:hover {
  transform: translateY(-1px);
}


.button-primary {
  background: #ffffff;
  color: #17324d;
}


.button-primary:hover,
.button-primary:focus-visible {
  background: #edf3f7;
}


.button-secondary {
  background: transparent;
  color: #ffffff;

  border: 1px solid rgba(255, 255, 255, 0.55);
}


.button-secondary:hover,
.button-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.1);
}


/* =========================================================
   SECTIONS
   ========================================================= */

.content-section {
  padding: 80px 0;
}


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


.section-heading {
  max-width: 700px;

  margin-bottom: 36px;
}


.section-label {
  color: var(--primary);
}


.section-heading h2 {
  margin: 0;

  color: var(--text);

  font-size: clamp(
    1.8rem,
    4vw,
    2.6rem
  );

  line-height: 1.15;

  letter-spacing: -0.025em;
}


.section-heading p:last-child {
  margin: 12px 0 0;

  color: var(--text-secondary);

  font-size: 1.02rem;
}


/* =========================================================
   CARD GRID
   ========================================================= */

.card-grid {
  display: grid;

  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    );

  gap: 20px;
}


.content-card {
  display: flex;
  flex-direction: column;

  padding: 28px;

  background: var(--surface);

  border: 1px solid var(--border);

  border-radius: var(--radius-medium);

  box-shadow:
    0 4px 18px rgba(20, 40, 60, 0.05);
}


.card-icon {
  width: 48px;
  height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-bottom: 22px;

  border-radius: 10px;

  background: var(--primary);

  color: #ffffff;

  font-size: 0.72rem;
  font-weight: 800;

  letter-spacing: 0.03em;
}


.content-card h3 {
  margin: 0;

  color: var(--text);

  font-size: 1.25rem;

  line-height: 1.3;
}


.content-card p {
  margin: 10px 0 22px;

  color: var(--text-secondary);
}


.card-link {
  display: inline-flex;

  align-items: center;

  margin-top: auto;

  color: var(--primary);

  font-weight: 750;

  text-decoration: none;
}


.card-link::after {
  content: " →";

  transition: transform 0.2s ease;
}


.card-link:hover,
.card-link:focus-visible {
  color: var(--primary-hover);

  text-decoration: underline;
}


/* =========================================================
   ARTICLES
   ========================================================= */

.article-list {
  display: grid;

  gap: 16px;
}


.article-preview {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 32px;

  padding: 26px;

  background: var(--surface);

  border: 1px solid var(--border);

  border-radius: var(--radius-medium);
}


.article-meta {
  margin: 0 0 6px;

  color: var(--primary);

  font-size: 0.75rem;
  font-weight: 800;

  letter-spacing: 0.1em;
}


.article-preview h3 {
  margin: 0;

  font-size: 1.2rem;

  line-height: 1.35;
}


.article-preview p:not(.article-meta) {
  margin: 8px 0 0;

  color: var(--text-secondary);
}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  background: #152631;

  color: #eaf0f4;
}


.footer-inner {
  display: flex;

  align-items: flex-start;
  justify-content: space-between;

  gap: 40px;

  padding-top: 56px;
  padding-bottom: 40px;
}


.footer-logo {
  color: #ffffff;

  font-size: 1.5rem;
  font-weight: 800;

  text-decoration: none;
}


.footer-inner p {
  max-width: 340px;

  margin: 8px 0 0;

  color: #c4d0d8;
}


.footer-nav {
  display: flex;

  flex-wrap: wrap;

  justify-content: flex-end;

  gap: 10px 22px;
}


.footer-nav a {
  color: #dce5eb;

  text-decoration: none;

  font-size: 0.92rem;
}


.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: #ffffff;

  text-decoration: underline;
}


.footer-bottom {
  padding-top: 18px;
  padding-bottom: 22px;

  border-top: 1px solid rgba(255, 255, 255, 0.12);
}


.footer-bottom p {
  margin: 0;

  color: #b6c3cc;

  font-size: 0.85rem;
}


/* =========================================================
   FOCUS ACCESSIBILITY
   ========================================================= */

a:focus-visible,
button:focus-visible {
  outline: 3px solid #f4c65d;

  outline-offset: 3px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 800px) {

  .header-inner {
    min-height: 64px;

    flex-direction: column;

    justify-content: center;

    gap: 8px;

    padding: 14px 0;
  }


  .main-nav {
    width: 100%;

    justify-content: center;

    gap: 18px;
  }


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


  .content-section {
    padding: 64px 0;
  }


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


  .article-preview {
    align-items: flex-start;

    flex-direction: column;

    gap: 20px;
  }


  .footer-inner {
    flex-direction: column;
  }


  .footer-nav {
    justify-content: flex-start;
  }

}


@media (max-width: 560px) {

  .container,
  .header-inner {
    width: min(
      calc(100% - 24px),
      var(--max-width)
    );
  }


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


  .hero-text {
    font-size: 1rem;
  }


  .hero-actions {
    flex-direction: column;

    align-items: stretch;
  }


  .button {
    width: 100%;
  }


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


  .main-nav {
    gap: 12px;
  }


  .main-nav a {
    font-size: 0.85rem;
  }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }


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

}
