/*
  ════════════════════════════════════════════════════════════════
   FEAScript Website
   Lightweight Finite Element Simulation in JavaScript
   Version: 0.2.0 (RC) | https://feascript.com
   CC BY 4.0 License © 2023–2026 FEAScript
  ════════════════════════════════════════════════════════════════
*/

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

html {
  max-width: 1500px;
  margin: auto;
  font-family: "Roboto", sans-serif;
  font-size: 90%;
  scroll-behavior: smooth;
  position: relative;
}

body {
  padding: 20px;
  line-height: 1.6;
}

/* Typography */
/* Headings */
h1,
h2,
h3 {
  background: none;
  font-weight: normal;
  padding: 0.4em 0 0.2em;
  margin: 0 0 0.5em;
  color: #555;
}

h1 {
  font-size: 150%;
  line-height: 1.2em;
  margin-bottom: 0.4em;
}

h1.top {
  border-bottom: 1px solid #aaa;
  position: relative;
}

h2 {
  font-size: 130%;
}

h3 {
  font-size: 120%;
}

/* Paragraphs and links */
p {
  margin: 1em 0;
}

a {
  text-decoration: none;
}

/* Layout components */
/* Banner */
#banner {
  float: right;
  padding-left: 1.5em;
  padding-bottom: 1.5em;
  margin-right: 1.5em;
  display: none;
}

#banner img {
  box-shadow: 0px 1px 4px #999;
}

/* Menu/Navigation */
#menu {
  list-style: none;
  margin: 1em 0;
  padding: 0;
}

#menu li {
  font-size: 105%;
  display: inline-block;
  margin-right: 1em;
}

#menu li a {
  color: #555;
  font-weight: bold;
}

#menu li a:hover {
  color: #333;
  transform: translateY(-2px);
  cursor: default;
  transition: transform 0.2s;
  display: inline-block;
}

#menu li.external-link-start {
  padding-left: 1em;
  border-left: 2px solid #999;
}

#menu li.icon-link-start {
  padding-left: 1em;
}

/* Footer styles */
footer {
  position: relative;
  background-color: #f7e7b7;
  padding: 2px 0 2px 5px;
  text-align: left;
  border-top: 2px solid #e0c97f;
}

#hamburger {
  margin-top: -5px;
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

#hamburger span {
  display: block;
  width: 20px;
  height: 3px;
  background-color: #555;
  margin: 3px 0;
  transition: 0.3s;
}

#mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  min-width: 200px;
}

#mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#mobile-menu li {
  padding: 6px 10px;
  border-bottom: 1px solid #eee;
}

#mobile-menu li:last-child {
  border-bottom: none;
}

#mobile-menu li a {
  color: #555;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
}

#mobile-menu li a:hover {
  color: #333;
}

#mobile-menu.open {
  display: block;
  top: calc(100% + 6px);
  right: 0px;
  min-width: 100px;
  animation: mobileMenuFadeIn 160ms ease;
}

/* small fade-in */
@keyframes mobileMenuFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Show hamburger only on small screens */
@media screen and (max-width: 500px) {
  #hamburger {
    display: block;
  }

  #menu {
    display: none;
  }
}

/* On wider screens hide the hamburger */
@media screen and (min-width: 500px) {
  #hamburger {
    display: none !important;
  }
}

/* Content elements */
/* Lists */
ul {
  padding-left: 1.5em;
  max-width: 1000px;
}

/* Default max-width for content elements */
li,
p,
.highlight-container,
pre.prettyprint {
  max-width: 1000px;
}

/* Preformatted text */
pre {
  background-color: #f2f2f2;
  margin: 0;
  padding: 10px;
  overflow-x: auto;
  white-space: pre;
}

pre.prettyprint {
  border: 1px solid #ddd;
  border-radius: 4px;
}

#responsive-logo {
  height: 80px;
}

/* Left-align MathJax formulas */
mjx-container {
  text-align: left !important;
}

/* Special components */
/* Highlight containers */
.highlight-container {
  background: #f7e7b7;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.highlight-container p {
  margin: 0;
}

/* Loading spinner */
#loading {
  display: none;
  margin-top: 20px;
  text-align: center;
  font-weight: bold;
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  border-top-color: #000;
  animation: spin 1s ease-in-out infinite;
  margin-right: 10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Tutorial styles */
.image-container {
  width: 100%;
  max-width: 800px;
  margin: 20px 0;
  text-align: center;
}

.image-container img {
  max-width: 100%;
  height: auto;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.image-caption {
  margin-top: 8px;
  font-style: italic;
  color: #555;
}

/* Tutorial lists and badges */
.tutorials-list {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.tutorials-list li {
  margin-bottom: 0.5em;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.5em;
}

.tutorial-name {
  display: inline-block;
  vertical-align: middle;
  font-weight: 550;
  margin-right: 10px;
}

.tutorials-list .badge {
  display: inline-block;
  background-color: #f7e7b7;
  color: #333;
  font-size: 90%;
  padding: 0.1em 0.8em;
  border-radius: 8px;
  margin-right: 0.5em;
  margin-top: 0.1em;
  margin-bottom: 0.1em;
  vertical-align: middle;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  font-weight: 500;
  letter-spacing: 0.3px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tutorials-list .badge:hover {
  transform: translateY(-2px);
  cursor: default;
}

/* Badge variants */
.tutorials-list .badge-basic {
  background-color: #6a6a6a;
  color: #f7e7b7;
}

.tutorials-list .badge-visual {
  background-color: #d18342;
  color: #f7e7b7;
}

.tutorials-list .badge-scribbler {
  background-color: #fede02ff;
}

.tutorials-list .badge-mt {
  background-color: #5585a3;
  color: #f7e7b7;
}

.tutorials-list .badge-gmsh {
  background-color: #8a9277;
  color: #f7e7b7;
}

.tutorials-list .badge-performance {
  background-color: #c62828;
  color: #f7e7b7;
}

.tutorials-list .badge-codepen {
  background-color: #47cf73;
}

/* Features list */
.features-list {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.features-list > li {
  margin-bottom: 1em;
}

/* Helper classes and utilities */
/* Notice bars */
.notice-dev {
  border-left: 4px solid #f39c12;
  padding-left: 10px;
  margin: 1em 0;
}

/* Studio waitlist form */
.waitlist-card {
  max-width: 400px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  padding: 16px;
  margin: 1em 0;
}

.waitlist-card h2 {
  margin-top: 0;
}

.waitlist-indicates-required {
  font-size: 90%;
  color: #555;
  margin-top: -0.2em;
  margin-bottom: 0.8em;
}

.waitlist-card .asterisk {
  color: #f39c12;
  font-weight: bold;
}

.waitlist-field label {
  display: block;
  color: #555;
  margin-bottom: 6px;
}

.waitlist-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.waitlist-row input[type="email"] {
  flex: 1;
  min-width: 240px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  font-size: 100%;
  line-height: 1.2;
}

.waitlist-row input[type="email"]:focus {
  outline: none;
  border-color: #aaa;
  box-shadow: 0 0 0 3px rgba(247, 231, 183, 0.8);
}

.waitlist-button {
  padding: 10px 14px;
  border: 1px solid #e0c97f;
  border-radius: 6px;
  background: #f7e7b7;
  color: #333;
  font-family: inherit;
  font-size: 100%;
  cursor: pointer;
}

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

.waitlist-responses {
  margin-top: 10px;
}

.waitlist-honeypot {
  position: absolute;
  left: -5000px;
}

/* Media queries */
/* Small screens: up to 500px */
@media screen and (max-width: 500px) {
  body {
    padding: 10px;
  }

  h1 {
    font-size: 155%;
  }

  h2 {
    font-size: 120%;
    line-height: 1.1em;
  }

  #responsive-logo {
    height: 50px;
  }

  #menu {
    display: none;
  }

  .highlight-container,
  li {
    max-width: 400px;
  }

  .tutorials-list li a {
    font-size: 100%;
  }

  .studio-layout .right-panel {
    display: none !important;
  }

  .studio-layout .left-panel {
    border-radius: 10px;
  }
}

/* Medium screens: 500px to 1000px */
@media screen and (min-width: 500px) and (max-width: 1000px) {
  body {
    padding: 15px;
  }

  h1 {
    font-size: 170%;
  }

  h2 {
    font-size: 125%;
    line-height: 1.3em;
  }

  h3 {
    font-size: 115%;
  }

  #responsive-logo {
    height: 60px;
  }

  #mobile-menu {
    display: none;
  }

  p,
  .highlight-container,
  li {
    max-width: 900px;
  }
}

/* Large screens: 1000px to 1300px */
@media screen and (min-width: 1000px) and (max-width: 1299px) {
  h1 {
    font-size: 180%;
  }

  h2 {
    font-size: 130%;
    line-height: 1.4em;
  }

  h3 {
    font-size: 120%;
  }

  #mobile-menu {
    display: none;
  }
}

/* Extra large screens with banner: 1300px and above */
@media screen and (min-width: 1300px) {
  #banner {
    display: block;
    width: 250px;
  }

  #banner img {
    width: 250px;
  }

  h1 {
    font-size: 180%;
  }

  h2 {
    font-size: 130%;
    line-height: 1.4em;
  }

  h3 {
    font-size: 120%;
  }

  #mobile-menu {
    display: none;
  }
}

/* Studio-specific styles */
.studio-layout {
  background-color: transparent;
  margin: 0.5em 0;
  padding: 0;
  display: block;
  min-height: auto;
  flex-direction: row;
  max-width: 1000px;
}

.studio-layout .container {
  display: flex;
  width: 100%;
  max-width: none;
  margin: 0;
  background: white;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.studio-layout .left-panel {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.studio-layout .text-content {
  color: #2d2d2d;
}

.studio-layout .text-content h1 {
  margin: 0 0 10px 0;
}

.studio-layout .text-content p {
  margin: 0 0 10px 0;
}

.studio-layout .right-panel {
  flex: 1.5;
  position: relative;
  padding: 16px;
  background: linear-gradient(135deg, #d4aa00ff, #4d4d4d);
  border-radius: 0 10px 10px 0;
  display: flex;
  align-items: center;
}

.studio-layout .studio-image {
  width: 100%;
  height: auto;
  border: 10px solid #333;
  border-radius: 10px;
  background: #000;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* Social icons */
.social-icons-top-right {
  position: absolute;
  bottom: 1px;
  right: 1px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.social-icons-top-right ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 10px;
}

.social-icons-top-right li {
  display: inline-block;
}

.social-icons-top-right a {
  text-decoration: none;
}

.social-icons-top-right a:hover img {
  opacity: 0.8;
  transform: scale(1.1);
  transition: all 0.2s ease;
}

/* Sponsor link styles */
.sponsor-link {
  display: inline-block;
  transition: transform 0.2s;
}

.sponsor-link:hover {
  transform: translateY(-2px);
}

#github-stars {
  color: #555;
  font-size: 0.6em !important;
}
