:root {
  --black: #000;
  --white: #fff;
  --gray: #999;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  background: var(--white);
  color: var(--black);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
}

.video-hero-player {
  display: block;
  max-width: 100%;
  height: auto;
  clip-path: inset(2px);
}

.hero-overlay {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.font-test {
  margin-bottom: 32px;
  text-align: center;
}

.hero-tagline {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.25rem, 4vw, 2.5rem);
  color: var(--black);
  margin: 0;
  font-weight: 600;
  white-space: nowrap;
}

.font-label {
  font-size: 0.7rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Typography showcase */
.typography-showcase {
  background: #f8f8f8;
}

.type-sample {
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid #e0e0e0;
}

.type-sample:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.type-label {
  display: block;
  margin-top: 12px;
  font-size: 0.75rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sample-h1 {
  font-size: 3rem;
  font-weight: 700;
  margin: 0;
}

.sample-h2 {
  font-size: 2rem;
  font-weight: 600;
  margin: 0;
}

.sample-h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

.sample-h4 {
  font-size: 1.25rem;
  font-weight: 500;
  margin: 0;
}

.sample-body {
  font-size: 1rem;
  font-weight: 400;
  margin: 0;
  max-width: 600px;
}

.sample-body-light {
  font-size: 1rem;
  font-weight: 300;
  margin: 0;
  max-width: 600px;
}

.sample-small {
  font-size: 0.875rem;
  font-weight: 400;
  margin: 0;
  color: #666;
}

/* Body font showcase */
.body-font-showcase {
  background: var(--white);
}

.showcase-intro {
  color: var(--gray);
  margin-bottom: 48px;
}

.body-font-sample {
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid #e0e0e0;
}

.body-font-sample:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.body-font-sample h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  margin: 0 0 16px 0;
}

.body-font-sample p {
  margin: 0;
  line-height: 1.7;
  max-width: 680px;
}

.body-open-sans {
  font-family: 'Open Sans', sans-serif;
}

.body-source-sans {
  font-family: 'Source Sans 3', sans-serif;
}

.body-lato {
  font-family: 'Lato', sans-serif;
}

.body-nunito {
  font-family: 'Nunito', sans-serif;
}

.scroll-cue {
  color: var(--gray);
  font-size: clamp(3rem, 6vw, 5rem);
  animation: scroll-bounce 1.5s ease-in-out infinite;
  cursor: pointer;
  transition: color 0.2s ease, scale 0.2s ease;
  scale: 1;
  line-height: 1;
}

.scroll-cue:hover {
  color: var(--black);
  scale: 1.2;
}

.scroll-cue-light {
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0;
}

.scroll-cue-light:hover {
  color: rgba(255, 255, 255, 0.95);
}

@keyframes scroll-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}

.nav {
  padding: 24px;
}

.nav-logo {
  height: 32px;
}

.hero {
  height: 100svh;
  padding: 4rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero > * {
  margin-bottom: 1.25rem;
}

.hero > *:last-child {
  margin-bottom: 0;
}

.hero--pan {
  background: var(--white);
  color: var(--black);
}

.hero--adgangur {
  background: var(--black);
  color: var(--white);
}

.hero--pan img {
  max-width: 260px;
  width: 100%;
  height: auto;
}

.hero--adgangur img {
  width: auto;
  max-width: min(560px, 85vw);
  max-height: clamp(220px, calc(100svh - 20rem), 520px);
  height: auto;
}

.hero--pan .video-hero-player {
  width: min(100%, 980px);
  height: auto;
  max-height: calc(100svh - 8rem - 6rem);
}

.hero-content {
  text-align: center;
  width: 100%;
  max-width: 720px;
}

.product-logo {
  display: block;
  margin: 0 auto 24px auto;
}  

.scroll-indicator {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.6;
  pointer-events: auto;
  z-index: 2;
}

.scroll-indicator .scroll-cue {
  pointer-events: auto;
}

@media (max-height: 820px) {
  .hero {
    padding-top: 3rem;
    padding-bottom: 3.5rem;
  }

  .hero--adgangur img {
    max-width: min(380px, 78vw);
  }
}
  
  .hero h1 {
    font-size: 3rem;
    margin: 0;
  }
  
.hero-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  font-weight: 400;
  font-style: normal;
  margin-top: 12px;
}

.hero-audience {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.95rem;
  font-weight: 400;
  font-style: normal;
  margin-top: 16px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.product-tagline {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  font-weight: 400;
  font-style: normal;
  margin-top: 16px;
}

/* Context section - where Aðgangur is used */
.section-context {
  position: relative;
  height: 100svh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  background: url('assets/adgangur-ipad-turnstyle.jpeg') left center / cover no-repeat;
  padding: 80px 24px;
  filter: saturate(0.85);
}

.section-context-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  pointer-events: none;
}

.section-context-text {
  position: relative;
  z-index: 1;
  text-align: right;
  max-width: 620px;
  padding-right: 5vw;
}

.context-line-1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 2rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  margin: 0 0 16px 0;
  line-height: 1.3;
}

.context-line-2 {
  font-family: 'Open Sans', sans-serif;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
  line-height: 1.5;
}

/* Narrow portrait screens: text at bottom to avoid overlapping tablet */
@media (max-width: 600px) and (orientation: portrait) {
  .section-context {
    height: 100svh;
    min-height: 100svh;
    align-items: flex-end;
    justify-content: center;
    padding: 32px 20px 100px 20px;
  }

  .section-context-text {
    text-align: center;
    padding-right: 0;
    max-width: 100%;
  }

  .context-line-1 {
    font-size: 1.25rem;
  }

  .context-line-2 {
    font-size: 0.95rem;
  }
}

/* Extra small phones: smaller text */
@media (max-width: 380px) and (orientation: portrait) {
  .context-line-1 {
    font-size: 1rem;
  }

  .context-line-2 {
    font-size: 0.9rem;
  }
}

  .section {
    padding: 96px 24px;
  }
  
  .section.dark {
    background: var(--black);
    color: var(--white);
  }
  
  .section.center {
    text-align: center;
  }

  .section-explanation {
    padding-top: 140px;
    padding-bottom: 120px;
    background: var(--white);
  }

  .section-explanation .container {
    text-align: left;
    max-width: 680px;
  }

  .section-explanation .container h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 40px;
    color: var(--black);
    text-align: center;
  }

  .section-explanation p {
    margin: 0 0 24px 0;
    line-height: 1.8;
    color: #333;
    text-align: justify;
    text-align-last: left;
  }

  .section-explanation p:last-child {
    margin-bottom: 0;
  }

  /* Interfaces section */
  .section-interfaces {
    padding-top: 140px;
    padding-bottom: 140px;
    background: #1a1f26;
    color: rgba(255, 255, 255, 0.8);
  }

  .section-interfaces .container {
    max-width: 860px;
  }

  .section-interfaces h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 80px;
    color: rgba(255, 255, 255, 0.85);
  }

  /* Subheadings inside "Viðmót" (component names) */
  .section-interfaces .ui-subhead {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 16px 0;
    line-height: 1.25;
    letter-spacing: 0.005em;
    color: rgba(255, 255, 255, 0.9);
  }

  .section-interfaces .interface-content p {
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.9;
    font-size: 1rem;
    text-align: justify;
    text-align-last: left;
  }

  /* Features section - quieter continuation of system chapter */
  .section-features {
    background: #1a1f26;
    color: rgba(255, 255, 255, 0.7);
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .section-features h3 {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.25rem;
  }

  .section-features p {
    color: rgba(255, 255, 255, 0.7);
  }

  .interface-block {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 72px;
  }

  .interface-block:last-child {
    margin-bottom: 0;
  }

  .interface-content {
    flex: 1;
  }

  .interface-content p {
    margin: 0;
    line-height: 1.9;
  }

  .interface-image {
    flex: 1;
  }

  .interface-image img {
    width: 100%;
    height: auto;
    display: block;
  }

  /* Desktop: two-column layout */
  @media (min-width: 768px) {
    .interface-block {
      flex-direction: row;
      align-items: center;
      gap: 48px;
    }

    .interface-content {
      flex: 1;
    }

    .interface-image {
      flex: 1;
    }

    /* Reverse block: image on left, text on right */
    .interface-block-reverse {
      flex-direction: row-reverse;
    }
  }
  
  .container {
    max-width: 960px;
    margin: 0 auto;
  }
  
  .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 48px;
  }
  
  .use-cases {
    list-style: none;
    padding: 0;
    margin-top: 32px;
  }
  
  .use-cases li {
    padding: 12px 0;
    border-bottom: 1px solid #ddd;
  }
  
  .section.dark .use-cases li {
    border-color: #333;
  }
  
  /* Footer arrow/pyramid layout */
  .footer-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-arrow > * {
    display: block;
    text-align: center;
  }

  .pan-footer-logo {
    max-width: 280px;
    width: 100%;
    margin-bottom: 16px;
  }

  .brand-tagline {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    font-weight: 400;
    margin: 0 0 20px 0;
    max-width: 340px;
    width: 100%;
    white-space: nowrap;
  }

  .footer-address {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    font-weight: 400;
    margin: 0 0 8px 0;
    max-width: 280px;
    width: 100%;
  }

  .footer-phone-line {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    font-weight: 400;
    margin: 0 0 8px 0;
    max-width: 220px;
    width: 100%;
  }

  .footer-email-line {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    font-weight: 400;
    margin: 0 0 20px 0;
    max-width: 160px;
    width: 100%;
  }

  .footer-legal {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    font-weight: 400;
    margin: 0;
    max-width: 100px;
    width: 100%;
  }

  .footer-email,
  .footer-phone {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
  }

  .footer-email:hover,
  .footer-phone:hover {
    color: rgba(255, 255, 255, 0.8);
  }

  /* Capabilities section */
  .section-capabilities {
    padding-top: 96px;
    padding-bottom: 96px;
    background: #1a1f26;
  }

  .section-capabilities h2 {
    text-align: center;
    margin-bottom: 48px;
    color: rgba(255, 255, 255, 0.95);
  }

  .capability-block {
    max-width: 680px;
    margin: 0 auto 40px auto;
  }

  .capability-block:last-child {
    margin-bottom: 0;
  }

  .capability-block h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: rgba(255, 255, 255, 0.9);
  }

  .capability-block p {
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.7;
    text-align: justify;
    text-align-last: left;
  }

/* Unmanned access visual section */
.section-unmanned {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: url('assets/mannlaus-adgangur-door.png') center center / cover no-repeat;
  padding: 80px 24px;
}

.section-unmanned-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
  pointer-events: none;
}

.section-unmanned-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  padding-left: 5vw;
}

.section-unmanned-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2rem, 3.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.97);
  margin: 0 0 20px 0;
  line-height: 1.05;
}

.section-unmanned-subtitle {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  margin: 0 0 20px 0;
  line-height: 1.4;
}

.section-unmanned-desc {
  font-family: 'Open Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  line-height: 1.6;
  max-width: 440px;
}

@media (max-width: 768px) {
  .section-unmanned {
    justify-content: center;
    text-align: center;
    min-height: 60vh;
    padding: 64px 24px;
  }

  .section-unmanned-content {
    padding-left: 0;
    max-width: 100%;
  }

  .section-unmanned-desc {
    margin-left: auto;
    margin-right: auto;
  }
}

  /* Contact section */
  .section-contact {
    padding: 80px 24px;
    background: #1a1f26;
  }

  .contact-box {
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 16px 32px;
  }

  .contact-link {
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
  }
  
  .cta {
    display: block;
    width: fit-content;
    margin: 32px auto;
    padding: 12px 24px;
    border: 1px solid var(--white);
    color: var(--white);
    text-decoration: none;
    transition: all 0.2s ease;
  }
  
  .cta:hover {
    background: var(--white);
    color: var(--black);
  }
  
  .footer {
    padding: 24px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--gray);
  }

/* iPhone landscape */
@media (orientation: landscape) and (max-height: 500px) {
  .hero {
    padding-top: 2.5rem;
    padding-bottom: 3rem;
  }

  .hero--pan .video-hero-player {
    max-height: min(46svh, 320px);
  }
  
  .hero-overlay {
    margin-top: 16px;
  }
  
  .hero-tagline {
    font-size: clamp(1rem, 3vw, 1.5rem);
    margin-bottom: 0;
  }
  
  .scroll-cue {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    margin-top: 8px;
    font-size: 0.9rem;
  }

  .hero-audience {
    margin-top: 12px;
    font-size: 0.8rem;
    max-width: 320px;
  }
  
  .product-tagline {
    margin-top: 12px;
    font-size: 0.85rem;
  }
  
  .section {
    padding: 48px 24px;
  }
  
  .section h2 {
    font-size: 1.5rem;
  }
  
  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
  
  .grid h3 {
    font-size: 1.1rem;
  }
  
  .grid p {
    font-size: 0.9rem;
  }

  .section-explanation p,
  .section-interfaces .interface-content p,
  .capability-block p {
    text-align: left;
    text-align-last: left;
  }
  
  .pan-footer-logo {
    max-width: 360px;
    margin-bottom: 12px;
  }

  .brand-tagline {
    max-width: none;
    margin-bottom: 14px;
    font-size: 0.9rem;
  }

  .footer-address {
    max-width: 220px;
  }

  .footer-phone-line {
    max-width: 180px;
  }

  .footer-email-line {
    max-width: 130px;
    margin-bottom: 14px;
  }

  .footer-legal {
    max-width: 80px;
  }
  
  .cta {
    margin: 24px auto;
    padding: 10px 20px;
  }

  .section-interfaces .interface-content p {
    font-size: 1.27rem;
  }

  .section-explanation p {
    font-size: 1.27rem;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

}