:root {
  --main: #f9b233;
  --accent: #29436e;
  --dark-bg: #212121;
  --white: #fff;
  --text: #353535;
  --gradient: linear-gradient(135deg, #f9b233 0%, #ffedcc 100%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Open Sans', Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.5;
}

header {
  background: var(--gradient);
  min-height: 80vh;
  display: flex;
  flex-direction: column;
}

.hero,
.nav {
  padding: 2rem 5vw;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  background: url('/logo-fmedia-mono.svg') left/contain no-repeat;
  text-indent: -9999px;
  width: 142px;
  height: 37px;
  position: relative;
  border: 4px solid transparent;
  transition: all 0.5s;
  cursor: pointer;
  box-sizing: content-box;
}
.logo::after {
  content: '';
  visibility: hidden;
  background: url('/logo-fmedia.svg') left/contain no-repeat;
  position: absolute;
}
.logo:hover {
  background: url('/logo-fmedia.svg') left/contain no-repeat;
  border: 4px solid #fff;
}

.nav ul {
  display: flex;
  gap: 4rem;
  list-style: none;
}

.nav a {
  text-decoration: none;
  color: var(--accent);
  font-weight: 600;
  font-size: 1rem;
  position: relative;
}

.nav a::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s;
}

.nav a:hover::after {
  width: 100%;
}

.hero {
  margin-top: 5vh;
  display: flex;
  gap: 5rem;
}

.hero h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 3rem;
  color: var(--accent);
  margin-bottom: 5rem;
  font-weight: 700;
}
.hero h1 span {
  font-weight: 100;
}
.hero-text {
  flex: 1 0 auto;
}
.hero-img img {
  max-height: 400px;
}

.cta-btn {
  background: var(--accent);
  color: var(--white);
  padding: 1rem 2.5rem;
  border: none;
  border-radius: .5rem;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 2px 24px rgba(41,67,110,0.13);
  transition: background 0.3s;
  text-decoration: none;
  display: inline-block;
}
.nav-cta-btn {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  padding: .75rem 1.5rem;
}

.cta-btn:hover,
.nav-cta-btn:hover {
  background: #1a2541;
  color: var(--white);
}

main {
  padding: 3rem 5vw;
}

.services {
  text-align: center;
  margin: 4rem 0;
}

.services h2 {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 2rem;
  font-family: 'Montserrat', sans-serif;
}

.service-cards {
  display: flex;
  justify-content: space-between;
}

.card {
  padding: 2rem 0;
  width: 280px;
  transition: transform 0.2s;
  text-align: left;
}

.card:hover {
  transform: translateY(-8px) scale(1.04);
}

.card .icon {
  height: 60px;
  margin-bottom: 1.5rem;
  background-repeat: no-repeat;
  background-position: left;
  background-size: contain;
}

.icon.webdev { background-image: url('/code.svg'); }
.icon.software { background-image: url('/device-floppy.svg'); }
.icon.graphic { background-image: url('/palette.svg'); }

.card h3 {
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.97rem;
  color: var(--text);
}

#main-cta {
  width: 100%;
  text-align: center;
  transform: translateY(-82px);
}
#main-cta .cta-btn {
  width: 250px;
  height: 70px;
  font-size: 120%;
}

.portfolio {
  background: var(--dark-bg);
  color: var(--white);
  border-radius: 2rem;
  padding: 3rem 2vw;
  margin-bottom: 4rem;
}

.portfolio h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 3rem;
  font-family: 'Montserrat', sans-serif;
}

.portfolio-grid {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.portfolio-item {
  background: #272b35;
  border-radius: 1rem;
  padding: 1.2rem;
  width: 250px;
  box-shadow: 0 1px 8px rgba(41,67,110,0.07);
  text-align: center;
  margin-bottom: 1.5rem;
  transition: box-shadow 0.2s;
}

.portfolio-item:hover {
  box-shadow: 0 2px 20px 0px rgba(41,67,110,0.21);
}

.portfolio-thumb {
  height: 100px;
  background: #353941 url('portfolio_img_placeholder.svg') center/contain no-repeat;
  margin-bottom: 1rem;
  border-radius: 0.6rem;
}

.contact {
  margin-bottom: 2rem;
  text-align: center;
}

.contact h2 {
  font-family: 'Montserrat', sans-serif;
  color: var(--accent);
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.contact form {
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.contact input,
.contact textarea {
  padding: 0.85rem;
  border: 1px solid #dedede;
  border-radius: 0.8rem;
  font-size: 1rem;
  background: #fafafa;
  resize: none;
}

.contact button {
  background: var(--main);
  color: var(--dark-bg);
  border: none;
  border-radius: 1.5rem;
  padding: 0.9rem 2.5rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s;
}

.contact button:hover {
  background: #ffd369;
}

footer {
  text-align: center;
  color: #888;
  padding: 1.5rem 0;
  font-size: 1rem;
  background: #faf4e7;
  border-top: 1px solid #f1d8b0;
  border-radius: 2rem 2rem 0 0;
}

@media (max-width: 900px) {
  .service-cards, .portfolio-grid {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
  }
  .portfolio-item, .card {
    width: 90vw;
    max-width: 400px;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 0.96rem;
  }
  .nav {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 3vw;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .card, .portfolio-item {
    padding: 1.2rem 1rem;
  }
  main {
    padding: 2rem 3vw;
  }
}
