@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap");

:root {
  --primary-color: #0f9d8a;
  --primary-light: #2dd4bf;
  --secondary-color: #168be3;
  --dark-color: #071522;
  --dark-card: #0d2233;
  --text-color: #253746;
  --light-text: #61717e;
  --white: #ffffff;
  --border-color: rgba(15, 157, 138, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  font-size: 62.5%;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 12% 15%,
      rgba(15, 157, 138, 0.13),
      transparent 28%
    ),
    radial-gradient(
      circle at 88% 75%,
      rgba(22, 139, 227, 0.12),
      transparent 30%
    ),
    linear-gradient(
      135deg,
      #030a12 0%,
      #071522 48%,
      #04101a 100%
    );
  color: var(--text-color);
  font-family: "Poppins", sans-serif;
}

/* Selection */

::selection {
  background: var(--primary-color);
  color: var(--white);
}

/* Scrollbar */

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #04101a;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(
    to bottom,
    var(--primary-light),
    var(--primary-color)
  );
  border: 2px solid #04101a;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #55e6d1;
}

html {
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) #04101a;
}

/* Navbar */

header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;

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

  width: 100%;
  min-height: 6.5rem;
  padding: 1.5rem 8%;

  background: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

header .logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;

  color: var(--dark-color);
  font-size: 2rem;
  font-weight: 700;
}

header .logo i {
  color: var(--primary-color);
  font-size: 2.2rem;
}

header .logo:hover {
  color: var(--primary-color);
}

header .navbar ul {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  list-style: none;
}

header .navbar ul li a {
  position: relative;
  color: var(--dark-color);
  font-size: 1.45rem;
  font-weight: 600;
  transition: color 0.3s ease;
}

header .navbar ul li a::after {
  position: absolute;
  bottom: -0.6rem;
  left: 0;

  width: 0;
  height: 0.2rem;

  background: var(--primary-color);
  content: "";
  transition: width 0.3s ease;
}

header .navbar ul li a:hover,
header .navbar ul li a.active {
  color: var(--primary-color);
}

header .navbar ul li a:hover::after,
header .navbar ul li a.active::after {
  width: 100%;
}

/* Hamburger menu */

#menu {
  display: none;
  color: var(--dark-color);
  font-size: 2.7rem;
  cursor: pointer;
}

/* Main */

main {
  min-height: 100vh;
  padding-top: 6.5rem;
}

/* Stories section */

.stories {
  position: relative;
  min-height: 100vh;
  padding: 5rem 7% 6rem;
}

/* Subtle background grid */

.stories::before {
  position: absolute;
  inset: 0;
  z-index: 0;

  background-image:
    linear-gradient(
      rgba(255, 255, 255, 0.018) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.018) 1px,
      transparent 1px
    );

  background-size: 44px 44px;
  content: "";
  pointer-events: none;
}

.section-heading,
.story-gallery,
.back-button {
  position: relative;
  z-index: 1;
}

/* Heading */

.section-heading {
  max-width: 85rem;
  margin: 0 auto 4.5rem;
  text-align: center;
}

.section-heading h1 {
  color: var(--white);
  font-size: 4.2rem;
  font-weight: 800;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
}

.section-heading h1 i {
  margin-right: 1rem;
  color: var(--primary-light);
}

.section-heading h1 span {
  color: var(--primary-light);
}

.section-heading p {
  margin-top: 1.3rem;
  color: #b9c9d5;
  font-size: 1.7rem;
  line-height: 1.8;
}

/* Pinterest masonry gallery */

.story-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 10px;
  grid-auto-flow: dense;
  gap: 2rem;

  max-width: 118rem;
  margin: 0 auto;
  align-items: start;
}

/* Story card */

.story-card {
  display: block;
  overflow: hidden;

  width: 100%;
  margin: 0;

  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(45, 212, 191, 0.2);
  border-radius: 1.2rem;

  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.3),
    0 0 18px rgba(45, 212, 191, 0.05);

  break-inside: avoid;

  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.story-card:hover {
  transform: translateY(-7px);
  border-color: rgba(45, 212, 191, 0.65);

  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.38),
    0 0 24px rgba(45, 212, 191, 0.14);
}

/* Story images */

.story-card img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;

  transition:
    transform 0.45s ease,
    filter 0.35s ease;
}

.story-card:hover img {
  transform: scale(1.035);
  filter: brightness(1.04) saturate(1.05);
}

/* Story text */

.story-content {
  padding: 2rem 2rem 2.2rem;
}

.story-content h2 {
  margin-bottom: 0.9rem;
  color: #102a43;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.4;
}

.story-content p {
  color: var(--light-text);
  font-size: 1.4rem;
  line-height: 1.75;
}
/* Text-only memory cards */

.memory-note {
  min-height: 18rem;
  background:
    radial-gradient(
      circle at 85% 15%,
      rgba(255, 255, 255, 0.14),
      transparent 30%
    ),
    linear-gradient(
      145deg,
      #0f9d8a,
      #087c6d
    );

  border-color: rgba(255, 255, 255, 0.2);
}

.memory-note-blue {
  background:
    radial-gradient(
      circle at 15% 85%,
      rgba(255, 255, 255, 0.14),
      transparent 30%
    ),
    linear-gradient(
      145deg,
      #168be3,
      #0d648f
    );
}

/* Sunset memory card */

.memory-note-sunset {
  background:
    radial-gradient(
      circle at 85% 15%,
      rgba(255, 255, 255, 0.18),
      transparent 32%
    ),
    linear-gradient(
      145deg,
      #d96c75,
      #a34f8c
    );
}

/* Mountain memory card */

.memory-note-mountain {
  background:
    radial-gradient(
      circle at 15% 15%,
      rgba(255, 255, 255, 0.14),
      transparent 32%
    ),
    linear-gradient(
      145deg,
      #276b62,
      #173d4b
    );
}

/* Ocean memory card */

.memory-note-ocean {
  background:
    radial-gradient(
      circle at 85% 80%,
      rgba(255, 255, 255, 0.16),
      transparent 34%
    ),
    linear-gradient(
      145deg,
      #168be3,
      #075985
    );
}

.memory-note-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 18rem;
  padding: 2.2rem;
}

.memory-note-content i {
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 3rem;
}

.memory-note-content h2 {
  margin-bottom: 1.2rem;
  color: #ffffff;
  font-size: 2.2rem;
  line-height: 1.35;
}

.memory-note-content p {
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.4rem;
  line-height: 1.8;
}

.memory-note:hover {
  transform: translateY(-7px) rotate(-1deg);
}

.story-card:nth-child(3n + 1) {
  transform: rotate(-0.4deg);
}

.story-card:nth-child(3n + 2) {
  transform: rotate(0.4deg);
}

.story-card:nth-child(3n + 1):hover,
.story-card:nth-child(3n + 2):hover {
  transform: translateY(-7px) rotate(0);
}
/* Decorative accent */

.story-content::before {
  display: block;

  width: 4rem;
  height: 0.35rem;
  margin-bottom: 1.3rem;

  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );

  border-radius: 1rem;
  content: "";
}

/* Back button */

.back-button {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.back-button a {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;

  padding: 1.3rem 2.4rem;

  background: linear-gradient(
    135deg,
    var(--secondary-color),
    var(--primary-color)
  );

  border: 1px solid rgba(45, 212, 191, 0.42);
  border-radius: 0.8rem;

  color: var(--white);
  font-size: 1.6rem;
  font-weight: 600;

  box-shadow:
    0 8px 20px rgba(15, 157, 138, 0.28),
    0 0 14px rgba(45, 212, 191, 0.1);

  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.back-button a:hover {
  transform: translateY(-3px);

  box-shadow:
    0 12px 27px rgba(15, 157, 138, 0.4),
    0 0 20px rgba(45, 212, 191, 0.18);
}

.back-button a:hover i {
  transform: translateX(-5px);
}

.back-button a i {
  transition: transform 0.3s ease;
}

/* Footer */

.footer {
  padding: 4rem 8% 2rem;
  background: #00012b;
  color: var(--white);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;

  max-width: 115rem;
  margin: 0 auto;
}

.footer-content h3 {
  margin-bottom: 1.4rem;
  font-size: 1.9rem;
}

.footer-content p {
  max-width: 45rem;
  color: #d5d5e0;
  font-size: 1.4rem;
  line-height: 1.8;
}

.footer-content > div:nth-child(2) {
  display: flex;
  flex-direction: column;
}

.footer-content > div:nth-child(2) a {
  width: fit-content;
  margin-bottom: 0.8rem;

  color: #d5d5e0;
  font-size: 1.4rem;
}

.footer-content > div:nth-child(2) a:hover {
  color: var(--primary-light);
}

/* Social icons */

.social-links {
  display: flex;
  gap: 1.2rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 4rem;
  height: 4rem;

  background: var(--white);
  border-radius: 50%;
  color: #000000;
  font-size: 1.8rem;

  transition:
    background 0.3s ease,
    transform 0.3s ease;
}

.social-links a i {
  color: #000000;
}

.social-links a:hover {
  background: var(--primary-light);
  transform: translateY(-3px);
}

.copyright {
  margin-top: 3rem;
  padding-top: 2rem;

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

  text-align: center;
  color: #d5d5e0;
  font-size: 1.3rem;
}

/* Scroll-to-top button */

#scroll-top {
  position: fixed;
  right: 2rem;
  bottom: -8rem;
  z-index: 1000;

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

  width: 4.8rem;
  height: 4.8rem;
  padding: 0;

  background: #168be3;
  border: 2px solid #60baff;
  border-radius: 50%;

  box-shadow:
    0 7px 18px rgba(22, 139, 227, 0.35),
    0 0 14px rgba(22, 139, 227, 0.18);

  opacity: 0;

  transition:
    bottom 0.4s ease,
    opacity 0.4s ease,
    background 0.3s ease,
    transform 0.3s ease;
}

#scroll-top.active {
  bottom: 2rem;
  opacity: 1;
}

#scroll-top:hover {
  background: #0876c9;
  transform: translateY(-4px);
}

/* White chevron */

.scroll-chevron {
  position: relative;
  display: block;
  width: 2rem;
  height: 1.2rem;
}

.scroll-chevron::before,
.scroll-chevron::after {
  position: absolute;
  top: 0.4rem;

  width: 1.35rem;
  height: 0.4rem;

  background: var(--white);
  border-radius: 1rem;

  content: "";
}

.scroll-chevron::before {
  left: 0;
  transform: rotate(-45deg);
}

.scroll-chevron::after {
  right: 0;
  transform: rotate(45deg);
}

/* Tablet */

@media screen and (max-width: 1050px) {
  header {
    padding: 1.5rem 4%;
  }

  header .navbar ul {
    gap: 1.4rem;
  }

  header .navbar ul li a {
    font-size: 1.3rem;
  }

  .stories {
    padding-right: 5%;
    padding-left: 5%;
  }

  .story-gallery {
    column-count: 1;
  }
}

/* Mobile navbar */

@media screen and (max-width: 850px) {
  #menu {
    display: block;
  }

  header .navbar {
    position: absolute;
    top: 100%;
    right: -100%;

    width: 75%;
    min-height: calc(100vh - 6.5rem);
    padding: 2rem;

    background: var(--white);
    border-top: 1px solid #dbe5e8;
    box-shadow: -4px 8px 15px rgba(0, 0, 0, 0.14);

    transition: right 0.3s ease;
  }

  header .navbar.nav-toggle {
    right: 0;
  }

  header .navbar ul {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  header .navbar ul li a {
    display: block;
    padding: 1.2rem;

    background: #eff7f8;
    border-radius: 0.6rem;

    font-size: 1.6rem;
  }

  header .navbar ul li a::after {
    display: none;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* Small mobile */

@media screen and (max-width: 600px) {
  html {
    font-size: 56%;
  }

  header {
    padding: 1.3rem 5%;
  }

  header .logo {
    font-size: 1.8rem;
  }

  header .navbar {
    width: 100%;
  }

  .stories {
    padding: 4rem 1.5rem 5rem;
  }

  .section-heading {
    margin-bottom: 3rem;
  }

  .section-heading h1 {
    font-size: 3.1rem;
  }

  .section-heading p {
    font-size: 1.5rem;
  }

  .story-gallery {
    column-count: 1;
  }

  .story-card {
    margin-bottom: 2rem;
  }

  .footer {
    padding: 4rem 2rem 2rem;
  }
}

.mini-story {
  min-height: 13rem;
  color: #ffffff;
}

.mini-story-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 13rem;
  padding: 1.8rem;
}

.mini-story-content i {
  margin-bottom: 1rem;
  font-size: 2.2rem;
  opacity: 0.9;
}

.mini-story-content h2 {
  margin-bottom: 0.6rem;
  font-size: 1.7rem;
}

.mini-story-content p {
  font-size: 1.25rem;
  line-height: 1.6;
  opacity: 0.88;
}

.mini-story-amber {
  background: linear-gradient(
    145deg,
    #d98922,
    #a95518
  );
}

.mini-story-teal {
  background: linear-gradient(
    145deg,
    #159d8b,
    #087166
  );
}

.mini-story-blue {
  background: linear-gradient(
    145deg,
    #168be3,
    #175d9c
  );
}