/* Phone presentation of the approved light NFS Soft design. */
.app-identity { display: contents; }
.app-identity-icon { display: none; }

@media (max-width: 980px) {
  :root { --mobile-header-height: 76px; }
  body[data-menu-open] { overflow: hidden; }
  .header { padding-top: env(safe-area-inset-top, 0px); }
  .header-inner { height: var(--mobile-header-height); }
  .menu-button { position: relative; flex-shrink: 0; transition: background .2s, border-color .2s; }
  .menu-button span { position: absolute; left: 13px; right: 13px; margin: 0; transition: transform .25s, top .25s; }
  .menu-button span:first-child { top: 17px; }
  .menu-button span:last-child { top: 24px; }
  .menu-button[aria-expanded=true] { background: var(--ink); border-color: var(--ink); }
  .menu-button[aria-expanded=true] span { top: 21px; background: var(--paper); }
  .menu-button[aria-expanded=true] span:first-child { transform: rotate(45deg); }
  .menu-button[aria-expanded=true] span:last-child { transform: rotate(-45deg); }
  .mobile-nav[data-open] {
    position: fixed;
    inset: calc(var(--mobile-header-height) + env(safe-area-inset-top, 0px)) 0 0;
    height: calc(100vh - var(--mobile-header-height) - env(safe-area-inset-top, 0px));
    height: calc(100dvh - var(--mobile-header-height) - env(safe-area-inset-top, 0px));
    max-height: none;
    padding: 20px max(var(--gutter), env(safe-area-inset-right, 0px)) max(26px, env(safe-area-inset-bottom, 0px)) max(var(--gutter), env(safe-area-inset-left, 0px));
    background: var(--paper);
    border: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    gap: 0;
  }
  .mobile-nav > * { flex-shrink: 0; }
  .mobile-primary { counter-reset: navigation; }
  .mobile-primary > a {
    display: grid;
    grid-template-columns: 25px 1fr 24px;
    align-items: center;
    gap: 10px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    font-size: 31px;
    font-weight: 450;
    line-height: 1.13;
    letter-spacing: -.055em;
    counter-increment: navigation;
  }
  .mobile-primary > a::before { content: '0' counter(navigation); font-size: 10px; letter-spacing: 0; color: #798773; }
  /* Draw the arrow instead of letting iOS render a Unicode emoji. */
  .mobile-primary > a::after {
    content: '';
    width: 23px;
    height: 23px;
    color: #879380;
    background: currentColor;
    --menu-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 20 20 4M5 4h15v15' fill='none' stroke='black' stroke-width='1.3'/%3E%3C/svg%3E");
    -webkit-mask: var(--menu-arrow) center / contain no-repeat;
    mask: var(--menu-arrow) center / contain no-repeat;
  }
  .mobile-primary > a[aria-current=page] { color: #667b59; }
  .mobile-secondary { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; padding-top: 16px; }
  .mobile-secondary > a { font-size: 14px; letter-spacing: -.02em; min-height: 44px; padding: 12px 0; }
  .mobile-menu-footer { margin-top: auto; padding-top: 28px; }
  .mobile-menu-footer > span { display: block; margin-bottom: 12px; font-size: 12px; color: var(--muted); }
  .mobile-menu-footer .pill { display: flex; width: 100%; min-height: 52px; justify-content: space-between; padding: 14px 22px; font-size: 15px; border-radius: 16px; }
}

@media (max-width: 600px) {
  :root { --gutter: 22px; --mobile-header-height: 72px; }
  html { scroll-padding-top: 96px; }
  .wrap { padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
  .header { background: rgba(248, 249, 245, .98); }
  .header-inner { border-bottom-color: #e3e7dd; }
  .logo, .logo img { width: 120px; }
  .pill { min-height: 48px; font-size: 14px; padding: 13px 22px; }
  .text-link { min-height: 44px; font-size: 12px; }
  .hero { padding-top: 34px; }
  .hero-top { margin-bottom: 25px; }
  .hero-top .eyebrow { font-size: 9px; letter-spacing: .075em; }
  .hero h1 { font-size: clamp(41px, 12.45vw, 74px); font-weight: 450; letter-spacing: -.065em; line-height: 1.06; }
  .hero-heading { margin-bottom: 28px; }
  .hero-intro { padding: 22px 0 0; display: block; }
  .hero-intro p { font-size: 14px; max-width: 295px; line-height: 1.65; }
  .hero-intro .text-link {
    display: flex; width: max-content; min-height: 46px; margin-top: 19px;
    padding: 11px 20px; gap: 37px; border: 0; border-radius: 100px;
    background: var(--ink); color: var(--paper); font-size: 12px;
  }
  .hero-intro .text-link .arrow { font-size: 21px; }
  .hero-stage {
    height: 410px; margin-inline: -5px; border-radius: 24px;
    background: radial-gradient(ellipse at 15% 5%, #f2f4eb, #e6ecdf 65%);
    box-shadow: inset 0 0 0 1px #dde5d5;
  }
  .stage-label { left: 22px; top: 24px; }
  .stage-label p { font-size: 22px; line-height: 1.13; margin-top: 9px; }
  .stage-label .eyebrow { font-size: 8px; letter-spacing: .06em; }
  .phone { width: 178px; box-shadow: 0 0 0 1px #bdc6b6, 3px 5px 0 #c3c9bb, 9px 22px 34px #26302420; }
  .phone-chef { left: 12%; top: 133px; }
  .phone-mira { left: 53%; top: 83px; }
  .stage-caption { align-items: center; font-size: 10px; padding: 13px 0; gap: 10px; }
  .stage-caption a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 10px; }
  .stage-caption .arrow { font-size: 19px; }
  .section { padding-top: 58px; }
  .section-heading { gap: 18px; }
  .section-heading h2, .section-head h2 { font-size: clamp(31px, 8.4vw, 42px); line-height: 1.12; letter-spacing: -.055em; }
  .section-heading .text-link { flex-shrink: 0; font-size: 11px; margin-top: 22px; }
  .section-kicker, .section-heading .eyebrow { font-size: 9px; letter-spacing: .12em; }
  .home-trust { padding-top: 43px; }
  .home-trust .section-head .text-link { margin-top: 8px; }
  .reference-strip { margin-top: 24px; border-radius: 17px; overflow: hidden; background: #f0f2eb; }
  .reference-strip a { min-height: 93px; }
  .projects-grid, .listing-grid { gap: 34px; }
  .project { display: block; border-radius: 20px; transition: transform .2s; }
  .project-cover { border-radius: 20px; aspect-ratio: 1.22; }
  .ui-cover { aspect-ratio: 1.26; padding: 53px 18px 0; }
  .project-tags { left: 18px; top: 18px; }
  .project-tags span { font-size: 10px; padding: 7px 10px; }
  .project-meta { padding: 17px 2px 0; gap: 15px; }
  .project-meta h3 { font-size: 25px; line-height: 1.15; }
  .project-meta p { font-size: 13px; line-height: 1.65; margin-top: 7px; max-width: 270px; }
  .project-meta > .arrow { flex-shrink: 0; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; font-size: 22px; }
  .apps-intro { font-size: 14px; line-height: 1.65; }
  .apps-section { padding-bottom: 58px; }
  .app-grid { border: 0; gap: 10px; margin-top: 29px; }
  .app-grid .app-item {
    min-height: 153px; padding: 18px 7px 16px; border: 0; border-radius: 20px;
    align-items: center; text-align: center; background: #eef1e9;
    transition: background .2s, transform .2s;
  }
  .app-item img { width: 57px; height: 57px; border-radius: 17px; margin-bottom: 13px; box-shadow: 0 4px 10px #17201b0c; }
  .app-item strong { font-size: 12px; line-height: 1.3; font-weight: 550; letter-spacing: -.035em; }
  .app-item small { font-size: 9px; line-height: 1.4; margin-top: 5px; }
  .app-item > .arrow { display: none; }
  .apps-bottom { flex-direction: column; gap: 5px; font-size: 10px; margin-top: 17px; }
  .studio { padding-block: 52px; gap: 30px; }
  .studio h2 { font-size: clamp(31px, 8.6vw, 44px); line-height: 1.15; }
  .studio p { font-size: 14px; line-height: 1.75; }
  .service { min-height: 82px; }
  .service h3 { font-size: 20px; line-height: 1.2; }
  .office-photo, .studio-banner .office-photo { border-radius: 22px; }
  .office-teaser { padding-block: 44px 54px; }
  .office-teaser h2 { font-size: 34px; }
  .page-hero { padding: 31px 0 32px; }
  .breadcrumbs { margin-bottom: 28px; font-size: 10px; line-height: 1.7; gap: 8px; }
  .breadcrumbs a { display: inline-flex; align-items: center; min-height: 28px; }
  .page-hero > .eyebrow { font-size: 10px; letter-spacing: .12em; }
  .page-title { font-size: clamp(41px, 11.35vw, 66px); font-weight: 450; line-height: 1.06; letter-spacing: -.06em; margin: 22px 0; text-wrap: balance; }
  .page-lead { font-size: 15px; line-height: 1.75; }
  .page-section { padding-block: 34px; }
  .hero-actions { gap: 12px; margin-top: 25px; }
  .hero-actions .pill { min-height: 48px; font-size: 13px; padding: 13px 20px; }
  .hero-actions .text-link { min-height: 44px; }
  .filters { display: flex; gap: 8px; margin: 8px 0 25px; flex-wrap: wrap; }
  .filter { min-height: 44px; padding: 11px 15px; font-size: 12px; }
  .app-catalog { gap: 12px; }
  .app-card { min-height: 216px; padding: 22px 16px 21px; border: 1px solid #e8ecdf; border-radius: 21px; }
  .app-card img { width: 64px; height: 64px; border-radius: 19px; margin-bottom: 24px; }
  .app-card h2, .app-card h3 { font-size: 20px; line-height: 1.18; letter-spacing: -.045em; }
  .app-card p { font-size: 11px; line-height: 1.6; margin-top: 8px; }
  .app-card > .arrow { top: 22px; right: 14px; font-size: 17px; color: #7c8975; }
  .app-intro-grid { display: block; }
  .app-intro-grid > .app-emblem { display: none; }
  .app-identity { display: flex; align-items: center; gap: 17px; margin-top: 2px; }
  .app-identity-icon { display: block; width: 68px; height: 68px; border-radius: 20px; box-shadow: 0 5px 17px #17201b0c; }
  .app-identity .eyebrow { font-size: 10px; letter-spacing: .10em; max-width: 195px; }
  .app-intro-grid .page-title { margin-top: 25px; }
  .app-intro-grid + .page-section { padding-top: 32px; }
  .section-split h2 { font-size: 31px; line-height: 1.16; }
  .simple-list li { padding-block: 17px; font-size: 14px; line-height: 1.55; }
  .case-banner, .case-banner img, .case-banner .taha-cover { border-radius: 20px; }
  .case-meta { gap: 24px; padding-block: 25px; }
  .gallery-main { border-radius: 18px; }
  .gallery-thumbs { padding-bottom: 14px; }
  .gallery-choice { border-radius: 12px; overflow: hidden; }
  .dialog-close { width: 48px; height: 48px; }
  .brand-card, .map-panel { border-radius: 21px; }
  .office-card h3 { font-size: 26px; }
  .office-card p { font-size: 12px; }
  .office-card a { display: inline-flex; align-items: center; min-height: 44px; font-size: 11px; line-height: 1.5; }
  .reference-grid { border-radius: 17px; overflow: hidden; }
  .contact { padding-block: 48px; }
  .contact-top { align-items: end; gap: 14px; }
  .contact h2 { font-size: clamp(42px, 12vw, 62px); line-height: 1.03; }
  .contact-orb { width: 59px; height: 59px; flex-shrink: 0; font-size: 28px; }
  .contact-links { gap: 14px; flex-wrap: wrap; margin-top: 26px; }
  .contact-links a { min-height: 44px; display: inline-flex; align-items: center; font-size: 12px; }
  .contact-big { font-size: clamp(24px, 7.6vw, 35px); }
  .contact-details .numbers a, .contact-alt a { min-height: 44px; display: inline-flex; align-items: center; }
  .contact-details .numbers { gap: 2px; }
  .inquiry-form { border-radius: 22px; padding: 27px 20px; }
  .field { font-size: 13px; gap: 10px; }
  .field input, .field select, .field textarea { font-size: 16px; min-height: 50px; border-radius: 11px; padding: 14px; }
  .field textarea { min-height: 148px; }
  .field small { font-size: 11px; }
  .check-field { min-height: 44px; align-items: center; font-size: 12px; }
  .check-field input { width: 20px; height: 20px; margin: 0; flex-shrink: 0; }
  .form-actions .pill { width: 100%; min-height: 50px; justify-content: space-between; border-radius: 14px; }
  .form-note { font-size: 12px; line-height: 1.75; }
  .draft-actions { align-items: stretch; flex-direction: column; }
  .draft-actions button { min-height: 44px; font-size: 12px; }
  .site-footer-top { padding-block: 32px; gap: 28px 22px; }
  .site-footer-top a { font-size: 12px; line-height: 1.6; }
  .footer-site-links a, .site-footer-top > div:last-child > a { display: flex; align-items: center; min-height: 42px; }
  .site-footer-top p { font-size: 13px; line-height: 1.75; }
  .site-footer-top h3 { font-size: 10px; margin-bottom: 12px; }
  .site-footer-top .location-names { font-size: 11px; line-height: 1.8; }
  .footer { padding-bottom: max(24px, env(safe-area-inset-bottom, 0px)); font-size: 10px; line-height: 1.8; }
  .footer-links a { display: inline-flex; align-items: center; min-height: 40px; }
  .faq summary { min-height: 44px; align-items: center; }
  .legal-nav a { min-height: 44px; display: inline-flex; align-items: center; }
  .project:active, .app-card:active, .app-item:active { transform: scale(.985); }
}

@media (max-width: 360px) {
  :root { --gutter: 18px; }
  .hero-stage { height: 385px; }
  .phone { width: 163px; }
  .phone-chef { left: 10%; }
  .phone-mira { left: 53%; top: 104px; }
  .stage-caption { font-size: 9px; }
  .stage-caption a { font-size: 9px; }
  .app-grid { gap: 8px; }
  .app-grid .app-item { min-height: 148px; padding-inline: 5px; }
  .app-item img { width: 53px; height: 53px; }
  .app-item strong { font-size: 11px; }
  .app-item small { font-size: 9px; }
  .app-catalog { grid-template-columns: 1fr; }
  .app-card { display: grid; grid-template-columns: 58px minmax(0,1fr); column-gap: 17px; row-gap: 6px; min-height: 112px; padding: 21px 34px 21px 17px; align-content: center; }
  .app-card img { width: 58px; height: 58px; grid-row: 1 / 3; margin: 0; align-self: center; }
  .app-card h3 { font-size: 19px; margin: 0; }
  .app-card p { margin: 0; }
  .app-card > .arrow { top: calc(50% - 8px); right: 14px; font-size: 15px; }
  .mobile-primary > a { font-size: 28px; padding-block: 11px; }
  .section-heading { display: block; }
  .section-heading .text-link { margin-top: 8px; }
  .contact-orb { width: 48px; height: 48px; font-size: 24px; }
}

@media (hover: none) {
  .app-card:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .menu-button, .menu-button span, .project, .app-item { transition: none; }
  .project:active, .app-card:active, .app-item:active { transform: none; }
}
