/*
 * Global styles and theme definitions for the StickToDev website.
 *
 * The site makes extensive use of CSS custom properties (variables) to
 * facilitate easy switching between a dark and a light theme.  By
 * default the dark theme variables are defined on the :root selector.
 * When the ``.light-theme`` class is applied to the ``body`` element
 * these values are overridden to produce the light appearance seen
 * throughout the provided mock‑ups.  Use JavaScript to toggle the
 * ``light-theme`` class on the ``body`` when the user clicks the
 * theme toggle button.  Persist the choice to ``localStorage`` so
 * visitors see their last selected theme on subsequent visits.
 */

/* Dark theme values */
:root {
  --font-base: 'Inter', sans-serif;
  --font-heading: 'Inter', sans-serif;
  --body-bg: #0b0d10;
  --nav-bg: #0b0d10;
  --nav-text: #ffffff;
  --nav-text-dim: #aaaaaa;
  --card-bg: #14181f;
  --card-text: #ffffff;
  --card-subtext: #b5bfc9;
  --accent: #e86619;
  --accent-secondary: #003a6f;
  --btn-bg: var(--accent);
  --btn-text: #ffffff;
  --btn-hover: #ff7e3a;
  --btn-secondary-bg: var(--accent-secondary);
  --btn-secondary-text: #ffffff;
  --btn-secondary-hover: #005895;
  --hero-bg: #0e1930;
  --footer-text: #666666;
  --overlay-bg: rgba(0, 0, 0, 0.7);

  /* Background colour for the pill‑shaped navigation container.  This is
     slightly lighter than the hero background to create contrast. */
  --nav-container-bg: #101a2b;
}

/* Light theme overrides */
body.light-theme {
  --body-bg: #8ba4b8;
  --nav-bg: #8ba4b8;
  --nav-text: #0e1e2e;
  --nav-text-dim: #425d76;
  --card-bg: #476b8a;
  --card-text: #ffffff;
  --card-subtext: #d1dbe4;
  --accent: #e86619;
  --accent-secondary: #375f7d;
  --btn-bg: var(--accent);
  --btn-text: #ffffff;
  --btn-hover: #ff7e3a;
  --btn-secondary-bg: var(--accent-secondary);
  --btn-secondary-text: #ffffff;
  --btn-secondary-hover: #4e7fa4;
  --hero-bg: #375f7d;
  --footer-text: #d9e3ec;
  --overlay-bg: rgba(0, 0, 0, 0.5);

  /* Light theme navigation container background colour. */
  --nav-container-bg: #d3e0ea;
}

/* Reset and base typography */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-base);
  background-color: var(--body-bg);
  color: var(--nav-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--btn-hover);
}

/* Navigation bar */
/*
 * Top navigation bar styling.
 *
 * In the Figma designs the navigation sits inside a pill‑shaped container
 * that floats at the top of each page.  To approximate this look we
 * give the ``navbar`` a large border radius, centre it with automatic
 * horizontal margins and apply a subtle padding.  The nav remains
 * sticky so it stays visible when scrolling.
 */
.navbar {
  background-color: var(--nav-container-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  border-radius: 3rem;
  margin: 0.5rem auto;
  /* Constrain the width of the pill so it does not span the full
     viewport width.  The values here approximate the proportions
     seen in the Figma designs. */
  width: 90%;
  max-width: 1100px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0.5rem;
  z-index: 1000;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hamburger {
  display: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--nav-text);
}

.logo-block {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background-color: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--btn-text);
  font-weight: 700;
  font-size: 1rem;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--nav-text);
  white-space: nowrap;
}

.logo-text .accent {
  color: var(--accent);
}

/* When using the new logo images (icon and text together), constrain
   their height to align with the navigation bar. */
.logo-img {
  height: 40px;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-weight: 500;
  color: var(--nav-text);
}

.nav-links a:hover {
  color: var(--btn-hover);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  /* Increase the border radius on all buttons to create pill‑shaped
     call‑to‑action controls, matching the Figma designs. */
  border-radius: 9999px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  border: none;
}

.sign-btn {
  background-color: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
}

.sign-btn:hover {
  background-color: var(--btn-secondary-hover);
}

.theme-btn {
  background-color: var(--btn-bg);
  color: var(--btn-text);
}

.theme-btn:hover {
  background-color: var(--btn-hover);
}

/* Side navigation overlay */
.side-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--overlay-bg);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  z-index: 2000;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.side-nav.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.side-nav-content {
  background-color: var(--nav-bg);
  width: 280px;
  height: 100%;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
}

.side-nav-content .close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--nav-text);
  font-size: 1.5rem;
  cursor: pointer;
}

.side-logo {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--nav-text);
}

.side-section h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--nav-text-dim);
  margin-bottom: 0.5rem;
}

.side-section a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 20px;
  background-color: var(--card-bg);
  color: var(--card-text);
  margin-bottom: 0.5rem;
  font-weight: 500;
  text-align: center;
  transition: background-color 0.2s ease;
}

.side-section a:hover {
  background-color: var(--btn-secondary-bg);
}

.settings-btn {
  margin-top: auto;
  background-color: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  text-align: center;
  transition: background-color 0.2s ease;
}

.settings-btn:hover {
  background-color: var(--btn-secondary-hover);
}

/* Hero section */
.hero {
  background-color: var(--hero-bg);
  padding: 4rem 1rem 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw + 1rem, 4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero span.highlight {
  color: var(--accent);
}

.hero p {
  max-width: 640px;
  margin: 0 auto 2rem;
  color: var(--card-subtext);
  font-size: 1.125rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-actions .btn-primary {
  background-color: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  padding: 0.75rem 1.5rem;
  /* Use a very large radius to make the hero buttons pill‑shaped */
  border-radius: 9999px;
  font-size: 1rem;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.hero-actions .btn-primary:hover {
  background-color: var(--btn-secondary-hover);
}

.hero-actions .btn-secondary {
  background-color: var(--btn-bg);
  color: var(--btn-text);
  padding: 0.75rem 1.5rem;
  /* Use a very large radius to make the hero buttons pill‑shaped */
  border-radius: 9999px;
  font-size: 1rem;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.hero-actions .btn-secondary:hover {
  background-color: var(--btn-hover);
}

/* Hero decorative icons */
.hero-icons {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.hero-icons i {
  position: absolute;
  font-size: 5rem;
  opacity: 0.06;
  color: var(--nav-text);
}

/* Position each icon individually to create a scattered pattern */
.hero-icons i:nth-child(1) { top: 10%; left: 15%; font-size: 6rem; }
.hero-icons i:nth-child(2) { top: 30%; left: 60%; }
.hero-icons i:nth-child(3) { top: 65%; left: 20%; font-size: 7rem; }
.hero-icons i:nth-child(4) { top: 50%; left: 80%; font-size: 4rem; }
.hero-icons i:nth-child(5) { top: 15%; left: 75%; font-size: 4.5rem; }

/* Roadmaps grid */
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.roadmap-card {
  background-color: var(--card-bg);
  color: var(--card-text);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.roadmap-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

.roadmap-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.roadmap-card p {
  font-size: 0.9rem;
  color: var(--card-subtext);
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.roadmap-card .category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--btn-hover);
  margin-bottom: 1rem;
}

.roadmap-card .start-btn {
  align-self: flex-start;
  padding: 0.5rem 1rem;
  background-color: var(--btn-bg);
  color: var(--btn-text);
  border-radius: 20px;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.roadmap-card .start-btn:hover {
  background-color: var(--btn-hover);
}

/* Vertical label used on roadmaps pages */
.vertical-label {
  position: fixed;
  right: -60px;
  top: 40%;
  transform: rotate(90deg);
  /* Enlarge the vertical label and use the accent colour for more
     prominence, approximating the half‑ellipse compiler badge in the
     mock‑ups. */
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 4px;
  z-index: 500;
  pointer-events: none;
}

/* When the vertical label is an anchor (used on roadmap pages to link to the
   compiler), allow pointer events so the link is clickable */
a.vertical-label {
  pointer-events: auto;
}

/* Simple footer */
footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.9rem;
  color: var(--footer-text);
  margin-top: auto;
}

/* Forms layout (sign in, sign up, contact) */
.auth-wrapper {
  display: flex;
  flex-direction: row;
  min-height: calc(100vh - 80px);
}

.auth-half {
  flex: 1;
  padding: 4rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-left {
  background-color: var(--hero-bg);
  color: var(--card-text);
}

.auth-right {
  background-color: var(--nav-bg);
  color: var(--card-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.auth-right .logo-icon-large {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background-color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--btn-text);
  margin-bottom: 1rem;
}

.auth-right .logo-text {
  font-size: 2rem;
}

.auth-form {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0 auto;
}

.auth-form h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.auth-form label {
  font-size: 0.9rem;
  font-weight: 500;
}

.auth-form input,
.auth-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid transparent;
  border-radius: 8px;
  background-color: var(--card-bg);
  color: var(--card-text);
  font-size: 1rem;
  resize: vertical;
  transition: border-color 0.2s ease;
}

.auth-form input:focus,
.auth-form textarea:focus {
  outline: none;
  border-color: var(--btn-bg);
}

.auth-form button {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  background-color: var(--btn-bg);
  color: var(--btn-text);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.auth-form button:hover {
  background-color: var(--btn-hover);
}

/* Specific classes for sign in social buttons */
.social-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  width: 100%;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.social-google {
  background-color: #ffffff;
  color: #333333;
  border: 1px solid #cccccc;
}

.social-google:hover {
  background-color: #f2f2f2;
}

.social-apple {
  background-color: #000000;
  color: #ffffff;
}

.social-apple:hover {
  background-color: #222222;
}

.separator {
  text-align: center;
  font-size: 0.8rem;
  color: var(--card-subtext);
  margin: 0.5rem 0;
  position: relative;
}

.separator::before,
.separator::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background-color: var(--card-subtext);
}

.separator::before {
  left: 0;
}

.separator::after {
  right: 0;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
  .hamburger {
    display: block;
  }
  .nav-right .sign-btn {
    display: none;
  }
  .auth-wrapper {
    flex-direction: column;
  }
  .auth-right {
    padding: 2rem 1rem;
  }
  .vertical-label {
    display: none;
  }
}